Dear All,
I have the following problem. I want to get the values of my global parameters from a CSV file. This is clear enough in the documentation. Suppose I have a single global paramer, let us call it param_a. My solution has many test cases inside, and they all use this param_a
I have a CSV file with
param_a
1
2
3
What I would like is that test_case_1 uses the first value (1), test_case_2 uses the second value (2) and so on.
Is this possible?
What I do NOT want is to have one execution of ALL test cases per line of the CSV (3 runs).
Is that possible?
Thanks in advance!
Bind parameter values from CSV
- giuseppe.lacagnina
- Posts: 113
- Joined: Fri Sep 18, 2015 10:25 am
- Location: Brunn am Gebirge, Vienna, Austria
Re: Bind parameter values from CSV
I think that you will have to create custom CSV data binding for this. I believe that you will not be able to iterate over the data column in the CSV file over multiple test cases in a single iteration.
One possiblity would be to create a module and inside that iterate all the data to be stored in variables/global parameters. And then continue on with the test cases.
So the structure would be something like this:
Test solution
-CollectDataTestCase // Iterates through the CSV data column and store data to variables/global parameters
-Testcase1
-Testcase2
-Testcase3
Regards
Martin
One possiblity would be to create a module and inside that iterate all the data to be stored in variables/global parameters. And then continue on with the test cases.
So the structure would be something like this:
Test solution
-CollectDataTestCase // Iterates through the CSV data column and store data to variables/global parameters
-Testcase1
-Testcase2
-Testcase3
Regards
Martin
- giuseppe.lacagnina
- Posts: 113
- Joined: Fri Sep 18, 2015 10:25 am
- Location: Brunn am Gebirge, Vienna, Austria
Re: Bind parameter values from CSV
Thanks, I will make some experiments and check.
Giuseppe
Giuseppe
Re: Bind parameter values from CSV
If you just want to read the values, instead of trying to put the data in global params, you could just create a wrapper test case and bind the CSV data there.
TestSuite - GlobalParams
--TestCaseWrapper - CSVDataConnector
----ActualTestCase
TestSuite - GlobalParams
--TestCaseWrapper - CSVDataConnector
----ActualTestCase
Shortcuts usually aren't...
- giuseppe.lacagnina
- Posts: 113
- Joined: Fri Sep 18, 2015 10:25 am
- Location: Brunn am Gebirge, Vienna, Austria
Re: Bind parameter values from CSV
Thanks!
The question was actually from a colleague.
I will propose this.
All the best
Giuseppe
The question was actually from a colleague.
I will propose this.
All the best
Giuseppe