jasmine.JUnitXmlReporter报表可视化工具

jasmine.JUnitXmlReporter报表可视化工具,junit,jasmine,protractor,Junit,Jasmine,Protractor,我在运行量角器测试后生成了这个xml <?xml version="1.0" encoding="UTF-8" ?> <testsuites> <testsuite name="Spring Webapp Homepage" errors="0" tests="3" failures="0" time="1.508" timestamp="2014-02-14T15:23:27"> <testcase classname="Spring Webapp

我在运行量角器测试后生成了这个xml

<?xml version="1.0" encoding="UTF-8" ?>
<testsuites>
<testsuite name="Spring Webapp Homepage" errors="0" tests="3" failures="0" time="1.508" timestamp="2014-02-14T15:23:27">
  <testcase classname="Spring Webapp Homepage" name="should get title" time="1.309"></testcase>
  <testcase classname="Spring Webapp Homepage" name="Test Header" time="0.098"></testcase>
  <testcase classname="Spring Webapp Homepage" name="Test Simple Button" time="0.101"></testcase>
</testsuite>
</testsuites>

有没有一种方法可以在浏览器中可视化这些报告,从而比原始XML更优雅地呈现它们?

您可以使用xUnit html解析器将XML文件转换为html文件:请看这里 然后可以将teansformation集成到构建文件中

有没有一种方法可以在浏览器中可视化这些报告,从而比原始XML更优雅地呈现它们

事实上有

注意xsltproc出现在MacOSX小牛上

看看

更新:我正在使用


感谢这个anwser,我成功地在一个文件上获得了Junit报告,但是我无法安装您在Github中提到的execSync,我得到了这个错误:gyp.js“rebuild gyp ERR!configure error gyp ERR!stack error:找不到Python可执行文件“Python”,您可以在failNoPython上设置P HON env变量.gyp ERR!stack(C:\Program Files\nodejs\node\u modules\npm\n e\u modules\node gyp\lib\configure.js:101:14)gyp ERR!堆栈位于C:\Program Files\nodejs\node\u modules\npm\node\u modules\no-gyp\lib\configure.js:64:11 gyp ERR!堆栈位于Object.oncomplete(fs.js:107:15)我看到它在我的Ubuntu 13.04上编译了一堆东西,对于Windows你需要做一些额外的工作,看:BTW,你是否在Windows上安装了XSLTPROC?这是运行这些的另一个依赖项。我现在面临的问题是安装ExcScReC。我得到了与错误相关的C++编译器。将其放在您的环境路径中:
  onPrepare: function() {
// The require statement must be down here, since jasmine-reporters
// needs jasmine to be in the global and protractor does not guarantee
// this until inside the onPrepare function.
require('jasmine-reporters');
jasmine.getEnv().addReporter(
  new jasmine.JUnitXmlReporter('jasmine-results/xmloutput', true, true));
}
require('./jasmine.single_file_junit_reporter.js');
var junitPath = path.join('junitXMLReport/', '0001');
jasmine.getEnv().addReporter(new jasmine.singleFileJUnitXmlReporter(
    junitPath, true, true, './nosetests.xslt')
);