I've splitted my project from one huge test to a few smaller to speed up tests and avoid some errors. Is there any way to run all of them parallel with single conf file? I must pass through login.js before every testcase specs: ['login.js', 'test1.js'],
Asked
Active
Viewed 302 times
0
-
Hope it helps you – Madhan Raj Mar 07 '19 at 10:05
-
Do you have multiple describe blocks in any of your new tests? – DublinDev Mar 07 '19 at 16:33
-
@DublinDev yes, every test is splited - describe blocks for main menu, adding, viewing, cloning and deleting, then every describe is splited to it blocks containing expects – CzescTuSlawomr Mar 08 '19 at 11:55
-
@Madhan thx, but i can't disable login to site, so i must then paste this login spec to my every new spec file to work it properly? – CzescTuSlawomr Mar 08 '19 at 11:55
-
@CzescTuSlawomr Create suite and run them in separate browsers. Refer https://stackoverflow.com/questions/30331018/suites-vs-specs-protractor – Madhan Raj Mar 08 '19 at 13:58
1 Answers
0
I suggest changing your login.js spec into a file which exports a login function. Then create a beforeAll in your onPrepare in your conf. This will be executed before every describe block, which in your case is every test.
onPrepare: function {
beforeAll(function(){
loginToApp();
});
};
I know you have already split up the files but I would seriously consider using the page object model to structure your tests if you have the time.

DublinDev
- 2,318
- 2
- 8
- 31