Forum Discussion

snacky1976's avatar
snacky1976
New Contributor
13 years ago

Returning a 'warning' instead of a 'failure'

In the reposonse of a certain request , I want to check a certain value.
If this value is greater then the wanted value, a 'warning' should be generated.
So, the functional test is ok, but there's a warning on this specific testcase... how can I do that ?

The check "if the value is greater then.." can be done via script assertions, but the problem is
that you can only return a failure and not a kind of 'warning'.

Anyone a solution for this ?

Thanks
Snacky.

3 Replies

  • tjdurden's avatar
    tjdurden
    Frequent Contributor
    Hi snacky1976,

    When you say 'warning'... what do you actually want to happen? Can you be specific please?
    I'm thinking you might be able to knock some assertion/action together in groovy.

    Kind regards,
    Tim
  • snacky1976's avatar
    snacky1976
    New Contributor
    Let me describe one testcase :

    1. I’m doing a soap request with specific parameters. The result object contains specific data.
    2. On these result data, a Xpath assertion is added.

    ==> If this Xpath check is not OK, then the testcase will fail. That’s good, because the functional test is not OK.

    3. I want to add a second check to verify if a value is lower then a certain baseline. This is not really a part of the functional test but
    more informative.
    Still, if the value has a higher value then expected, It should be visible in the report for this testcase ( = “warning” )

    Example Report
    ------------------
    Testcase 1 : 1 succeeded; 0 failures; 1 warning
  • tjdurden's avatar
    tjdurden
    Frequent Contributor
    Hi snacky1976,

    I don't use the reporting side of SoapUI (free) that much myself, but just a couple of questions...

    1) Are you using the FREE version of SoapUI or the PRO version?
    2) If Pro - I'd recommend asking this in the SoapUI Pro forums, as they'll know more about reports. If Free, would you be kind enough to let me know how I generate a report in SoapUI please?

    In general, I suspect that if 'Warnings' are not already supported in the report, then there may be a way of adding a groovy script that writes something out to log, or one of the report values, but I just want to narrow this down first before I spend too long looking at a possible solution.

    Kind regards,
    Tim