Search code examples
xmlunit-testingerlanghudsoneunit

How to integrate erlang unit tests in hudson?


I spent a bit time on this work item ( here , I called it work item ).--- How to integrate the erlang unit test in hudson?

after doing some research, I felt I found the way to resolve this:

  1. basically, write the unit test code in erl files. (using eunit )
  2. after compiling the project. generate the unit test result xml using reabr ( here, better to outside of erlang shell) . for example, by command "erl -pa dir -noshell -run module test ......"
  3. pass back the xml file , and let hudson reference to the xml file. (I found I block at here . not clear how to parse the xml file in hudson . do I need to install some other plugin in order to parse the xml generate by eunit ?)

the exports who view this question, please , please give some suggestions about these steps or show the sensible way to me.

Thanks a lot :)


Solution

  • In the Hudson/Jenkins configuration, under "Post-build actions", check "Publish JUnit test result report" and specify the file names. This plugin, which is installed by default, understands the XML files created by eunit/rebar.