我正在使用yeoman来设置我的angularjs应用程序,并使用grunt
作为我的任务运行器。
我尝试通过grunt serve
命令
使用protractor传递baseurl和我的gruntfile如下所示:
grunt.initConfig({
// Project settings
yeoman: appConfig,
protractor: {
options: {
configFile: "node_modules/protractor/example/conf.js", // Default config file
keepAlive: true, // If false, the grunt process stops when the test fails.
noColor: false, // If true, protractor will not use colors in its output.
args: {
baseUrl: grunt.option('baseUrl', 'http://localhost:80/')
}
},
your_target: { // Grunt requires at least one target to run so you can simply put 'all: {}' here too.
options: {
configFile: "e2e.conf.js", // Target-specific config file
args: {} // Target-specific arguments
}
},
},
....
}
grunt serve protractor --baseUrl=http://localhost:8080
如何获取通过上述命令作为参数传递的服务的基本URL?