brianb
15 years agoNew Contributor
DataSource Loop failing when used with Groovy DataSource
I have a testing scenario in which I have a directory of input and corresponding expected result files. The files are named with the following convention.
Test1-INPUT.txt
Test1-RESULT.txt
Test2-INPUT.txt
Test2-RESULT.txt
...
I want to loop through the input files and perform a request using the data in the *INPUT.txt file as an input and then use an Assertion to compare the output of the request with the data in the corresponding *RESULT.txt file.
I've created a Groovy DataSource with two properties, inputdata and result, that returns the data in the *INPUT.txt and corresponding *RESULT.txt files in the appropriate properties. The DataSource works correctly when I run just the DataSource alone. However, in the TestCase that I created, the DataSource Loop test step is failing with the following error:
TestCase failed [Cancelling due to failed test step:groovy.lang.MissingPropertyException: No such property: currentRow for class: com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceLoopTestStep], time taken = 848
Am I not doing something correctly in the Groovy DataSource? Can this type of test case be performed without a Groovy DataSource? I've tried using two seperate Directory DataSources but I could not figure out how to get the two to loop through the files correctly.
Test1-INPUT.txt
Test1-RESULT.txt
Test2-INPUT.txt
Test2-RESULT.txt
...
I want to loop through the input files and perform a request using the data in the *INPUT.txt file as an input and then use an Assertion to compare the output of the request with the data in the corresponding *RESULT.txt file.
I've created a Groovy DataSource with two properties, inputdata and result, that returns the data in the *INPUT.txt and corresponding *RESULT.txt files in the appropriate properties. The DataSource works correctly when I run just the DataSource alone. However, in the TestCase that I created, the DataSource Loop test step is failing with the following error:
TestCase failed [Cancelling due to failed test step:groovy.lang.MissingPropertyException: No such property: currentRow for class: com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceLoopTestStep], time taken = 848
Am I not doing something correctly in the Groovy DataSource? Can this type of test case be performed without a Groovy DataSource? I've tried using two seperate Directory DataSources but I could not figure out how to get the two to loop through the files correctly.