Selenium 如何在GrunFile中添加量角器选项
我能够使用参数运行单个量角器测试用例:Selenium 如何在GrunFile中添加量角器选项,selenium,grep,gruntjs,protractor,Selenium,Grep,Gruntjs,Protractor,我能够使用参数运行单个量角器测试用例: protractor --specs='tests/e2e/login.js' --grep="SingleLoginTest" 我在Grunfile中有一个量角器任务: protractor: { options: { keepAlive: false, configFile: "./config/protractorConf.js" }, e2eTest: { options: { args: {
protractor --specs='tests/e2e/login.js' --grep="SingleLoginTest"
我在Grunfile中有一个量角器任务:
protractor: {
options: {
keepAlive: false,
configFile: "./config/protractorConf.js"
},
e2eTest: {
options: {
args: {
specs: ['tests/e2e/login.js'],
grep: "SingleLoginTest"
}
}
}
}
当我尝试用grunt运行它时,它会运行登录的所有测试用例
如何在grunt中添加量角器选项?它适用于我的套件: 内部配置文件:
suites: {
login: 'tests/e2e/login.js',
},
Grunfile内部:
e2eTest: {
options: {
args: {
suite: "login"
}
}
}
顺便说一句,我使用的是grunt量角器runner
我相信它也在传递参数,所以grunt e2eTest--specs='tests/e2e/login.js'
应该也能工作。我能够在Gruntfile中传递--specs选项,但不能传递grep选项。我发现我们必须在jasmineNodeOpts中传递它,而我正在使用的grunt量角器runner
不支持这一点。我可能会为它创建一个拉取请求,我有补丁。谢谢