带硒网格的量角器
Protractor with selenium grid
有人可以建议如何设置量角器以远程 运行 测试吗?
我的protractor.conf.js:
exports.config = {
chromeOnly: true,
chromeDriver: '../node_modules/.bin/chromedriver',
framework: 'jasmine2',
capabilities: {
'browserName': 'chrome',
shardTestFiles: true,
maxInstances: 3
},
specs: ['../e2e/protractor/spec/*.js'],
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
},
jasmineNodeOpts: {
isVerbose: true
},
onPrepare: function () {
global.dv = browser.driver;
browser.ignoreSynchronization = true;
},
seleniumServerJar: '../node_modules/selenium-server/lib/runner/selenium-server-standalone-2.47.1.jar',
baseUrl: 'www.google.com'
};
我的protractor.json:
{
"options": {
"configFile": "./config/protractor.conf.js",
"noColor": false,
"args": {},
"webdriverManagerUpdate": true
},
"e2e": {
"options": {
"keepAlive": false
}
},
"continuous": {
"options": {
"keepAlive": true
}
}
}
目前,我 运行 通过命令 protractor protractor.conf.js
从 ./config 位置进行本地测试。
我已经用虚拟机和主机配置了 selenium 网格。还有我将用来连接主机的 IP 地址。
您只需在 protractor.conf.js 或您的 grunt/gulp 跑步者中设置 seleniumAddress: 'http://<IP>:4444/wd/hub',
。
所有设置都在这里:
https://github.com/angular/protractor/blob/master/lib/config.ts#L89
有人可以建议如何设置量角器以远程 运行 测试吗?
我的protractor.conf.js:
exports.config = {
chromeOnly: true,
chromeDriver: '../node_modules/.bin/chromedriver',
framework: 'jasmine2',
capabilities: {
'browserName': 'chrome',
shardTestFiles: true,
maxInstances: 3
},
specs: ['../e2e/protractor/spec/*.js'],
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
},
jasmineNodeOpts: {
isVerbose: true
},
onPrepare: function () {
global.dv = browser.driver;
browser.ignoreSynchronization = true;
},
seleniumServerJar: '../node_modules/selenium-server/lib/runner/selenium-server-standalone-2.47.1.jar',
baseUrl: 'www.google.com'
};
我的protractor.json:
{
"options": {
"configFile": "./config/protractor.conf.js",
"noColor": false,
"args": {},
"webdriverManagerUpdate": true
},
"e2e": {
"options": {
"keepAlive": false
}
},
"continuous": {
"options": {
"keepAlive": true
}
}
}
目前,我 运行 通过命令 protractor protractor.conf.js
从 ./config 位置进行本地测试。
我已经用虚拟机和主机配置了 selenium 网格。还有我将用来连接主机的 IP 地址。
您只需在 protractor.conf.js 或您的 grunt/gulp 跑步者中设置 seleniumAddress: 'http://<IP>:4444/wd/hub',
。
所有设置都在这里: https://github.com/angular/protractor/blob/master/lib/config.ts#L89