问题
I am running CasperJS tests. I tried to generate xUnit xml file in output rendering. But this fails when ever a single FAILure occurs. Actually the executing stopped when a single FAIL occurs.
Here is the script that I am working on
casper.test.begin('Site login', '', function suite(test) {
casper.start(mysite, function () {
test.assertExists('form#index', "Login Form found"); //Pass
test.assertExists('form#index1', "Login Form found"); //Fail
});
casper.run(function (){
test.done();
test.renderResults(true, 0, 'test1.xml');
});
});
回答1:
Try using casperjs test with the --xunit=<filename>
option.
来源:https://stackoverflow.com/questions/15363182/casperjs-1-1-does-not-generate-xunit-xml-file