Forum Discussion

cdunne's avatar
cdunne
Contributor
17 years ago

Script Assertions

Hi,

I have a script assertion which checks that a value is not false and returns an error to the groovy log if it does.

def succeed = "call a custom method that returns true"
if( succeed == false){
    log.info(currentTestCase+" - Failed Script Assertion:  "+errors.toString())
}

assert succeed != false

When I do this the assertion makes 2 entries in the log. Is this because SoapUI try to validate the assertion twice? If so is there anyway I could switch this off?

Thanks

Cormac

2 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Cormac,

    thanks for pointing this out.. it only seems to happen when running the containing testcase and the testrequest editor is still open. Can you confirm that?

    regards!

    /Ole
    eviware.com
  • Hi Ole,

    Yes this is exactly the conditions I can recreate it under.

    Thanks

    Cormac