Shashi
17 years agoOccasional Contributor
Reading test data from into datasource and to feed that to the test case
Hello,
I have testdata.properties in the format for example
name1=data1,data2,data3
I have a properties test step defined reading the data from this properties file for the property name = name1
I also have a data source and data source loop test step to read the data from this properties file and to loop through the data with comma separation between data.
The idea here is to have the datasource read the file and loop through the data from 1 through 3 and feed each one at a time to the properties step.
The request is built to take the data from properties like ${Properties#mesLotName}
I am not sure if this is the right way to set up the steps in this order to achieve data driven testing looping through a set of test data.
But it is not working the way I expect it to. It is reading the datasource but putting the entire line with comma as the property value so the response is NullPointerException where it cannot qualify the data input.
Could someone please let me know what is the best way to fix this scenario or if there an alternative to this?
Any help is much appreciated.
Thanks
- Shashi
I have testdata.properties in the format for example
name1=data1,data2,data3
I have a properties test step defined reading the data from this properties file for the property name = name1
I also have a data source and data source loop test step to read the data from this properties file and to loop through the data with comma separation between data.
The idea here is to have the datasource read the file and loop through the data from 1 through 3 and feed each one at a time to the properties step.
The request is built to take the data from properties like ${Properties#mesLotName}
I am not sure if this is the right way to set up the steps in this order to achieve data driven testing looping through a set of test data.
But it is not working the way I expect it to. It is reading the datasource but putting the entire line with comma as the property value so the response is NullPointerException where it cannot qualify the data input.
Could someone please let me know what is the best way to fix this scenario or if there an alternative to this?
Any help is much appreciated.
Thanks
- Shashi