Signalr与oracle10g,How to use Eunit:test() generate a xml file which include some compling info

问题

I have some erlang file(.erl).And I compile them. Now I want to use some function to generate a xml which is about the compling info of these files.

Here is a address,

http://www.erlang.org/doc/apps/eunit/eunit.pdf

In this pdf,There is a function eunit:test/2 which can generate a xml file.

eunit:test([fib, eunit_examples],

[{report,{eunit_surefire,[{dir,"."}]}}]).

But i don't know these parameters represent. I just know fib = modulename dir = generate location.What about eunit_examples? ,report? ,eunit_surefire?

回答1:

I'm not really sure this is the function you are looking for. Eunit is a testing framework, and thus the function

eunit:test(...).

will give you information about any testing functions you have written within the modules.

If indeed you are looking to generate reports on those tests, in XML format, you simply use the form:

eunit:test([MODULES], [{report, {eunit_surefire, [{dir, "."}]}}]).

where MODULES is a list of any modules you want to do testing of, and everything else stays the same (for example, fib and eunit_examples are the two modules that are being tested in the example you gave.)

The report atom says that you want to generate a report, and the eunit_surefire atom says what format to generate the report with. I'm not sure there are any other ways to generate the reports with XML besides using eunit_surefire.

来源:https://stackoverflow.com/questions/7720919/how-to-use-eunittest-generate-a-xml-file-which-include-some-compling-info

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值