Search code examples
testingsoapuiweb-api-testing

How to solve runing error in Groovy Script


I have tried to get the property value, where I have saved in the project-properties.

This is the code which I have tried out.log.info wasn't working fine ,but when I run the code separately(that means only first line..), It shows the valid answer in a popup.

def ProjectProp = testRunner.testCase.testSuite.project.getPropertyValue("Name")

log.info {"Project Property = "+ProjectProp}

I am new to SoapUI.I would be really grateful, If you will be able to help me out to find a solution for the error which i received as follows,

INFO:Script13$_run_closure1@1d32637


Solution

  • Your problem is unrelated to SoapUI. You obviously have difficulty with basic Groovy syntax. Seek some tutorial on Groovy.

    Your specific case, should read:

    def projectProp = testRunner.testCase.testSuite.project.getPropertyValue("Name")
    log.info("Project Property = " + $projectProp)