Forum Discussion

cc's avatar
New Contributor
8 years ago

testRunner.testCase.getTestStepByName("my").setPropertyValue("id","42") not working in script ...



I tried to write a groovy script an to set values of a testrequest, and to excecute that afterwards. It looks like this:


testRunner.testCase.getTestStepByName("my").setPropertyValue("id", "42")
def whatis = testRunner.testCase.getTestStepByName("my").getPropertyValue( "id" ) "Value of id by testRunner.testCase.getPropertyValue: "+whatis



The result in the log gives Value of id by testRunner.testCase.getPropertyValue: null

where I expected it to be 42, so also running "my" is not possible since it has no property values


Where is the problem? I don`t see where and what is going wrong?




"my" looks like this:

<soapenv:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soapenv="" xmlns:urn="urn:ilUserAdministration">
      <urn:addGroup soapenv:encodingStyle="">
         <id xsi:type="xsd:string">?</id>


3 Replies

  • cc's avatar
    New Contributor

    When I use Run TestCase instead of a SOAP Request it is possible to transfer data, but then again if Run TestCase is excecuted it doesn't provide the data for the SOAP Request, that I thought would be used there, instead it runs it without any data...

    I'm getting confused here ..

    Is there a place where this I think still basic part is explained?