1

We have Jenkins job that take 30-45 minutes to run all the tests.

Test results shows only tests information when the job has completed.

We have written TestNG listeners to display in logs which test is currently being executed, but it's not really helpful when there are lots of log entries coming and also when there are parallel tests run.

Is there a Jenkins plugin that for a given job shows which tests are currently running?

  • Why do you want to see the current running test? Can't you just wait until the test-run is finished? – Niels van Reijmersdal Nov 22 '16 at 12:32
  • @NielsvanReijmersdal For instance to guage whether situation is generally going in the right direction. In Intellij I can see test progress and I can stop them if I see, for instance, that most test fails. Perhaps test environment is wrong? Perhaps I want to investigate failing tests in parallel to their execution? – dzieciou Nov 22 '16 at 12:44
2

I found Test In Progression Plugin:

While executing our tests on Jenkins most of us may have faced the need of knowing which test is getting executed or if a test has failed then whats the exception. As of now many of us completely depends on the execution console for the same.

This plugin solves the said issue and present the user with a user friendly UI to look at the progress and failures if any. This plugin allows you to see how your unit tests progress during a build. It shows you the details of running, skipped and failed test-methods/test-classes of your test-suite.

It supports sequential execution for Junit and Spock based Unit test framework and support parallel execution for TestNg.

Currently supported unit test frameworks:

  • Junit
  • Spock
  • TestNg
1

Seems for JUnit, Spock and TestNG there is a plugin, for other test runners you could try:

What I have done in the past is to let each test create an entry in a database with some fields (id, testname, starttime, endtime, status) in its own test-run-id table.

  • Start test-suite: create test-run-id table
  • In the test setup() / initialize():
    • create the test db record
    • set status to RUNNING
  • Run the test
  • In the cleanUp() / tearDown():
    • set endtime
    • update status to PASS or FAIL

Now you can query the db to only see which tests are running.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.