Skip to main content

Playwright

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 projects's folder (or above))

{
"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 variables as ENV (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;"