Forum Discussion

hindza's avatar
New Contributor
7 years ago

HTTP Status Codes Assertion Values disappear when re-opening SoapUI

Hi All,    I'm getting some strange behavior from Soap UI.    I'm using the following script to insert a Valid HTTP Status Code Assertion, an Invalid HTTP Status Code Assertion, and a string that...
  • JHunt's avatar
    7 years ago

    You're using reflection to get access to fields that you shouldn't normally have access to instead of using the public API. For instance, you might just be altering the object in memory, but the public methods would also change the representation in the project file.


    Try setting the codes like this instead:


    testRunner.testCase.testSteps["Test Step Name"]
    .addAssertion("Invalid HTTP Status Codes")

     Always be looking at the API Docs. I found setCodes from here: