Hi
I would like to know how to get different values for same code modules in a test case
The scenario is like below,
Test Case 1
Test step 1 (code module1) ---- value 1
Test step2 (code module 1) ----- value 2
Here I have two steps, say adding a filter and i have to add 2 filter I would like to call the same code module twice. But the values should be different.
There is a code module variable in the code module 1. (right click and select the option "Insert Module Variable")
How do achieve this scenario, can I use data binding here?
TIA
Bimal Jose
How to get different values in code module variable
-
- Posts: 4
- Joined: Thu Mar 14, 2013 6:36 am
Re: How to get different values in code module variable
Yes, all you have to do is bind the different data columns to each instance of the test module.
How many times will you need this module to run? How many different variables?
Would it be easier to stick this module inside it's own test case and put each variable in a separate row of the data column? The test cases work like for-each loops, running all modules and child test cases once for each data row in the data connector given.
How many times will you need this module to run? How many different variables?
Would it be easier to stick this module inside it's own test case and put each variable in a separate row of the data column? The test cases work like for-each loops, running all modules and child test cases once for each data row in the data connector given.
Shortcuts usually aren't...
-
- Posts: 4
- Joined: Thu Mar 14, 2013 6:36 am
Re: How to get different values in code module variable
yes, Unfortunately this is not practical. When selecting more than 1 elements from the data column the data executed like a for-each loop. as per the above scenario, if select two variable in data column - in the first iteration value 1 applies to test step 1 and step step 2 and in second iteration value 2 applies to step 1 and step 2.
This is not the requirement. summarizing the requirement once again.
There should be only 1 iteration
each test step should have different value.
TIA
Bimal Jose
This is not the requirement. summarizing the requirement once again.
There should be only 1 iteration
each test step should have different value.
TIA
Bimal Jose
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to get different values in code module variable
Hi,
You can also use the one module twice in one test case and bind the specific variable twice, to different data columns as shown below: Regards,
Markus
You can also use the one module twice in one test case and bind the specific variable twice, to different data columns as shown below: Regards,
Markus
You do not have the required permissions to view the files attached to this post.