Question

I am running tests through Jenkins on a windows box. In my "Execute Windows Batch command" portion of the project configuration I have the following command:

nosetests --nocapture --with-xunitmp --eval-attr "%APPLICATION% and priority<=%PRIORITY% and smoketest and not dev" --processes=4 --process-timeout=2000

The post build actions have "Publish JUnit test result report" with the Test report XMLs path being: trunk\automation\selenium\src\nosetests.xml

When I do a test run, the nosetests.xml file is created, however it is empty, and I am not getting any Test Results for the build.

I am not really sure what is wrong here.

EDIT 1

I ran the tests with just --with-xunit and REM'd out the --processes and got test results. Does anyone of problems with xunitmp not working with a Windows environment?

EDIT 2

I unstalled an reinstalled nose and nose_xunitmp to no avail.

Was it helpful?

Solution 2

Apparently the problem is indeed Windows and how it handles threads. We attempted several tests outside of our Windows Jenkins server and they do not work either. Stupid Windows.

OTHER TIPS

The nosetest plugin for parallelizing tests and plugin for producing xml output are incompatible. Enabling them at the same time will produce the exact result you got.

If you want to keep using nosetest, you need to execute tests sequentially or find other means of parallelizing them (e.g. by executing multiple parallel nosetest commands (which is what I do at work.))

Alternatively you can use another test runner like nose2 or py.test which do not have this limitation.

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