First attempt at using Protractor. I would like to be able to run multiple suites in succession. I have an application that is one big angular form with different scenarios. I have expected results for each scenario and would like to enter one command and run through each test. I thought I could just use comma separated like:
第一次尝试使用量角器。我希望能够连续运行多个套件。我有一个应用是一个大的角度形式,有不同的场景。我期望每个场景都有结果,并希望输入一个命令并在每个测试中运行。我想我可以用逗号分隔,比如:
protractor config.js --suite=rf1_breast, rf1_ovarian, rf1_pancreatic
But I am getting the error:
但我得到了一个错误:
Error: more than one config file specified
错误:指定了多个配置文件
Which is strange as there is only the one config file which is in the directory where I am running protractor.
这很奇怪,因为在我运行量角器的目录中只有一个配置文件。
Here is my config.js:
这是我config.js:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: { 'browserName': 'chrome' },
framework: 'jasmine2',
suites: {
rf1_breast: './rf1-ashkenazi-hboc/Breast/specs/*_spec.js',
rf1_ovarian: './rf1-ashkenazi-hboc/Ovarian/specs/*_spec.js',
rf1_bladder_fail: './rf1-ashkenazi-hboc/Bladder-expected-fail/specs/*_spec.js',
rf1_pancreatic: './rf1-ashkenazi-hboc/Pancreatic/specs/*_spec.js',
rf1_prostate: './rf1-ashkenazi-hboc/Prostate/specs/*_spec.js'
},
onPrepare: function() {
/* global angular: false, browser: false, jasmine: false */
browser.manage().window().setSize(1600, 1600);
// Disable animations so e2e tests run more quickly
var disableNgAnimate = function() {
angular.module('disableNgAnimate', []).run(['$animate', function($animate) {
$animate.enabled(false);
}]);
};
browser.addMockModule('disableNgAnimate', disableNgAnimate);
},
jasmineNodeOpts: { showColors: true }
};
Is there a better way around getting each scenario run?
是否有更好的方法来运行每个场景?
1 个解决方案
#1
18
Don't put spaces after commas:
不要在逗号后面加空格:
protractor config.js --suite rf1_breast,rf1_ovarian,rf1_pancreatic
#1
18
Don't put spaces after commas:
不要在逗号后面加空格:
protractor config.js --suite rf1_breast,rf1_ovarian,rf1_pancreatic