Forum Discussion

vijkris99's avatar
vijkris99
New Contributor
9 years ago

SoapUI 5.1.3 Bug: Property expansion not working with Response SLA Assertion

Hi SmartBear team

 

I am using SoapUI 5.1.3 (free version). I was trying to use a project level property for storing my expected Response SLA and reference this property within all Response SLA assertions within the project. However, this does not seem to work - everytime I type out the property name, SoapUI refuses to save it, and reverts back to the original numerical value which was initially present.

 

The official SoapUI documentation @ http://www.soapui.org/functional-testing/validating-messages/getting-started-with-assertions.html explicitly mentions that property expansions are supported within the Response SLA assertion (Refer Section 3.3), so I am surprised this is not working as expected.

 

It also appears this is a fairly long standing bug! The link http://forum.loadui.org/viewtopic.php?f=5&t=13138 suggests that this is more than 3 years old :(

 

It would be great if this could be fixed, as I am pretty sure this is a fairly common requirement for many people.

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3

    I use 4.5.1, and still see the same behaviour as you pointed the link.

     

    However, you need not to wait for it to be fixed. There is an another way of doing using script assertion with external parameter as you wanted.

     

    Here you go:

    Define a custom property, say, SLA with the desired value in milli seconds at any level (Project, Suite or TestCase)

    Let us assume, SLA is defined at a test case.

    Define script assertion with the following one line of code which does the same as you expecting.

     

     

    assert messageExchange.timeTaken <= (context.expand('${#TestCase#SLA}') as Long), 'SLA failed '

     

    Hope you like it.

    • vijkris99's avatar
      vijkris99
      New Contributor

      Hi Rao

       

      Thanks for your response! I was thinking along the same lines as well, but was hoping that the bug would get noticed and fixed as well :)

      • nmrao's avatar
        nmrao
        Champion Level 3

        Well. I believe that Smartbear team acts accordingly. And they are doing good by prioritising the new features / areas and bringing them to Open Source version most active to the customers like us.

         

         

        I think when there is way, one should move on unless something is blocking. 

        By the way, would you like to accept as a solution, appreciate if you can.

         

        And from your posts on the forum, you seemed to be comfortable at coding, so nothing stops as groovy can do all the stuff, just explore the API. :)