.scripts.bdd_helper_scripts package
Submodules
.scripts.bdd_helper_scripts.xray_upload module
This script uploads a cucumber test result file to JIRA
- upload_results_file(args: argparse.Namespace) str [source]
POST the cucumber JSON results file to JIRA
- Parameters
args – The passed parameters
- Returns
The JSON response from the server
- Raises
SystemExit – Upon request failure
.scripts.bdd_helper_scripts.xtp_compare module
This script compares a local feature file to that in Jira
- check_local_file()[source]
Check the local feature file - Empty method
- Returns
the list of issues; an empty list.
- file_differences(args: argparse.Namespace, file_paths: list[str]) bool [source]
Compares and format output as the unix “diff” command. Writes the output to stdout.
- Parameters
args – The parsed parameters
file_paths – A list of pathlib.Posix objects
- Returns
Whether or not there was a difference
.scripts.bdd_helper_scripts.xtp_pull module
.scripts.bdd_helper_scripts.xtp_push module
This script uploads a cucumber feature file to a test set ticket in JIRA
- associate_test_with_test_set(args: argparse.Namespace, test_set_xtp_ticket: str, new_test_xtp_ticket: str)[source]
Associate a Jira test ticket to a Jira test set ticket
- Parameters
args – The passed paramaters
test_set_xtp_ticket – The XTP ticket number of the test set
new_test_xtp_ticket – The XTP ticket number of the test
- fetch_test_set(test_set_xtp: str, args: argparse.Namespace) list [source]
Make sure a Jira test set with the parameter exists
- Parameters
test_set_xtp – The test set XTP ticket
args – The passed paramaters
- Returns
Details of the tests assciated with the test set, if any
- get_xtp_ticket_tag(args: argparse.Namespace, feature_file: pytest_bdd.parser.Feature) str [source]
Making use of the parsed feature file, get the test set XTP ticket
Also ensures that there is only one XTP ticket tag
- Parameters
args – The passed paramaters
feature_file – The parsed feature file
- Returns
The test set XTP ticket
- parse_feature_file(args: argparse.Namespace)[source]
Parse the feature file
- Parameters
args – The passed paramaters
- Returns
The parsed feature file
- upload_feature_file(xtp_ticket: str, args: argparse.Namespace) list [source]
POST the .feature file to JIRA
If the Scenario Outline in the feature file matches the Summary of a Jira Test ticket, then the ticket will be updated. If not then a new ticket will be created.
- Parameters
xtp_ticket – the test set XTP ticket
args – the passed paramaters
- Returns
details of the new/updated test ticket
.scripts.bdd_helper_scripts.xtp_utils module
- export_xtp_feature(args: argparse.Namespace, xtp_ticket: str) str [source]
Export the cucumber feature file from Jira
- Parameters
args – the parsed parameters
xtp_ticket – the XTP ticket. E.g XTP-1234
- Returns
the JSON content of the XTP ticket
- get_xtp_issue_type(args: argparse.Namespace, xtp_ticket: str) str [source]
Get the issue type metadata
- Parameters
args – The parsed parameters
xtp_ticket – The XTP ticket. E.g XTP-1234
- Returns
A string representing the type of issue, Test or Test Set.