1

I'm trying to get tests results while the job is building. When we run tests suite by eclipse we get tests results from TestNG viewer while running the suite, I want to get the same viewer or similar in Jenkins to know the current status of the build before finish.

I mean this in TestNG Viewer: Results of running suite TestNG viewer

Thanks All :)

Nael Marwan
  • 1,030
  • 1
  • 13
  • 32
  • TestNG plugin on Jenkins does not solve the purpose ? – Chandan Nayak Mar 16 '17 at 12:55
  • You want the current state of the test during runtime, correct? The Plugin is publishing the results after the test, but can not give a status on a running test. I'm afraid this is not possible. – Christopher Mar 16 '17 at 13:02
  • Yes right I want the current state of the test during runtime. I want to stop the build in case my build is not stable. – Nael Marwan Mar 16 '17 at 14:41
  • I think that most common test runners have the option to abort the run if any tests fail — so using that would give you the desired end result. – Christopher Orr Mar 17 '17 at 11:08

1 Answers1

0

AFAIK it is not inbuilt as part of any plugin. But there are couple of options that you can try.

  1. Write results to a database in the IInvokedMethodListener after implementation. Build a ui over the database.

  2. Maintain a datastructure of results , do console out of summary(if you are the only one who needs to know the results) on jenkins in test listener or method listener of the results based on the frequency at which you need to know results. Or you can start of a parallel script which parses the consoleText either as a shell or a separate utility doing curl on the consoletext.

niharika_neo
  • 8,441
  • 1
  • 19
  • 31