views:

276

answers:

2

Hello,

I'm having problems setting up my Hudson server to run cpp unit tests so I can output an .xml file. I tried searching the web for some more straight forward instructions on how to set this up but still don't understand how to. It sounds like I need to set up ant to run...but how??

I'm currently running Hudson ver 1.352.

Any suggestions will be greatly appreciated.

Kat

A: 

I'm assuming you have some existing tests implemented in CppUnit that you can run by themselves. You could get these running in your Hudson job by using Ant, but since I don't think there is a CppUnit task for Ant you'd have to do it with an exec task.

It might be just as easy to call a shell script from Hudson to run your tests; you should then be able to get it to display the test results by checking the "Display JUnit test results" post-build action in your Hudson job and specifying the path to your results XML file (it's been a while, but as I remember CppUnit tests are in the same XML format as JUnit).

Let me know if I'm making any wrong assumptions.

gareth_bowles
Hi Gareth,Thank you for your reply. Your assumptions are correct. The problem I had was with my current working directory. I was trying to output the xml file to an area that I did not have permission to write to :(.I checked "Publish testing tools result report" instead and it allowed me to choose "CppUnit" as an option. And now everything is happy. :)Thanks again!Kat
kyue
Glad to help, Kat !
gareth_bowles

related questions