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 wa开发者_运维问答y to resolve this:
- basically, write the unit test code in erl files. (using eunit )
- 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 ......"
- 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 :)
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.
Jenkins/Hudson's cobertura plugin is usefull too. See rebar plugin at https://github.com/idubrov/covertool
精彩评论