SoapUI rest mock start issue from testsuite via groovy script
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SoapUI rest mock start issue from testsuite via groovy script
Hi All,
I am trying to start rest mock service via groovy script in test suite. I am getting the error using below script
def mockService = ["RestMockService"]
context.mockRunners= mockServices.collect{testSuite.project.mockService[it].start()}
But same script working fine for Soap mock services
def mockService = ["SoapMockService"]
context.mockRunners= mockServices.collect{testSuite.project.mockService[it].start()}
Attaching screenshot:
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need it to run build maven script which require to start mock service first in order to validate test cases in test suite. To achieve it I need to start rest mock using groovy script. I am able to start Soap mock service via groovy script but Rest mock start are failing.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Understand. But certainly that is not correct way to do.
Can you please check if there is utility called mockservicerunner under bin directory of the installation? If so run the mock services using that before running the tests.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Rao!
@sbhasin24 Did you solve the issue using Rao's suggestion? Please share.
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I resolved the issue using maven plugin. thanks for your suggestion.
