can I run protractor tests with spec or suite name as a parameter? I'm currently running it with:
protractor myconf.js
thanks.
Yes, there is the specific --specs command-line argument:
$ protractor --help
Usage: protractor [options] [configFile]
configFile defaults to protractor.conf.js
The [options] object will override values from the config file.
Options:
--help Print Protractor help menu
--version Print Protractor version
...
--specs Comma-separated list of files to test
You would still need a config to be passed, but --specs would override the specs set in the configuration:
protractor myconf.js --specs=test/e2e/myspec.js
You can also use the --suite command-line argument:
protractor myconf.js --suite=smoke
where smoke matches the configured suite name:
suites: {
smoke: 'spec/smoketests/*.js',
full: 'spec/*.js'
},
Alternatively, if you are using jasmine2, you can make use of the "focused tests" feature by temporarily changing describe to fdescribe and/or it to fit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With