2

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 :)

razlebe
  • 7,134
  • 6
  • 42
  • 57
user477928
  • 61
  • 2
  • 6

2 Answers2

5

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.

legoscia
  • 39,593
  • 22
  • 116
  • 167
  • 1 , write ur unit test code in .erl file 2 , generate the xml file by using the header file of eunit . 3 . parse the xml file with the plugin "Junit" – user477928 Nov 01 '11 at 07:01
1

Jenkins/Hudson's cobertura plugin is usefull too. See rebar plugin at https://github.com/idubrov/covertool

shino
  • 839
  • 5
  • 9