Using same browser instance when iterating through test suites of a test suite collection

Hello,

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 ?

Thanks and regards,

2 Likes

The answer above seems not correct to me.

I have this situation:

- 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.

Hi there,

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.

Thanks

Hi,

I’ve the same issue.

Is it possible to iterate trough test suite collection in the same browser instance. Avoid the browser to close after each test suite ?

Regards

7 Likes

Hi,

I am also facing this issue. Someone can check this please

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?

@dhamodharan.ravichan

I am not able to see the settings for :

Terminate drivers after each Test Case
Terminate drivers after each Test Suite

can you tell me step by step process to set this up ? I am really struggling with this …

  1. Click Project menu bar option or use shortcut (Ctrl + Alt + S) and skip to step 3.
  2. Click the Settings drop down item.
  3. Click the Execution sidebar item to open the corresponding settings.
  4. Un-tick both Terminate driver settings.