Hi,
I am trying to run multiple specs that are defined in the config.js file.
specs: ['folder1/test1.spec.js', 'folder2/test1.spec.js', 'folder2/test2.spec.js']
When I run this, one browser window opens and it starts the first test, but then without finishing the first test, it will start the second.
Is there some option that makes sure that the test will start when the other test is finished? Or am I doing something wrong here?
Thanks in advance!
How do you know it's starting the second test without finishing the first? What is the output that you are seeing?
Protractor should automatically wait for a test to finish before starting the next one. It queues all requests and then runs them in series.
I can see the URL in the browser window change to an address that is not used within the first test.
What framework are you using? (Jasmine, Mocha?) If you just include one spec file, does that complete as expected?
We found what the problem was. I was using the Jasmine framework. The problem was that we were initializing some pages (and opening the with browser.get()) inside the describe block. Since the framework puts all the things that are in the describe block inside the global scope, all the pages got initialized at the start of the run. To solve it, we put the initialization of the page objects into an 'it' block.
I have to run two senerios using protractor. config.js I given two of the spec name. But not running second one. here is the sample. Please advice. Thanks
config.js
specs: ['mcac_jm_online_NRE_flow.js','mcac_jm_online_RTE_flow.js'],
Hi,
Is it possible to include the 2nd file in the end of 1st test file ?
Like with coding in asp or php we can transfer execution to other file can this be done with jasmine
specs: ['sendmsg.ts']
sendmsg.ts
describe(){
it (){
run case
}
call readmsg.ts;
}
Thanks
Most helpful comment
We found what the problem was. I was using the Jasmine framework. The problem was that we were initializing some pages (and opening the with browser.get()) inside the describe block. Since the framework puts all the things that are in the describe block inside the global scope, all the pages got initialized at the start of the run. To solve it, we put the initialization of the page objects into an 'it' block.