Ranorex 5.2.2
My cross browser test cases are set up as follows. The top level test case opens the application in the browser. This test case is data driven and the browser is entered as a variable. All subsequent tests are nested under this open browser test case.
The issue with this approach, is that when a Test Configuration, which only includes a small number of test cases, is run, the test run opens the browser again, even when the browser is open and I don't want it to open again.
Is there a better way to nest cross browser test cases?
One approach I have been considering is creating a top level test case, which in itself does nothing. Then nesting all other test cases, including the open browser one, underneath it. Is there anything wrong with that approach?
Thanks!
Best way to nest Test Cases for Cross Browser testing?
-
- Certified Professional
- Posts: 74
- Joined: Mon Aug 14, 2006 7:17 pm
- Location: CH
Re: Best way to nest Test Cases for Cross Browser testing?
Hi Fargal,
Put your open browser script into the setup section. You can activate Setup / Teardown, by right click the test suite. Then the script will be executed only once.
Cheers
Dan
Put your open browser script into the setup section. You can activate Setup / Teardown, by right click the test suite. Then the script will be executed only once.
Cheers
Dan
Re: Best way to nest Test Cases for Cross Browser testing?
Your test suite should look like this:
Using Setup/Teardown won't help because the Setup/Teardown is still run for each iteration of the test case, or only once for the suite. Setup/Teardown only does one thing: it makes Ranorex execute those modules every time, regardless of errors or other issues.
You can put the Open Browser and Close Browser modules in Setup/Teardown (respectively) if you want, but they still need to be structure the way I did it above.
Code: Select all
Suite
--TestCase1 -> Browser List
----Open Browser Module
----TestCase2 -> Other data
------Other Modules
----Close Browser Module
You can put the Open Browser and Close Browser modules in Setup/Teardown (respectively) if you want, but they still need to be structure the way I did it above.
Shortcuts usually aren't...
-
- Certified Professional
- Posts: 74
- Joined: Mon Aug 14, 2006 7:17 pm
- Location: CH
Re: Best way to nest Test Cases for Cross Browser testing?
Hi Krstcs,
I won't unfriendly
, but I'm not completely agree with you or did I understand test case wrong?.
But the setup and tear down will be only called once. Even if you work with iterations.
I made small example, I will attach it to this post.
Regards
Dan
I won't unfriendly

But the setup and tear down will be only called once. Even if you work with iterations.
I made small example, I will attach it to this post.
Regards
Dan
You do not have the required permissions to view the files attached to this post.
Re: Best way to nest Test Cases for Cross Browser testing?
There are Setup/Teardown sections in EACH Test Case AND in the Suite.
The Suite Setup/Teardown will only be run once.
But the Test Case Setup/Teardown will be run for EVERY iteration.
Fergal needs to open multiple browsers, so he has to do it the way I put in my previous post.
The Suite Setup/Teardown will only be run once.
But the Test Case Setup/Teardown will be run for EVERY iteration.
Fergal needs to open multiple browsers, so he has to do it the way I put in my previous post.
Shortcuts usually aren't...
-
- Certified Professional
- Posts: 74
- Joined: Mon Aug 14, 2006 7:17 pm
- Location: CH
Re: Best way to nest Test Cases for Cross Browser testing?
Hi krstcs,
Sorry, but I didn't know at all, that you also can set a setup and tear down section at a test case level.
And I learned something in Ranorex
Cheers
Dan
Sorry, but I didn't know at all, that you also can set a setup and tear down section at a test case level.
And I learned something in Ranorex

Cheers
Dan
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: Best way to nest Test Cases for Cross Browser testing?
Thanks CookieMonster and krstcs for your helpful replies. I will update my cross browser test suites accordingly and reply back if I have any questions.