0

I have multiple specs so i created a suite for different specs. Let's take the below scenario.

this is my suite structure in the conf file.

 suites:{
    forms:['specs/requestE.js'],
    search:['specs/findaSpec.js'],
    offers:['specs/offersPrograms.js','specs/destinationsSpec.js'],
    headerfooterlinks:['specs/footerlinksSpec.js','specs/headerMenuSpec.js']

},

When I run each spec individually it works correctly and generates the test results, but when I run the whole suite only the first one is working, others are not getting executed. As a result it gives timeout error.

Visal Varghese
  • 436
  • 5
  • 14
  • Please show the `specs` in your protractor conf.js if you config it and the cmd you used to execute running. – yong May 15 '18 at 13:16
  • protractor protractor_conf.js --suite offers [this is just a collection of suite] @yong – Visal Varghese May 15 '18 at 13:26
  • did you config `specs` in your protractor_conf.js? Try `protractor protractor_conf.js --suite=offers` – yong May 15 '18 at 13:36
  • yes, I did, but it didn't work – Visal Varghese May 15 '18 at 15:54
  • @yong i don't why it's behaving like this, I also tried quitting the driver instance inside the afterAll function, but didn't work out. – Visal Varghese May 15 '18 at 16:47
  • Pleas show the `specs/offersPrograms.js` and `specs/destinationsSpec.js`, If you put `specs/destinationsSpec.js` before `specs/offersPrograms.js` in suite: `offers`, I guess only ``specs/destinationsSpec.js` will be executed, please try and tell me the result. – yong May 16 '18 at 01:02
  • Please show the timeout error message and you can see it can match one situation list in http://www.protractortest.org/#/timeouts – yong May 17 '18 at 02:11

1 Answers1

1

Do you have any test cases in first spec with fit('', function(){}) instead of it('', function(){}) ?

if thats the case, it'll just execute one spec while ignoring the rest

Avinash
  • 188
  • 5
  • fit('') executes only that block of it. I use it to debug the tests/run a single test in the spec. what ive noticed is, if i run the entire suite, it'll just run that one particular spec and skips the others – Avinash May 18 '18 at 10:23