Configuring xUnit test output in Hudson

Posted by graham.reeds on Stack Overflow See other posts from Stack Overflow or by graham.reeds
Published on 2010-04-27T15:10:02Z Indexed on 2010/04/27 15:13 UTC
Read the original article Hit count: 836

I have a simple PoC project in Hudson. The PoC has unit tests written via UnitTest++ and outputs the results as XML for consumption by xUnit to munge into jUnit format.

Here are the salient relevant

  • I have my project configured to use MSBuild to build the 2008 solution.
  • The project contains both the dll it is to build and the unit tests which are run as a post-build step.
  • My workspace in Hudson is set to c:\develop\money (Money is the name of the project) and in the Hudson console I can see the workspace folders, the solution file and output folders (/bin, /doc, etc).
  • The test console app outputs its file 'money_unit_tests.xml' to the folder 'reports' (making c:\develop\money\reports).
  • I've restarted Hudson since installing xUnit and setting the workspace.

However when I start Hudson building I am given the following message:

[xUnit] Starting to record.
[xUnit] [UnitTest] - Use the embedded style sheet.
[xUnit] [ERROR] - No test report file(s) were found with the pattern 'reports/money_unit_tests.xml' relative to 'C:\.hudson\jobs\Money\workspace' for the testing framework 'UnitTest'.  Did you enter a pattern relative to the correct directory?  Did you generate the result report(s) for 'UnitTest'?
[xUnit] Stopping recording.
Finished: FAILURE

Why does Hudson seem to think the workspace is in C:.hudson... and not C:\Develop...?

What can I do change it?

If I can't change it, what can I do to mitigate these changes? (I don't exactly want to hardcode the output for the xml to C:.hudson...)

© Stack Overflow or respective owner

Related posts about hudson

Related posts about xunit