playwright-xray-testimporter
v0.0.8
Published
Utility to extract test steps from Playwright and import them into Xray
Readme
Xray importer/ updater for Playwright
Imports and updates Playwright test cases to Xray
Please note that this is a 0.0.x release, so there will probably be some bugs
Install
Install the latest version with
npm install playwright-xray-testimporter Usage
Add the xray.testimporter.config.json configuration file to the root of your project.
urlMandatory, URL to your JiratypeMandatory, Jira is in the cloud or on your serverapiVersionOptional, use Xray API version 1.0 or 2.0 (default)jiraUserNameMandatory (can be empty), Used to update test cases in JirajiraAccesTokenMandatory (can be empty), Used to update test cases in Jiraclient_idMandatory, Xray client idclient_secretMandatory, Xray client secretprojectKeyMandatory, Project key to the Jira projectxray_test_repository_folderOptional, Xray folder to place the imported tests intotest_input_folderMandatory, Relative path to the Playwright teststest_output_folderMandatory, Relative path to where the updated Playwright tests should be placedmax_test_casesOptional, defaults to 100. Importing a lot of test cases can take a while, so better do it in batches.customFieldOptional. Will set a cutom field to a value. The content of customField must be correctly formatted, see Notes
{
"jira": {
"url": "https://client.atlassian.net",
"type": "cloud",
"apiVersion": "1.0",
"jiraUserName": "[email protected]",
"jiraAccesToken": ""
},
"cloud": {
"client_id": "",
"client_secret": ""
},
"projectKey": "TES",
"xray_test_repository_folder": "",
"test_input_folder": "./test/test_files_r2",
"test_output_folder": "./test/test_files_write",
"customField": {
"customfield_11548": {
"Value": "JUMP"
}
}
}To start the import, type the command below in terminal:
npx xraytestimporterTo start the update, type the command below in terminal:
npx xraytestimporter --updateTo update from a Xray Json import file
npx xraytestimporter --file filename.jsonNotes
- If the folder option
xray_test_repository_folderis used, the folder has to exist - The
test_output_folderandtest_input_foldermust exist before running he testimporter - The
--updateusesjiraAccesTokento rename the test cases in Jira - When running update, the updater reads the tests from
test_input_folder - Formating of customField must follow the Jira format, e.g. a select list, single choice would look like this.
"customField": {
"customfield_11548": {
"Value": "JUMP"
}
}A string field would look like this
"customField": {
"customfield_11548": "JUMP"
}License
playwright-xray-testimporter is MIT licensed.
Contributors (special thanks for supporting the project), in alphabetical order:
Acknowledgments
Author
Niklas Back [email protected]
