Question

I'm running a python test suite that outputs XUnit xml files (one xml per test class) which are read by jenkins. Recently the job started failing because some test classes' (always the same ones) report files are empty, here's the msg i get from Jenkins:

Test report file <file_path_and_name>.xml was length 0

Looking at the files on the server they are indeed empty but i can't find a significant difference in those tests (also the tests themselves pass if i look at the console output) that would make them emit an empty report.

has anyone encountered anything like this before? any ideas?

EDIT: here's the command i'm running the tests with :

nosetests --with-xunit --xunit-file={/.}.xml -v {}

EDIT 2: I also noticed console output there is no test class summary like this:

----------------------------------------------------------------------
XML: <Test class name>.xml
----------------------------------------------------------------------
Ran 1 test in 48.398s
Was it helpful?

Solution

Found it! we're running the nosetests with a parallel command and that one has a timeout param that is exceeded. The XML report is empty because the worker is terminated when the timeout is reached.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top