I want to execute the test where I can specify the browsername, environement name, suite name in execution command as follows protractor conf.js browser=chrome env=staging suite=smoke
Is that possible with Jasmine and Protractor and Can any one show me how to achieve that?
To pass parameters to protractor, use --params.cmdVar ="cmdVar"
and again use it as above using browser.params.cmdVar
Protractor has default feature where you are allowed to pass some parameters from command line. For e.g.
protractor conf.js --baseUrl <UrlToTest> --suite <SuiteName>
To pass some other project specific parameter, you can define that under params of config file.
params: {
env: 'someValue'
}
you can use:
protractor conf.js --baseUrl <UrlToTest> --suite <SuiteName> --params.env <EnvValue>
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