0

I see that when pytest xdist plugin is used to run tests on jenkins, the test results are printed on the jenkins console only after all the tests finish executing. Until all the tests finish, all i see is a spinner. enter image description here

Where as when run the tests on jenkins without using the xdist plugin, the results are printed in real time, as and when a test is passed/failed.

Is there a way to get the test results in real time when xdist plugin is used?

sridhar249
  • 4,471
  • 6
  • 26
  • 27
  • Try to run it with `PYTHONUNBUFFERED` environment variable - `PYTHONUNBUFFERED=1 pytest ...` – Piotr Dawidiuk Jan 19 '17 at 22:05
  • @PiotrDawidiuk that did not help. Actually, when i run the tests locally on my machine from command line, with or with out PYTHONUNBUFFERED=1, i see the test results as and when the tests pass/fail, without having to wait for all tests to finish. I see the problem only when run on jenkins. – sridhar249 Jan 26 '17 at 19:59
  • @sridhar247 check this out http://stackoverflow.com/questions/11631951/jenkins-console-output-not-in-realtime – Piotr Dawidiuk Jan 26 '17 at 20:35
  • it looks promising: http://stackoverflow.com/a/26310484/3866610 – Piotr Dawidiuk Jan 26 '17 at 20:38

0 Answers0