Forum Discussion

khapre's avatar
khapre
Occasional Contributor
13 years ago

Generate Mock service from groovy script

Hi ALL,

Please find below how to generate mock service from SOAPUI groovy script -


import com.eviware.soapui.impl.wsdl.WsdlProject
import com.eviware.soapui.impl.wsdl.mock.WsdlMockService

def project_name = testRunner.testCase.testSuite.project.name
def my_mock = createMockService("$project_name")



If you know the alternate method. please let me know.

Thanks,
Ashish

2 Replies

  • ou_ryperd's avatar
    ou_ryperd
    Occasional Contributor

    Which version of SoapUI did you use ? I see no such method in the API docs.

  • nmrao's avatar
    nmrao
    Champion Level 3
    Any specific reason that you would like to use groovy script for the same? Can't you using default way?