xray-cucumber-playwright-bdd
v3.5.1
Published
Integration between Xray, Cucumber, and Playwright BDD
Downloads
148
Maintainers
Readme
Playwright-Bdd-Xray Plugin
This is a playwright-bdd plugin which implements automatic synchronization of Feature-Files with Xray-Cloud.
Configuration
Prerequisites:
NodeJS version >= v22:
Load the plugin:
Import package
xray-cucumber-playwright-bdd: npm install xray-cucumber-playwright-bddAdd the plugin as a
reporterin the playwright config:reporter: [ xrayReporter, ],Configure Plugin
Please also setup the client-id and secret[^1] as well as the xray-project ID[^2] in the environment variables
CLIENT_ID,CLIENT_SECRETandXRAY_PROJECT.You can also specify optional fields which should be filled during creation of new test cases via a json structure inside the environment variable
XRAY_CUSTOM_FIELDS. Furthermore,XRAY_TESTPLANmay be set to a Jira-Key (e.g.XSP-60) to associate created tests / executions with the given test plan,XRAY_TESTTYPEmay be set to overwrite the default test-type ("Manual") when creating tests,XRAY_TESTPRIORITYmay be set to overwrite the Jira-Priority of created tests.Please use the id of the custom field as a key and it's default value as a value inside the json structre, i.e XRAY_CUSTOM_FIELDS={"customfield_10050": "my value"}.
Done
That's it. All runs will now automatically synchronize existing feature-files and create runs.
Please checkstderrfor any potential issues.On the initial run, the console output will spew out a bunch of IDs (usually 5 digit numbers). You can add these to the corresponding feature-file by adding a top-level tag:
@IssueId=<ID>.
If the Test-Case already exists remotely, you can also specify the Jira-Key:@TestId=<Key>(whereKeyis e.g.XSP-60)
[^1]: See https://docs.getxray.app/space/ProductKB/46269250/%5BXray+Cloud%5D+How+to+get+API+Keys
[^2]: This is usually a three letter identifier, that most test-cases are also prefixed with. In the official Xray Demo this is XSP
