views:

460

answers:

2

I am using Hudson for continuous integration in out project. We are using python, git and nose tests for unit testing. What I need is that Hudson should execute nose tests after every build. For that I have added following shell scripts in under execute shell section.

$ nosetests /sub/test_sample1.py
$ nosetests /sub/test_sample2.py
$ nosetests /sub/test_sample3.py

...

Hudson is executing this scripts correctly. But the problem is that in case of any of the test scripts fails here that it won't run other scripts next to it. It stops after first error. I want it should keep on executing all test cases. How can I do this?

A: 

It would seem you cannot make Hudson not fail fast. However, you can certainly create one uber-script that will run all those tests regardless of whether they fail or not, and in the end succeed only they all succeeded.

Tuure Laurinolli
A: 

For my own project, I wrote a fabric python files that manage all the unit testing. Since I am using django, I have django incorporate with nose and coverage.

Here are my part of my scripts:

local('%(local_virtual_env)s/Scripts/activate.bat'
      ' & cd %(local_project_path)s/configs/common'
      ' & python manage.py test test1 ' 
      '--settings=myprofile.configs.local.settings_local '
      '--with-coverage --with-xunit --with-xcoverage '
      '--cover-tests --cover-erase --cover-inclusive '
      '--cover-package=myprofile.apps' % env,
      capture=False)
Tao