...
If there is no existing bitbucket-pipelines.yml in the project, click on Pipelines in the Bitbucket left panel and Create Your first pipeline
Depending on your framework, select the starter pipeline. For this example, Maven starter was chosen.
Sample simple pipeline would look like below:
Code Block image: maven:3.6.3 pipelines: default: - parallel: - step: name: Build and Test caches: - maven script: - | echo 'Running tests' mvn -DtestFailureIgnore=true test curl -H "accept:application/json" -H "Authorization:AioAuth $AIO_AUTH" -H "Content-Type:multipart/form-data" -F "createNewRun=true" -F "addCaseToCycle=true" -F "createCase=true" -F "bddForceUpdateCase=true" -F "file=@target/cucumber-reports/Cucumber_TempTracker.json;type=application/json" -X POST "https://tcms.aiojiraapps.com/aio-tcms/api/v1/project/$JIRA_PROJ/testcycle/$AIO_CYCLE/import/results?type=Cucumber" echo 'Done'
Add Variables. In the below example, we have parametrized the Authorization token, the Jira project and the Cycle which needs to be updated
Run the pipeline. The pipeline will run and at the end of the run, the cucumber.json file will be posted to AIO Tests for marking results.
...
createNewRun - Creates a new run for each case
addCaseToCycle - If case is not already existing in the cycle, then the case is added to the cycle. False will mark such a case in failures
createCase - If a key or automation key is not found in the tags, then a new case will be created if set to true.
bddForceUpdateCase - (only applicable for Cucumber) If the automation results file has different steps then the mapped case in AIO Tests, then they would be overwritten with the one from the results file if the value is set to true.
Info |
---|
In our example, we have used framework as Cucumber, however, it should change based on the framework being used. |
Code Block | ||
---|---|---|
| ||
curl -H "accept:application/json" -H "Authorization:AioAuth $AIO_AUTH" -H "Content-Type:multipart/form-data" -F "createNewRun=true" -F "addCaseToCycle=true" -F "createCase=true" -F "bddForceUpdateCase=true" -F "file=@target/cucumber-reports/Cucumber_TempTracker.json;type=application/json" -X POST "https://tcms.aiojiraapps.com/aio-tcms/api/v1/project/$JIRA_PROJ/testcycle/$AIO_CYCLE/import/results?type=Cucumber" |
...