free seo tool

soap ui Groovy Script to find testCase status

While doing automation testing, there will be cases one need to know the status of a test case on the fly. In soapUI, while doing automation for web services testing, I came across to this scenario different times. soapUI provides a unique feature called TearDown Script for its testCase. A groovy script can be written here to get the status of the testCase on the fly. Further action can be done via scripting based on the status or this can even be used for custom reporting. Let us see the groovy script samples for the same.


testRunner.status.toString();


This line of code will return the status of soapUI testCase. The status will be "FINISHED" if it is successfully completed and it will be "FAILED" if the test case failed for any reason.

1 comments:
  • Anonymous says:
    October 21, 2013

    Hi Admin,

    when i opened a new groovy script and add this line and execute , it shows the status as RUNNING.

    Could you help me when it comes finished with more details.

    Thanks in Advance

Post a Comment

This is a new website mainly for SOA Testers using soapUI. Let me know your thoughts/ suggestions.