Forum Discussion

mileppaa's avatar
mileppaa
Occasional Contributor
9 years ago
Solved

Using Project Property as a value for JMS Timeout Assertion

Hi,

 

I just changed my old soap ui (5.0) env to this latest version, Soap Ui 5.2 (x64,free Open Source).

 

I imported my old test project where I have been using this Project Property (TestRequest Property Timeout is ${#Project#Timeout}) as a value for JMS Timeout Assertion (One timeout value used for all my Requests).

 

Now, when started to run my test cases, all request fail as Timeout for JMS Timeout Assertion uses value 100 ms... And my project property was set to 60000 ms.

Ok, I started to check my testprojects JMS Timeout assertions and noticed that the timout cannot use Project Property as a value :-( Oh noes.. It seems to only accept the decimal value so only thing you can add there is numeral values, not string value like ${#Project#Timeout} is. Also adding this JMS Timeout assertion uses a new dialog which uses this 100 ms as a default value (you can put ${#Project#Timeout} to that insert field put it's not added to Request Properties...).

 

Has anyone else noted this?
I did some searching to this forum and noticed from release notes that some changes have been made to this JMS assertion but I am not sure did that change cause this behaviour?

 

 

  • Ok, I think I got this solved...

     

    I did some searching for this SLA assertion thing and found NMRAO 's script assertion hint:

     

     

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

     

    So, after changing all of my JMS Timeout Assertions to Script assertions and changed script to use Project Property, I am able to use Project property as a assertion value.

     

    Thanx for help!!

     

    P.S. Next task is to find out why Soap-UI 5.2 (x64) testrunner gets this java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory -error...

     

     

5 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Yes. I happened to notice that. Looks ResponseSLA (your case is subset of it) having problem and it is there from past releases, and not new I believe. Otherwise, not using it rightly.
    Are you sure that it did work for you? in which release ?
    • mileppaa's avatar
      mileppaa
      Occasional Contributor

      Hi,

       

      I have version 5.0 (x64 , free, Build Date: 20140409-1012 ) running and JMS Timeout -assertion is working there like I described eg. it uses Request property Timeout. With this version, adding JMS Timeout does not use this dialog that asks for Timeout -value.

      But with this 5.2 (Build Date: 20150701-1106), a dialog is does ask for this timeout value and it does not use Request property Timeout. I just tested it and only the value that you give via dialog is valid. Value inserted directly to Request Property Timeout is not used at all.

       

      • nmrao's avatar
        nmrao
        Champion Level 3
        And you were using property expansion, not the number, right?
  • mileppaa's avatar
    mileppaa
    Occasional Contributor

    Ok, I think I got this solved...

     

    I did some searching for this SLA assertion thing and found NMRAO 's script assertion hint:

     

     

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

     

    So, after changing all of my JMS Timeout Assertions to Script assertions and changed script to use Project Property, I am able to use Project property as a assertion value.

     

    Thanx for help!!

     

    P.S. Next task is to find out why Soap-UI 5.2 (x64) testrunner gets this java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory -error...