Forum Discussion

pyswan's avatar
pyswan
Occasional Contributor
12 years ago

How to use result from assertion 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)

3 Replies

  • nmrao's avatar
    nmrao
    Community Hero
    You must be posting it in under soapui pro boards being a licensed user for quick resolution.
  • pyswan's avatar
    pyswan
    Occasional Contributor
    I tried to, however there is no option for me to create a post over there, just here.
    My forum account is new, so I assumed that it has to go through some kind of approval and licence verification before I get correct permissions.
  • pyswan's avatar
    pyswan
    Occasional Contributor
    I've got my account permissions granted and moved topic to - Board index ‹ SoapUI Pro Boards ‹ soapUI Pro Support.
    Closing this one.