Casperjs 1.1 does not generate XUnit xml file

守給你的承諾、 提交于 2019-12-24 11:47:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!