Forum Discussion

pyswan's avatar
pyswan
Occasional Contributor
12 years ago

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)

3 Replies

  • pyswan's avatar
    pyswan
    Occasional Contributor
    Thank you, I tried to use that one and submit button did not fit into my screen and there was no scroll bar.
    Took some time and few tries to wiggle my way to reach the button. I am currently working with support agent on the issue.
    And I also checked 'submit support form' page and submit button was fixed, it is available after form fields are populated.
  • Hi,

    I'm afraid I don't fully understand what the problem is. Could you perhaps elaborate a bit further? Or are you already getting support elsewhere?

    Regards,
    Arian
    SmartBear Sweden