In recent years, Continuous Integration (CI) has become a best practice for software development. Build automation and automated testing form the core of CI.
AIO Tests supports automated testing with AIO public APIs and integration with frameworks like JUnit and TestNG.
The AIO Tests Jenkins plugin provides another easy to use interface to report test results right after the automated tests have run, thus helping in CI. The plugin wraps the AIO public APIs to import test results from Cucumber (via cucumber.json), TestNG or JUnit result XML files. The plugin is available for all Cloud, Server and DataCenter instances.
AIO APIs and Jenkins plugin can be used to publish results from any framework capable of generating JUnit files like Robot/Cypress/NUnit amongst many others.
Installing the plugin
AIO Tests Jenkins plugin can be installed from the Jenkins marketplace as below.
Login to your Jenkins instance.
Go to Manage Jenkins > Manage Plugins > Available
Now search for AIO Tests and click Install
Jenkins 2.235.1 or higher
Jira cloud/server/datacenter instance with AIO Tests for Jira installed
The plugin works in the post build actions step, after the build steps are run. Assuming that the tests have run and a results file (Cucumber.json/Junit/TestNG/any XUnit framework which generates a JUnit xml report) has been generated, the AIO Tests plugin can be used as below to report results of cases in the report to Jira. For information on how to map cases with AIO Tests for different frameworks, please refer to https://aioreports.atlassian.net/wiki/spaces/ATDoc/pages/484278289 .
Go to project -> Configure
Click on the Post Build Actions -> Select Publish Results to AIO Tests
The following options need to be configured for publishing results to AIO Tests
Server/DataCenter Authentication - Use Jira server/DC username and password with basic authentication
Specify the Project for which run results need to be published eg. SCRUM
Choose a framework and specify the path of the file - relative to the workspace eg. /target/surefire-reports/testng-results.xml
For frameworks other than JUnit or TestNG, if results file is being generated in JUnit format, please select JUnit
6. The below table defines the rest of the field options:
Select between existing and new cycle
In case of new cycle, Cycle prefix will be used to prefix the cycle title
If existing cycle is selected, specify AIO Tests cycle key eg. SCRUM-CY-121
If checked, cases not already in cycle are added, else the cases are reported as errors
If checked and no case exists with a matching case key or automation key, a new case is created
Update BDD Case Steps [Cucumber Only]
If checked, if the automated case steps are different from the steps in AIO Tests, then the automated steps will update the steps in the AIO Tests cases
Hide Publish Result Details
If checked, it would hide testcase wise details
Fail build if result publishing fails
If checked, the build result will be updated to failed, in case publishing of results to AIO Tests fails
Reporting results in pipeline
The AIO Tests Jenkins plugin has support for being run as a pipeline task. For security of API Key/Jira Password, secret text credentials can be used to avoid putting the key in plain text. Plain text API Key would work as well.