我有一个spec列表,并在conf.js文件的套件中指定了它们。
let SpecReporter = require('D:/Pro_ENT/jasmine-spec-reporter ').SpecReporter;
exports.config = {
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
silent: true,
defaultTimeoutInterval: 360000,
print: function() {}
},
specs: ['customConfig.js'],
suites: {
article: ['customConfig.js', 'D:/Pro_ENT/Article/Article_spec.js'],
gallery: ['customConfig.js', 'D:/Pro_ENT/Gallery/gallery_spec.js'],
homepage: ['customConfig.js', 'D:/Pro_ENT/Homepage/Homepage_spec.js'],
section: ['customConfig.js', 'D:/Pro_ENT/Section/section_spec.js'],
tag: ['customConfig.js', 'D:/Pro_ENT/Tag/tag_spec.js']
},
capabilities: {
browserName: 'chrome',
'chromeOptions': {
args: ['--test-type', '--start-maximized']
}
},
onPrepare: function() {
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: true
},
summary: {
displayDuration: false
}
}));
}
};

当我使用protractor conf.js --suite article,gallery,homepage,section,tag
命令运行测试时,它开始加载文章的URL并且不执行文章测试,其加载库URL并开始执行库中文章的测试。任何人都可以帮我找到解决方案。
我甚至创建了套件,将其命名为“smoketest”'将所有规范放在该套件中并使用此命令执行protractor conf.js --suite smoketest
我仍面临同样的问题。