cancel
Showing results for 
Search instead for 
Did you mean: 

Any way to have an entire test run within a browser loop?

SOLVED
Highlighted
Contributor

Any way to have an entire test run within a browser loop?

i.e. I have test 1-9 that I run in order, I can put a browser loop within each case, but then the behavior is test case 1 in chrome, then test case 1 in edge, test case 2 in chrome etc. 

 

Is there a way to set up a browser loop so it runs 1-9 in chrome, then 1-9 in edge?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Any way to have an entire test run within a browser loop?

Hi,

 

it's just a matter of not wanting to have to combine all 9 cases into 1.

Then your only option is to create a test with Browser Loop parent and Script Code child.

The Script Code child should read configuration file with the list of tests/code functions to be executed and execute them via eval() or similar function.

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: Any way to have an entire test run within a browser loop?

Hi,

 

Assuming that we are talking about Keyword Tests and you have Test1-Test9 tests that should be executed within the Browser Loop:

-- Create a new test;
-- Add Browser Loop operation to it;

-- Add Test1-Test9 tests below Browser Loop operation;

-- Select added Test1-Test9 and indent them so that they appear to be children of the Browser Loop operation.

 

Does the above work?

 

Note: Your Test1-Test9 tests must either not attempt to start any browser but just use the already running one (the one that is started by the Browser Loop operation) or include the logic that will use already running browser if it exists or start the new one. (The latter logic option will work if the given test is executed standalone but not within Browser Loop.)

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Contributor

Re: Any way to have an entire test run within a browser loop?

Thanks Alex, yes, adding them all to one test case would technically work, it's just a matter of not wanting to have to combine all 9 cases into 1. This would require any time I want any combination of tests (which I'm trying to keep dynamic) to be pasted into 1 big case. 

Highlighted
Community Hero

Re: Any way to have an entire test run within a browser loop?

Hi,

 

it's just a matter of not wanting to have to combine all 9 cases into 1.

Then your only option is to create a test with Browser Loop parent and Script Code child.

The Script Code child should read configuration file with the list of tests/code functions to be executed and execute them via eval() or similar function.

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors