我按照here所述配置Karma与Jenkins CI配合使用。
我的as.stepfun(foo)
,junitReporter.outputFile
始终为空。
根据文档(上面链接)test-results.xml
我使用PhantomJS来运行我的测试。我没有看到任何以PhantomJS命名的子目录。
有什么想法吗?
答案 0 :(得分:0)
我最终将karma-junit-reporter
添加到我的karma.conf.js
文件中的插件中,所有内容都开始工作,如下所示:
// Which plugins to enable
plugins: [
"karma-phantomjs-launcher",
"karma-jasmine",
"karma-junit-reporter"
],
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: true,
reporters: ['progress', 'junit'],
// the default configuration
junitReporter: {
outputDir: 'test', // results will be saved as $outputDir/$browserName.xml
outputFile: 'test-results.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
suite: '', // suite will become the package name attribute in xml testsuite element
useBrowserName: true // add browser name to report and classes names
},