unable to get Hudson to run unit tests

Stefan Behnel stefan_ml at behnel.de
Tue May 11 11:11:50 EDT 2010


j vickroy, 11.05.2010 16:46:
 > Stefan Behnel wrote:
>> No, what Hudson actually does, is, it writes your command(s) into a
>> text file and runs it with the system's shell interpreter (which,
>> unless otherwise configured, is "cmd.exe" on Windows).
>
> This is not the behavior I am experiencing on my Windows XP Pro (Service
> Pack 3) workstation.

Then setting the "Shell executable" to "cmd.exe" will do the right thing here.


>> This assures the highest
>> possible compatibility with the executed script. You can even use the
>> shebang in Hudson's scripts that way, so that you can execute scripts
>> in basically any scripting language.

... although the shebang isn't really supported by cmd.exe, I guess ...


>> The likely reason why it doesn't find your test results is that you
>> didn't tell it where to look.
>
> Actually, Hudson is not finding the tests results because they are not
> being generated. There is no "nosetests.xml" file anywhere on my hard
> drive

That's why I told you to configure nosetest to use an specific output path 
for the unit test file.


> Thanks again for your continued interest. I quickly got Hudson to
> retrieve job source from our subversion repository so I thought it would
> be equally easy to get Hudson to run the unit tests, but that has proven
> to be difficult, and so far I do not know how to diagnose this since it
> seems there is no way to prevent Hudson from immediately deleting the
> temporary scripts it generates.

Which is ok, since it prints what it does during the script execution, and 
the scripts contain nothing more than what you typed in.

Does nosetest produce an XML file when you call it manually from the 
command line? Is nosetest.exe in your PATH, so that the cmd.exe that Hudson 
starts can find it?

Personally, I'd always step into the target directory before running a 
command, so I'd make the script

     cd level-1
     nosetest.exe ...

Stefan




More information about the Python-list mailing list