0
我试图在量角器中运行一些简单的测试,并尝试生成相同的XML报告。报告生成量角器不一致
My conf file :
// An example configuration file.
exports.config = {
directConnect: true,
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
//multiCapabilities: [{
// browserName: 'firefox'
// }, {
// browserName: 'chrome'
//}],
// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['DriverScript.js'],
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.
browser.manage().timeouts().pageLoadTimeout(40000);
browser.manage().timeouts().implicitlyWait(20000);
require('jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmine.JUnitXmlReporter('xmloutput', true, true));
},
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 10000000
}
};
规格文件:
Spec file : DriverScript
var util = require('util');
describe('Bugzilla', function() {
beforeEach(function() {
browser.ignoreSynchronization = true;
browser.get('https://landfill.bugzilla.org/bugzilla-4.4-branch/index.cgi/bugzilla/');
});
var login = require('../Bugzilla/Login-pom.js');
it('Login page should be open', function() {
login.click_login();
browser.driver.sleep(10000);
login.userName();
login.password();
login.submit();
});
var bug = require('../Bugzilla/FileBug-pom.js');
it('File a Bug page should be open', function() {
bug.click_fileBug();
browser.driver.sleep(10000);
bug.widget();
browser.driver.sleep(10000);
bug.severity();
bug.hardware();
bug.os();
bug.description();
});
});
describe('Bugzilla', function() {
var search = require('../Bugzilla/search-pom.js');
it('Search page should be open', function() {
search.click_home();
browser.driver.sleep(10000);
search.click_search();
browser.driver.sleep(10000);
search.status();
search.product();
search.words();
search.submit();
browser.driver.sleep(10000);
});
});
报告是如何产生只为最近执行的测试案例,或最近失败的测试用例。
我想要为所有测试用例生成报告。