Forum Discussion

dekiBRT's avatar
dekiBRT
Regular Visitor
1 year ago
Solved

Cannot start MockService through Groovy Script

Hello everyone,

I have a problem with really simple task. I want to automatize the start-up of MockService using Groovy Script so that when I execute TestCase, Mock services are started, and other steps are executed sequentially.

I found a few examples online, but whatever I do, I receive "groovy.lang.MissingPropertyException: No such property:".

SoapUI version is 5.7.0, and mock service name is Incidents_Binding MockService

Could you please help? I'm attaching a few examples of the script I'm using:

 

 

  • Hi dekiBRT​ 

    The issue is likely related to how the MockService is being referenced in the Groovy script, especially because the name contains spaces.

    Try retrieving it through the project’s MockService collection rather than referencing the name directly as a property. Also verify the exact MockService name and consider upgrading from the older 5.7.0 release.

    Hope this helps !!

1 Reply

  • Humashankar's avatar
    Humashankar
    Icon for Champion Level 3 rankChampion Level 3

    Hi dekiBRT​ 

    The issue is likely related to how the MockService is being referenced in the Groovy script, especially because the name contains spaces.

    Try retrieving it through the project’s MockService collection rather than referencing the name directly as a property. Also verify the exact MockService name and consider upgrading from the older 5.7.0 release.

    Hope this helps !!