Forum Discussion

Revathi1522's avatar
Revathi1522
New Contributor
8 years ago

Re: groovy.lang.MissingPropertyException: No such property: testRunner for class: Script1

Hello every one i am using Soap Ui 5.4.0. In my test case i have added groovy script in the assertion it is working fine on my local machine but i am getting error when i integrated with the Jenkins groovy.lang.MissingPropertyException: No such property: link for class: Script1 Why is it so?

4 Replies

  • nmrao's avatar
    nmrao
    Community Hero
    Provide the details of script & stacktrace which is causing the trouble. It is difficult to imagine and reply.
    • Revathi1522's avatar
      Revathi1522
      New Contributor
      assert context.request, 'Request is empty or null'; assert context.response, 'Response is empty or null'; def parsedJsonResponse = new groovy.json.JsonSlurper().parseText(context.response); def testSuite = messageExchange.modelItem.testStep.testCase.testSuite; def linkFromProperties=testSuite.getPropertyValue("links"); String link = parsedJsonResponse.links log.info "$link" def id = link.substring(link.indexOf("communication-interface/")+24, link.length()) log.info id //set newly generated id to test suite properties testSuite.setPropertyValue("id", id); This the code i hav eused
      • nmrao's avatar
        nmrao
        Community Hero
        Based on the information provided in the script, there is no way to get error mentioned in the question as there is no where "testRunner" is present in the script.
  • JHunt's avatar
    JHunt
    Community Hero

    I would try taking out

     

    log.info "$link"

    or try as:

    log.info link

    or

     

    log.info "${link}"