protractor icon indicating copy to clipboard operation
protractor copied to clipboard

feat(runner): allow protractor to restart browser between suites

Open elgalu opened this issue 11 years ago • 7 comments

restartBrowserBetweenTests config option after #1634 is very cool, it would be nice to have the same feature but per suite level, e.g. restartBrowserBetweenSuites: true.

That won't slow down tests considerable given suites tend to group a few spec files.

elgalu avatar Dec 16 '14 23:12 elgalu

I really feel like this is one of those cases where you should just have two different configuration files. I think it would overcomplicate the configuration files.

juliemr avatar Dec 17 '14 18:12 juliemr

Tentatively closing this issue to be consistent with other config feature issues I've been closing. Please continue to discuss though - I'm open to being convinced.

juliemr avatar Dec 17 '14 18:12 juliemr

Just want to know whether this request has been implemented.

pavangkumar avatar Oct 06 '15 10:10 pavangkumar

Instead of fixating on "config features", just make the function available to tests. #2685

avdd avatar Nov 07 '15 00:11 avdd

Is this feature implemented? Is there any alternate solution to restart browser between test suites.

kpalusa avatar Dec 02 '15 13:12 kpalusa

Hello Julie,

I've got a project where I have two test suites - one is to test the functionality of things like logging into the system, registering fresh user and the other one is for booking some tickets in our system. I have a jenkins job which specifies that we'll run --suites=a,b so one after another and got that hooked with browserstack. Thing is when a finishes then it just goes straight into b without a browser restart.

I would hardcode a browser.restart() somewhere in b but the thing is I also need to occasionally run these suites separately.

Other thing is that I use mocks for registration so that I'm not registering a new user in the database each time the test runs and in this case something weird happens when I run two suites one after another - the mocks don't tend to work for b if it's run after a. Maybe it's because I'm initializing my mocks in beforeAll of b. If it's reversed (run b then run a) then all is ok as well as when I run each of those suites separately.

Yeah so something like restartBetweenSuites would be nice in my case.

ArturKwiatkowski avatar May 30 '16 12:05 ArturKwiatkowski

yes restartBrowserBetweenTests does not help much, on the other hand, restartBetweenSuites would be very useful, is there a workaround for restarting browser between suites?

rpothugunta avatar Mar 28 '17 09:03 rpothugunta