Forum Discussion
jvictoor
15 years agoOccasional Contributor
Little update.
I found that i can use groovy to start my mocks
so now i have a start step, an request step and a stop step
the start step
the stop step
the only thing that i now have to do, is check how many request the mock received. Due to the lack of documentation in the soapUI api, I don't find how i should do this. Write my own listener or is it possible to do this with the code available?
I allready tried to configure a counter that places a value on the context of the Mock service, but in the test suite, I cannot access the context of the Mock Service
I found that i can use groovy to start my mocks
so now i have a start step, an request step and a stop step
the start step
def project = testRunner.testCase.testSuite.project
log.info project.name
def myMock = project.getMockServiceByName("My-Mock")
def myMockRunner = myMock.start()
myMockRunner.setLogEnabled(true)
// place the object on the context
context.setProperty("myMockRunner",myMockRunner)
the stop step
def myMockRunner = context.getProperty("myMockRunner")
if(myMockRunner.isRunning()){
myMockRunner.stop()
}
the only thing that i now have to do, is check how many request the mock received. Due to the lack of documentation in the soapUI api, I don't find how i should do this. Write my own listener or is it possible to do this with the code available?
I allready tried to configure a counter that places a value on the context of the Mock service, but in the test suite, I cannot access the context of the Mock Service
Related Content
Recent Discussions
- 4 days agoemoya