1

I have a question about configuring the 'specs' parameter in the conf.js files to execute multiple protractor scripts. Does the order/ sequence of the '.js' files specified in the specs parameter matter? does it drive the sequence in which the multiple protractor scripts will be executed? I researched on this, but got mixed answers.

I read in the answer to this Stack Overflow post by Martin Blaustein that the ordering of the .js files does not matter and technically all scripts will run in parallel and not run sequentially == in the order in which they have been specified in specs.

Protractor - executing login scripts prior to launching my test specs

Thanks in advance for your inputs!

Sonia

Community
  • 1
  • 1
SoniaS
  • 13
  • 1
  • 4

2 Answers2

0

Does the order/ sequence of the '.js' files specified in the specs parameter matter?

No, it does not matter. The '.js' files which you specify(which ever order) in the specs array would be executed in lexicographical/alphabetical order.

Does it drive the sequence in which the multiple protractor scripts will be executed?

Again, as mentioned earlier since the spec files execute alphabetically if you want to run multiple protractor scripts you can make use of suites feature of protractor.

Please refer this link on how to configure the same - Suites vs Specs Protractor

Community
  • 1
  • 1
Ram Pasala
  • 4,931
  • 3
  • 16
  • 26
  • Thanks Ram for your answer. Based on my experience, the scripts do not get executed alphabetically. But I will definitely look into using the suites feature. Thanks for sharing the link! – SoniaS May 05 '17 at 15:55
0

Yes, the order/ sequence of the '.js' files specified in the specs parameter matter. Yes, it drives the sequence in which the multiple protractor scripts will be executed.

Above ordering applies only when you give a comma separated names of each your specs. In case you provide a 'com.abc.def.*.spec.js' like a pattern, it executes them in lexicographical/alphabetical order.

NotSaurabh
  • 11
  • 1
  • 1