cancel
Showing results for 
Search instead for 
Did you mean: 

Cloning mock service

SOLVED
Highlighted
New Contributor

Cloning mock service

Hey, I have a question that I have searched for everywhere and didnt found answer. My task is to create script in groovy that will clone mockService to different project, set different ports etc ... the problem is that i can't find any possible way to reach my goal. I know that TestCase's have clone method so i was looking for same thing in mockServices and found nothing. I tried lot of things like append mockServiceList, use addWsdlMockService with parameter containing desired mockService to target project and nothing worked. 

 

I may do this by hand using F9 but this is supposed to work automatically after some period

1 ACCEPTED SOLUTION

Accepted Solutions
New Contributor

Re: Cloning mock service

Finally, I found the sollution on smartBear api docs . There was something like CloneMockServiceAction.cloneToAnotherProject(WsdlMockService mockService, String name, WsdlProject targetProject, String description) which description seems deprecated because current parameters are different -> 

cloneToAnotherProject(WsdlMockService mockService, String targetProjectName, String name, String description) 

To solve my problem I used same method that cloneToAnotherProject used inside and i did this on target Project object

importMockService(WsdlMockService mockService, String name, boolean createCopy, String description)   

 

View solution in original post

1 REPLY 1
New Contributor

Re: Cloning mock service

Finally, I found the sollution on smartBear api docs . There was something like CloneMockServiceAction.cloneToAnotherProject(WsdlMockService mockService, String name, WsdlProject targetProject, String description) which description seems deprecated because current parameters are different -> 

cloneToAnotherProject(WsdlMockService mockService, String targetProjectName, String name, String description) 

To solve my problem I used same method that cloneToAnotherProject used inside and i did this on target Project object

importMockService(WsdlMockService mockService, String name, boolean createCopy, String description)   

 

View solution in original post

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors