Forum Discussion

stenofski's avatar
stenofski
Occasional Contributor
12 years ago

SoapUI 4.6.3 Modify Property without Groovy

Hey Everyone,

I’m quite new in this soapui topic and I’m looking for an function of soapui to modify an property which I’ve gathered from an response and which I would like to compare somewhere else slightly modified. I’ve scrolled around the web and the forum but can’t find something suitable.

For example
Request1 gets a Response like “value234234” and I would like to use this response value like this “value23” in another response to verify. Is there a soapui function which could be used to archive this without using complex groovy scripting?
I’m talking about a timestamp modification to be a little more precise.

Best Regards
Sten
  • stenofski's avatar
    stenofski
    Occasional Contributor
    Hey SiKing again,

    I´ve already found this this page and this is almost every time the place of start for me. Unfortunately there is no documentation to modify any property? As I described above, I would like to modify and not transfer a property. Is there any inbuilt function to achieve this?

    Best Regards
    Sten
  • SiKing's avatar
    SiKing
    Community Expert
    There is at least a dozen different ways to "modify a property". What exactly is your situation? Describe the problem.
  • stenofski's avatar
    stenofski
    Occasional Contributor
    Heyho SiKing,

    The step I would like to do is cutting off a few digits at the end of an value which ive got from the response of an request to use it within the next request to compare.

    For example
    Request1 gets an Response like “value234234” and I would like to use this response value like “value23” (cut of a few at the end) in another response to verify. Is there any soapui function which could be used to achieve this (without using complex groovy scripting)?

    Best Regards
    Sten
  • stenofski's avatar
    stenofski
    Occasional Contributor
    Thanks SiKing,

    the solution you suggested works fine for me. Here the litle script I'm using now.


    //**get properties from testCase, testSuite and project
    //def testCaseProperty = testRunner.testCase.getPropertyValue( "WSTMP1" )
    def testSuiteProperty = testRunner.testCase.testSuite.getPropertyValue( "WSTMP1" )

    String newWSTMP1 = testSuiteProperty[0..-2]

    //**setting values is equally straigh forward
    //testRunner.testSuite.setPropertyValue( "WSTMP1", var )
    testRunner.testCase.testSuite.setPropertyValue( "WSTMP1", newWSTMP1 )