Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

The AssertThat - BDD Test Automation in Jira will parse the results of the cucumber json file and load them so that the results can be viewed in Jira alongside the user stories - Test Execution status for User Stories. The automated test results will automatically be linked to existing defects and the results loaded into the reporting tool. The failed tests can then be easily reviewed and assigned for further analysis - Automated Test Report Analysis.

Mandatory fields

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 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

...

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 --projectId PROJECT_ID --accessKey ASSERTTHAT_ACCESS_KEY --secretKey ASSERTTHAT_SECRET_KEY -f 
 
 Available parameters:
  --projectId <ID>                      Jira project id
  --accessKey [ASSERTTHAT_ACCESS_KEY]   Access key
  --secretKey [ASSERTTHAT_SECRET_KEY]   Secret key
  --token [ASSERTTHAT_API_TOKEN]        Jira API token (Serverfor and DCDataCenter only) as an alternative to accessKey/secretKey basic auth
  --jiraServerUrl [URL]                 Jira server URL e.g https://mycompanyjira.com
  --mode <mode>                         Features to download (default: "automated")
  --tags <tag-expression>               Cucucmber tag expression for scenarios filtering
  --outputFolder [FOLDER PATH]          Jira project id
  --jql [JQL]                           JQL filter for features
  --proxyHost [Host]                    Proxy Host
  --proxyPort [Port]                    Proxy Port

...

Code Block
 assertthat-bdd --projectId PROJECT_ID --accessKey ASSERTTHAT_ACCESS_KEY --secretKey ASSERTTHAT_SECRET_KEY -r

 Available parameters:
  --projectId <ID>                      Jira project id
  --accessKey [ASSERTTHAT_ACCESS_KEY]   Access key
  --secretKey [ASSERTTHAT_SECRET_KEY]   Secret key
  --token [ASSERTTHAT_API_TOKEN]        Jira API token (Serverfor andDataCenter DC only) as an alternative to accessKey/secretKey basic auth
  --jiraServerUrl [URL]                 Jira server URL e.g https://mycompanyjira.com
  --jsonReportFolder [FOLDER PATH]      Cucumber json files folder
  --runName [NAME]                      Test run name
  --jsonReportIncludePattern [PATTERN]  Pattern for json file names
  --metadata [FILE PATH]                Metadata json file path
  --proxyHost [Host]                    Proxy Host
  --proxyPort [Port]                    Proxy Port

...