pyswan
12 years agoOccasional Contributor
How to use result from assertion Gr script in DataSink step
Hi,
I am licensed SoapUI Pro user and I am trying to post a question. However none of the topics let me do that, but here. Hopefully my question finds the right audience.
Here is what I am trying to accomplish - get groovy script result, which may be 0, 1 or 2. When result is error = 1 or 2, then save this result into Excel file (or another format) and include error message content, using DataSink step.
Here is what I have:
soapUI test case in soapUI test suite in soapUI project with 2 groovy scripts under Events tab - TestRunListener.afterStep and TestSuiteRunListener.afterRun.
Test Case steps:
1. REST GetUserID
2. JDBC GetArtifactID
3. Property transfer ArtifactID to Test Case property
4. DataSource - get data from excel file 16 lines with 2 parameters each
5. REST GetArtifact (Takes 4 params from previous steps. Returns API response with Artifact details that are written to GetArtifact.xml file. Has assertion with groovy script in it, to compare API response with previously saved API response file GetArtifact-version.xml in specific directory)
6. DataSink (step doesn't work, not sure how to configure it correctly)
7. DataSource Loop (goes back to REST GetArtifact step)
I am licensed SoapUI Pro user and I am trying to post a question. However none of the topics let me do that, but here. Hopefully my question finds the right audience.
Here is what I am trying to accomplish - get groovy script result, which may be 0, 1 or 2. When result is error = 1 or 2, then save this result into Excel file (or another format) and include error message content, using DataSink step.
Here is what I have:
soapUI test case in soapUI test suite in soapUI project with 2 groovy scripts under Events tab - TestRunListener.afterStep and TestSuiteRunListener.afterRun.
Test Case steps:
1. REST GetUserID
2. JDBC GetArtifactID
3. Property transfer ArtifactID to Test Case property
4. DataSource - get data from excel file 16 lines with 2 parameters each
5. REST GetArtifact (Takes 4 params from previous steps. Returns API response with Artifact details that are written to GetArtifact.xml file. Has assertion with groovy script in it, to compare API response with previously saved API response file GetArtifact-version.xml in specific directory)
6. DataSink (step doesn't work, not sure how to configure it correctly)
7. DataSource Loop (goes back to REST GetArtifact step)