質問

In xunit reporter of mocha, it generates the report for attributes tests, failures, skipped, error. but i want for mocha's pending, dropped and blocked reports also. is these reports are generated using xunit? can we customize the xunit reporter to generate the report which has

 pending
 dropped
 blocked

test cases report. please help me to find solution for this.

役に立ちましたか?

解決

Looks like this is a known issue and pending tests have been added to the xunit reporter.

First are you using the latest version of mocha?

https://github.com/visionmedia/mocha/pull/1051/files that pull request has been merged into the latest version of mocha and should including pending requests in xunit?

You can always fork mocha and edit lib/reporters/xunit.js and add

runner.on('dropped', function(test){
   tests.push(test);
});
runner.on('blocked', function(test){
   tests.push(test);
});

Or instead of forking mocha. Copy Xunit and make a custom mocha reporter. You can use https://github.com/startswithaj/mocha-spec-cov as a template.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top