Determine number of new tests in build

Is it possible to determine the count of new tests run in a build?

I am trying to create a plugin similar to the CI Game I recently encountered for Jenkins so need to identify the number of new tests executed and whether they passed or failed.  Ideally I would like to be able to identify this from the BuildStatistics provided in the buildFinished notification of a server listener, rather than have to track this separately.

Comment actions Permalink


BuildStatistics.getNewFailedCount() can get you the number of the tests, first failed in this build.

There is no dedicated API method to get the tests added in the build, so you might need to use BuildStatistics.getAllTests() for the current and previous build and calcualate the difference.

Looking forward to trying your plugin!

Comment actions Permalink

Thanks I figured that might be the case


Please sign in to leave a comment.