You can use the Test Result Analyzer plugin from Jenkins to analyse the trends of tests.
Test Result Analyzer plugin
Video Tutorial from youtube
Installation:
- In Jenkins Dashboard, click on Manage Jenkins
- From the menu select Manage Plugins
- Click on Available tab and input analyzer in the Filter search box
- Click the check box to the left of Test Results Analyzer and click the Install without restart button
Usage:
- Go to the project and click on Configure
- Goto Post-build Actions section and select Publish JUnit test result report
from the Add post-build action dropdown
- In the Test report XMLs field provide the path of the TestNg/JUnit xml in the project. For example -
**/target/test-results/*.xml
in my case
- Save the configuration
- Then after a successful build, goto your project, and click on the Test Results Analyzer on the left side menu