When executing a test suite collection in sequential mode, I would like in some cases to use the same browser instance when executing all my different test suites. Currently, each time a test suite is booted, a new browser instance is started.
How would it be possible to share same browser instance ?
- Test Case: “Login”: Open Browser ()=> Login and so on.
- Test Case: “Something after login”: click here and there.
and then I have many of these:
- Test Suite: “Something beautiful”:
— Test case “Login”;
— Test case “Something after login”;
— Test case “Another one test case and so on…”
and then I have also:
- Test Suite Collection: “All my test suite!”
— Test suite: “Something beautiful”
— Test suite: “Another one test suite and so on…”
What I need (and what the author of the question needs I think) is that in my Test Suite Collection I can avoid every time the “Login” step (which is in every Test Suite).
Maybe also with an “if (GlobalVariable.skip_login)”.
Today also if I do one Test Suite with just “Open Browser” action the browser close itself after that step and reopen itself for the next step in Test Suite Collection.
In that case, you can have a test suite call ‘Open Browser’ test case only which will always execute first. Other test suites beyond it don’t need to have ‘Open Browser’ step so that they can re-use the same browser instance from the first test suite.
I have used “Open Browser” command in first test suite only. But still i am facing the issue like second test suite are always try to open new window or session. But i want to open the same browser only rather than it took always new window. Could you please assist me?