...
The scenarios and feature files can be downloaded from the plugin into your automation test framework using the plugin provided. In addition to using tags to filter the scenarios for execution, the plugin provides 2 3 optional fields:
JIRA JQL - JQL filters can be developed using the JIRA's advanced searching functionality e.g. “Sprint = 5”.
mode - This field is set for each scenario in AssertThat and is set as default to Automated - Automated and Manual tests.
tags - tag expression filter for scenarios e.g. tags = "(@smoke or @ui) and (not @slow)". More on tag expressions https://cucumber.io/docs/cucumber/api/#tag-expressions
Upload test results (cucumber json file) into AssertThat - upload_report
...
Code Block | ||
---|---|---|
| ||
gem 'assertthat-bdd', '~> 1.0', '>= 1.4.0.2' |
Rake
Code Block | ||
---|---|---|
| ||
require 'assertthat-bdd' task :download_features do AssertThatBDD::Features.download( #Optional can be supplied as environment variable ASSERTTHAT_ACCESS_KEY accessKey:'ASSERTTHAT_ACCESS_KEY', #Optional can be supplied as environment variable ASSERTTHAT_SECRET_KEY secretKey:'ASSERTTHAT_SECRET_KEY', #Required for Jira Server only. Omit if using Jira Cloud version jiraServerUrl: 'https://mycompanyjira.com' #Required Jira project id e.g. 10001 projectId: 'PROJECT_ID', #Optional - default ./features outputFolder: './features/', #Optional proxy url to connect to Jira proxy: 'PROXY_URL', #Optional - default automated (can be one of: manual/automated/both) mode: 'automated', #Optional - tag expression filter for scenarios. More on tag expressions https://cucumber.io/docs/cucumber/api/#tag-expressions tags: '(@smoke or @ui) and (not @slow)', #Optional - all features downloaded by default - should be a valid JQL jql: 'project = XX AND key in (\'XXX-1\')' ) end task :upload_report do AssertThatBDD::Report.upload( #Optional can be supplied as environment variable ASSERTTHAT_ACCESS_KEY accessKey:'ASSERTTHAT_ACCESS_KEY', #Optional can be supplied as environment variable ASSERTTHAT_SECRET_KEY secretKey:'ASSERTTHAT_SECRET_KEY', #Required for Jira Server only. Omit if using Jira Cloud version jiraServerUrl: 'https://mycompanyjira.com' #Jira project id e.g. 10001 projectId: 'PROJECT_ID', #The name of the run - default 'Test run dd MMM yyyy HH:mm:ss' runName: "Dry Tests Run", #Json report folder - default ./reports jsonReportFolder: "reports", #Regex to search for cucumber reports - default .*.json jsonReportIncludePattern: ".*/cucumber.json" ) end |
...
Code Block |
---|
assertthat-bdd-features -h
Usage: assertthat-bdd-features [options]
-a, --accessKey ACCESS_KEY Access key same as env variable ASSERTTHAT_ACCESS_KEY
-s, --secretKey SECRET_KEY Secret key same as env variable ASSERTTHAT_SECRET_KEY
-u, --jiraServerUrl SERVER_URL Jira Server URL (Only for jira server integration) e.g. https://mycompanyjira.com
-p, --projectId PROJECT_ID Jira project id
-o, --outputFolder OUTPUT_FOLDER Featured output folder - default ./features
-m, --mode MODE Mode one of automated,manual,both - deafult automated
-t, --tags <tag-expression> Cucucmber tag expression for scenarios filtering
-j, --jql JQL_FILTER Jql issues filter
-x, --proxy PROXY_URL proxy url to connect to Jira
-h, --help Show help
-v, --version Show version |
...