...
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 /wiki/spaces/ABTM/pages/725090428.
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
...
The only mandatory field required is the projectId. The following parameters are also required however can be passed as environment variables - ASSERTTHAT_ACCESS_KEY
and the ASSERTTHAT_SECRET_KEY
. All 3 or ASSERTTHAT_API_TOKEN
.
The parameters are available from the AssertThat Configuration page - AssertThat Configuration.
In case of using Jira API access token more info on token generation and maintenace can be found here https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html
Usage - within a script
Installation
Code Block | ||
---|---|---|
| ||
npm install @assertthat/assertthat-bdd --save
|
Using basic auth
For downloading feature files:
...
Code Block |
---|
var assertThat = require('assertthat-bdd');
assertThat.uploadReports({
"projectId": PROJECT_ID,
"accessKey": "ASSERTTHAT_ACCESS_KEY",
"secretKey": "ASSERTTHAT_SECRET_KEY",
"jiraServerUrl": "Jira server URL." //Omit if using Jira Cloud
}, function() {
// some optional callback code
}); |
Using Jira API access token
For downloading feature files:
Code Block | ||
---|---|---|
| ||
var assertThat = require('assertthat-bdd');
assertThat.downloadFeatures({
"projectId": PROJECT_ID,
"token": "ASSERTTHAT_API_TOKEN",
"jiraServerUrl": "Jira server URL." //Omit if using Jira Cloud
}, function() {
// some optional callback code
}); |
For uploading reports:
Code Block |
---|
var assertThat = require('assertthat-bdd'); assertThat.uploadReports({ "projectId": PROJECT_ID, "accessKey": "ASSERTTHAT_ACCESS_KEY", "token": "ASSERTTHAT_API_TOKEN", "jiraServerUrl": "Jira server URL." //Omit if using Jira Cloud }, function() { // some optional callback code }); |
...
Code Block |
---|
assertthat-bdd -i PROJECT_ID -a ASSERTTHAT_ACCESS_KEY -s ASSERTTHAT_SECRET_KEY -f
Available parameters:
-a, --accessKey [ASSERTTHAT_ACCESS_KEY] Access key
-s, --secretKey [ASSERTTHAT_SECRET_KEY] Secret key
-t, --token [ASSERTTHAT_API_TOKEN] Jira API token (Server and DC only)
-u, --jiraServerUrl [URL] Jira server URL e.g https://mycompanyjira.com
-i, --projectId <ID> Jira project id
-m, --mode <mode> Features to download (default: "automated")
-l, --tags <tag-expression> Cucucmber tag expression for scenarios filtering
-o, --outputFolder [FOLDER PATH] Jira project id
-q, --jql [JQL] JQL filter for features
-x, --proxyURI [URI] Proxy URI |
...
Code Block |
---|
assertthat-bdd -i PROJECT_ID -a ASSERTTHAT_ACCESS_KEY -s ASSERTTHAT_SECRET_KEY -r
Available parameters:
-a, --accessKey [ASSERTTHAT_ACCESS_KEY] Access key
-s, --secretKey [ASSERTTHAT_SECRET_KEY] Secret key
-t, --token [ASSERTTHAT_API_TOKEN] Jira API token (Server and DC only)
-u, --jiraServerUrl [URL] Jira server URL e.g https://mycompanyjira.com
-i, --projectId <ID> Jira project id
-j, --jsonReportFolder [FOLDER PATH] Cucumber json files folder
-n, --runName [NAME] Test run name
-t, --jsonReportIncludePattern [PATTERN] Pattern for json file names
-x, --proxyURI [URI] Proxy URI
-d, --metadata [FILE PATH] Metadata json file path |
...