Example Data Source
Address
Add1
Add2
Add3
Add4
Add5
Test Suite
TC1 -
Module 1
Module 2
The Data Source has 5 rows, Add1 - Add5. Is it possible to set up the test suite, so that when TC1 is run:
Module 1 is run with two iterations using Add1 and Add2 and
Module 2 is run with two iterations using Add3 and Add4?
How can this be done?
Thanks!
Data Binding and Different Module Iterations?
Re: Data Binding and Different Module Iterations?
Hi Fergal,
In my opinion, the easiest way to achieve what you want is to put Module1 and Module2 into separate Test Cases, then enable or disable these test cases based of the actual data connector iteration.
So basically, the structure of your test should look like this:
TC1
|_TC_Module_1
|_Module 1
|_TC_Module_2
|_Module 2
Now create a new code module and place it to setup section of TC1. Then use this code to enable/disable module1/2 based of the actual TC1 iteration:
Hope this helps?
In my opinion, the easiest way to achieve what you want is to put Module1 and Module2 into separate Test Cases, then enable or disable these test cases based of the actual data connector iteration.
So basically, the structure of your test should look like this:
TC1
|_TC_Module_1
|_Module 1
|_TC_Module_2
|_Module 2
Now create a new code module and place it to setup section of TC1. Then use this code to enable/disable module1/2 based of the actual TC1 iteration:
Code: Select all
int tcIteration = TestSuite.Current.GetTestCase("TC1").DataContext.CurrentRowIndex;
if (tcIteration == 1 | tcIteration == 2)
{
TestSuite.Current.GetTestCase("TC_Module_1").Checked = true;
TestSuite.Current.GetTestCase("TC_Module_2").Checked = false;
}
else if (tcIteration == 3 | tcIteration == 4)
{
TestSuite.Current.GetTestCase("TC_Module_1").Checked = false;
TestSuite.Current.GetTestCase("TC_Module_2").Checked = true;
}
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Certified Professional
- Posts: 344
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: Data Binding and Different Module Iterations?
Thanks for your reply and helpful suggestion odklizec. I do like the idea of moving the modules into child TCs and will work on that next time I face this issue.
Thanks again!
Thanks again!