2016-12-06 23 views
2

我並行運行量角器規格並生成xml報告。問題是報告被覆蓋而不是整合所有規格結果。與JUnitXmlReporter並行運行量角器測試

protractor.config.js如下:

capabilities: { 
    'browserName': 'chrome', 
    shardTestFiles: true, 
    maxInstances: 5 

},

onPrepare: function() { 
var jasmineReporters = require('jasmine-reporters'); 
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({ 
    consolidateAll: true, 
    savePath: 'TestReports', 
    filePrefix: 'xmloutput', 
    consolidate: true 
})); 
}, 

任何幫助將理解!!

回答

1

你見過量角器烹飪書嗎?有一個jasmine junit reporter的例子。在這個例子中,測試被集成到一個單獨的xml文件中。

我也會刪除分片以確保分片測試不會導致問題。

+2

謝謝..但我想在分片模式下運行規格..有什麼辦法可以將報告合併到一個報告shardTestFiles設置爲true? – Rams

+0

我還沒有嘗試過。讓我知道事情的後續。 – cnishina