Computer_Resear
17 years agoOccasional Contributor
Datasink teststep cannot handle multiple files
We have the following scenario,
1. Groovy test step to read files in a dir and hold the list in context. The script also sets up a property step (FilesToBeReadProperty) with one property called currentFile.
2. Datasource teststep uses ${FilesToBeReadProperty#currentFile} to read in the excel datasource.
3. Some web service call.
4. Property Transfer step to a data sink.
5. The Data Sink has to write to the same file as the data source so I used the same property expansion ${FilesToBeReadProperty#currentFile}.
6. Finally a groovy step to check if all files have been processed, if not go back to step 1 and get the next file from context and perform all the steps.
I have a setup script that sets up the first file. If I don't do this, soapUI initial validation of teststeps will fail for the Data Sink saying that file was not found. I assumed that in each iteration, the data source and data sink will use the new file name from ${FilesToBeReadProperty#currentFile}. Altough the data source does, the data sink writes only to the file it was validated with before saopUI runs the testcase. In other words, if I have five files, all of them are processed and the results is written to one file.
Please let me know if you have any work around for this so results of a processed file is written to the same file.
Thanks.
1. Groovy test step to read files in a dir and hold the list in context. The script also sets up a property step (FilesToBeReadProperty) with one property called currentFile.
2. Datasource teststep uses ${FilesToBeReadProperty#currentFile} to read in the excel datasource.
3. Some web service call.
4. Property Transfer step to a data sink.
5. The Data Sink has to write to the same file as the data source so I used the same property expansion ${FilesToBeReadProperty#currentFile}.
6. Finally a groovy step to check if all files have been processed, if not go back to step 1 and get the next file from context and perform all the steps.
I have a setup script that sets up the first file. If I don't do this, soapUI initial validation of teststeps will fail for the Data Sink saying that file was not found. I assumed that in each iteration, the data source and data sink will use the new file name from ${FilesToBeReadProperty#currentFile}. Altough the data source does, the data sink writes only to the file it was validated with before saopUI runs the testcase. In other words, if I have five files, all of them are processed and the results is written to one file.
Please let me know if you have any work around for this so results of a processed file is written to the same file.
Thanks.