feat(runner): allow protractor to restart browser between suites
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.
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.
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.
Just want to know whether this request has been implemented.
Instead of fixating on "config features", just make the function available to tests. #2685
Is this feature implemented? Is there any alternate solution to restart browser between test suites.
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.
yes restartBrowserBetweenTests does not help much, on the other hand, restartBetweenSuites would be very useful, is there a workaround for restarting browser between suites?