Forum Discussion

stensby's avatar
stensby
New Contributor
13 years ago

Script Assertion always VALID

Hi,

I'm trying to use Script Assertions in an Assertion Teststep (I'm a soapUI Pro user but cannot find my username and password, that's why I'm posting here).

My problem is that the assertion will always be VALID no matter what.

Example:

assert false


will result in a VALID assertion.

Is there a setting or something in soapUI that I have to alter to get script assertions to work?

Regards

5 Replies

  • nmrao's avatar
    nmrao
    Icon for Champion Level 1 rankChampion Level 1
    This is what i understand from the post, corret me if i am wrong. You added assert false code in script assertion, and it says pass for the test case- is that the problem, any more details please?

    Regards,
    Rao.
  • stensby's avatar
    stensby
    New Contributor
    Thanks for answering,

    Basically, there's no more details so supply.

    assert false

    will make the assertion to pass.

    I've added an Assertion Test Step and then added a Script Assertion in that step.

    Oh, another strange thing is that the script assertion works when adding it in a JDBC Test Step for example, but not in a Assertion Test Step...

    Any ideas please?

    Regards
  • nmrao's avatar
    nmrao
    Icon for Champion Level 1 rankChampion Level 1
    Did a simple try with assertion false in a Test Step Request, and it is working. Please see the attachment. Have you not seeing the same result? I'm using soapui-4.5.1 free version.

    Regards,
    Rao.
  • stensby's avatar
    stensby
    New Contributor
    Hi,

    Thank's for answering.
    I'm running SoapUI Pro version 4.5.1.
    The "Assertion Test Step" doesn't exist in the free version so I'm afraid you cannot test my specific problem.

    Regards
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Hi,
    if you are a pro user, post your issue in the "soapUI Pro Support" forum to get support from SmartBear on this