protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Running multiple protractor tests via Grunt??

Open DivsBellur opened this issue 12 years ago • 3 comments

Hello, I would like to run multiple protractor tests via Grunt. Here is how my setup is: I have test dir with test1Spec.js, test2Spec.js, …., testnSpec.js

I have a configuration file protractorIntegrationTestsConf.js with specs listed like this: specs: [ '../src/test/integration/test1Spec.js', '../src/test/integration/test2Spec.js', '../src/test/integration/test3Spec.js', . . . '../src/test/integration/testnSpec.js' ],

And, my Gruntfile.js has the following protractor task in it protractor: { options: { configFile: "config/protractorIntegrationTestsConf.js", keepAlive: false, noColor: false, singleRun: false, }, run_chrome: { options: { args: { browser: "chrome" } } }, run_firefox: { options: { args: { browser: "firefox" } } }, run_phantomjs: { options: { args: { browser: "phantomjs" } } } },

When I run my protractor config file with just protractor all the specs get run in sequence they are listed in config file, but when I try to run it via grunt, all the tests start running simultaneously and the grunt build fails. What is that I am doing wrong here in my setup? Can someone please help me?

Thanks, Divya

DivsBellur avatar Feb 06 '14 17:02 DivsBellur

Looks like you're using grunt-protractor-runner. You should submit this question there or on github. (https://github.com/teerapap/grunt-protractor-runner)

juliemr avatar Feb 06 '14 19:02 juliemr

Ok Thanks!!

DivsBellur avatar Feb 06 '14 19:02 DivsBellur

@DivyaAshok ,

Thanks for sample. I have same requirement. But not running in sequence. Its running first one and shows errors for second spec. Please advice me. Thanks

specs: [ './mcac_jm_online_NRE_flow.js', './mcac_jm_online_RTE_flow.js' ],

reddynr avatar Dec 16 '16 20:12 reddynr