Forum Discussion

jc111's avatar
jc111
Occasional Contributor
13 years ago

Mocks / Mock Service Runner

Hello,

I have the following questions about mocks and the mock service runner:

1) Is it possible to have the mock service runner start multiple project mocks from a single command, or you have to submit separate command/create more than one soapUI background process?

2) When exporting a mock project to a war file, do you have to specify the absolute URL, or can you leave it blank or specify the relative URL? I haven't had any luck with getting the war file to work in WebLogic.

3) Is there a way to log the incoming HTTP headers to the mocks? I see this for the submitted HTTP requests in the test cases, but not for the incoming requests to a mock.

3 Replies

  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    My anwsers

    1) Is it possible to have the mock service runner start multiple project mocks from a single command, or you have to submit separate command/create more than one soapUI background process?

    AFAIK, no as all soapui commands can only manage one project (because the underlying runner does)

    2) When exporting a mock project to a war file, do you have to specify the absolute URL, or can you leave it blank or specify the relative URL? I haven't had any luck with getting the war file to work in WebLogic.

    Are you talking about the "MockService Endpoint" parameter?

    3) Is there a way to log the incoming HTTP headers to the mocks? I see this for the submitted HTTP requests in the test cases, but not for the incoming requests to a mock.

    when using the war, see http://www.soapui.org/Service-Mocking/d ... files.html (enable webui)
    in soapui gui, the mockservice runner windows have a message log area (on the bottom), for each request, you have a line in this area. Double click on it, it will open a new "Message viewer" window that has 3 tabs: request, response and properties. On the bottom of the request tab, you have an "Headers" tab
  • jc111's avatar
    jc111
    Occasional Contributor
    2) When exporting a mock project to a war file, do you have to specify the absolute URL, or can you leave it blank or specify the relative URL? I haven't had any luck with getting the war file to work in WebLogic.

    Are you talking about the "MockService Endpoint" parameter?

    Yes. It turns out that no matter what I put in that field, the context path created is the name of the WAR that was specified. The location specified also seems to be ignored. Also, the "WEB-INF" directory generated is missing the "W". These appear to me to be bugs. Even after correcting for these issues, I still can't get the WAR to work. I see the WebUI and the WSDL in the browser, but the mock itself doesn't return any data, along with a 200 HTTP Status Code.


    3) Is there a way to log the incoming HTTP headers to the mocks? I see this for the submitted HTTP requests in the test cases, but not for the incoming requests to a mock.

    when using the war, see http://www.soapui.org/Service-Mocking/d ... files.html (enable webui)
    in soapui gui, the mockservice runner windows have a message log area (on the bottom), for each request, you have a line in this area. Double click on it, it will open a new "Message viewer" window that has 3 tabs: request, response and properties. On the bottom of the request tab, you have an "Headers" tab

    Ok, Is there a way to log these hearders when not running a war (Just the GUI or the mock service runner?)
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    2) what is the soapui version you use?
    I've retested a war export with soapui 4.5.1 and i cannot reproduce any of the issues you described

    3) What do you mean by "log"? Do you want trace in a file?
    As I stated, you can found request/response directly in Soapui GUI