Running tests from Jenkins
You can run test assets either from the Jenkins Freestyle or the Pipeline project on the Jenkins server to test an application under test.
Before you begin
You must have completed the following tasks:
-
Configured the Freestyle project, if you want to run test assets from the Freestyle project. See Configuring the Freestyle project.
-
Configured the Pipeline project either by using the Pipeline script or Pipeline script from SCM, if you want to run test assets from the Pipeline script project. See Configuring the Pipeline project by using the sample script or Configuring the Pipeline project by using the script from SCM.
-
Downloaded the latest Test Results Analyzer plugin from the Jenkinsci repository. For more information about the Test Results Analyzer plugin, refer to the Jenkins documentation.
-
Installed the Test Results Analyzer plugin on the Jenkins server. For more information about installing the plugin, refer to the Jenkins documentation.
About this task
After the test run is complete, you can view the test results in a tabular format when you use the Jenkins Test Results Analyzer plugin. With a TRA-based report, you can filter the results based on the status of the build. The status of the builds can be PASSED, FAILED, and SKIPPED. You can also identify the failed build from the TRA-based report and take the required action to resolve the build errors. The TRA report also represents the build information in Line, Bar, and Pie graphs so that you can easily read the data.
Procedure
-
Log in to the Jenkins server.
The Jenkins dashboard is displayed.
- Open your Jenkins Freestyle or Pipeline project from the list.
- Click Build Now to run the test assets from Jenkins.
Results
What to do next
You can view the build logs by clicking the build number from the Build History pane, and then selecting the Console Output option. You can also view the history of test results in a tabular format by clicking the Test Results Analyzer option.
You can access the report URLs to view the test run information at any point in time. You can also view the test reports and logs of the test that was run on the Jenkins server from the Results page on Test Hub. See Test results and reports.