2

I need to run the unit testing with rebar , after executing , I need generate the test result xml file.

I know , by default , rebar can generate html file. 1. Is there some parameters to control the rebar to loading the unit testing result in xml ? or some other way to make xml file by rebar ?

not limit in rebar,,,,,,,,,,,,,,,,,,,,, or using some other test tool to run the eunit test, meanwhile , generate the xml file .

for example , in .Net after compiling , we can use MSTest.exe , Nunit.exe(or other tool) to schedule the testing, getting trx file by MSTest.exe , getting xml file Nunit file by Nunit.exe

here , I want to know,

2.is there some tools to run the unit test and loading the result into xml like these ways ?

Thanks a lot!

user477928
  • 61
  • 2
  • 6
  • See also http://stackoverflow.com/questions/7720919/how-to-use-eunittest-generate-a-xml-file-which-include-some-compling-info and http://stackoverflow.com/questions/11027351/getting-test-results-from-eunit-in-erlang . – legoscia Jul 18 '12 at 15:27

1 Answers1

3

Assuming you are using eunit, put {eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]}. into your rebar.config. This generates a surefire compatible xml output that is parseable by a number of plugins and tools.

Nialscorva
  • 2,924
  • 2
  • 15
  • 16