Skip to main content

Playwright

Quick Start​

Connecting Playwright

This video is hosted on YouTube. Playing it may transfer data to YouTube and set cookies. Click 'Accept' below to accept and enable all YouTube videos on this site.

Installation​

Install the npm package:

npm install @orangebeard-io/playwright-orangebeard-reporter

The source code can be found on GitHub: Playwright Listener.

Configuration​

Create orangebeard.json in your test project's folder (or in any parent directory):

{
"endpoint": "https://app.orangebeard.io/{ORGANIZATION}",
"token": "{ACCESS_TOKEN}",
"project": "{ORANGEBEARD_PROJECT}",
"testset": "Playwright test examples",
"description": "A run from playwright",
"attributes": [
{
"value": "Demo"
}
],
"referenceUrl": "https://docs.orangebeard.io/"
}

Configure the reporter in playwright.config.ts:

export default defineConfig({
testDir: './my-tests',
reporter: [['@orangebeard-io/playwright-orangebeard-reporter']],
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
}]
});

Running Tests​

Run your tests as usual!

Alternatively, configure Orangebeard settings as environment variables (without or on top of orangebeard.json):

ORANGEBEARD_ENDPOINT=https://company.orangebeard.app
ORANGEBEARD_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
ORANGEBEARD_PROJECT="my project"
ORANGEBEARD_TESTSET="my test set"
ORANGEBEARD_DESCRIPTION="My awesome testrun"
ORANGEBEARD_ATTRIBUTES="key:value; value;"
Ask Orangebeard