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?

4
  • Try to run it with PYTHONUNBUFFERED environment variable - PYTHONUNBUFFERED=1 pytest ... Commented Jan 19, 2017 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. Commented Jan 26, 2017 at 19:59
  • @sridhar247 check this out stackoverflow.com/questions/11631951/… Commented Jan 26, 2017 at 20:35
  • it looks promising: stackoverflow.com/a/26310484/3866610 Commented Jan 26, 2017 at 20:38

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.