cancel
Showing results for 
Search instead for 
Did you mean: 

Running a test step in another project from a mockservice

SOLVED
Highlighted
Occasional Contributor

Running a test step in another project from a mockservice

Hi,

 

I have two projects, one is a mockservice where I extract a value from the request, save it as a global property and then I use it in another project which is a regular one where I have a test suite with one one step.

However, I need to execute this step manually since I see that in the scripts part in the mockservice the TestRunner property is not available( I read that this one is used for running test cases from other projects but works only from a groovy script). Is there a way that I can execute this step in the other project automatically after receiving the request in the mockservice?

 

Thanks,

Bojana

 

Thanks,

Bojana

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Running a test step in another project from a mockservice

Hey @bojasna,

I know testRunner isnt available and i don't really use dynamic mocks, but have a look at the following link. Perhaps another object....e.g. modelItem or context, etc. might help?

Link in as follows:

https://www.soapui.org/soap-mocking/creating-dynamic-mockservices/#1-MockService-Scripting-Overview

Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

4 REPLIES 4
Highlighted
Community Hero

Re: Running a test step in another project from a mockservice

Hey @bojasna,

I know testRunner isnt available and i don't really use dynamic mocks, but have a look at the following link. Perhaps another object....e.g. modelItem or context, etc. might help?

Link in as follows:

https://www.soapui.org/soap-mocking/creating-dynamic-mockservices/#1-MockService-Scripting-Overview

Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

Highlighted
Community Hero

Re: Running a test step in another project from a mockservice

Not sure I understand this clear.

Is the project with mock service using the same service definition as 2nd project?
Thumb rule is to have each and every test case independent. No dependency between tests, forget about project dependency, IMO.


Regards,
Rao.
Highlighted
Occasional Contributor

Re: Running a test step in another project from a mockservice

Hi @nmrao 

Yeah the second step is part of a different service definition. I understand your recommendation but I'd still like to know if someone had an issue like mine what they did.

Cheers,

Bojana

Highlighted
Occasional Contributor

Re: Running a test step in another project from a mockservice

Hi @richie 

Thanks a lot for the tip since I read something under number 4 on the link you pasted that might help me with what I want to achieve. Do you have suggestions for the title since I honestly don't know how to make it 'more searchable'.

Cheers,

Bojana

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