Forum Discussion

M_McDonald's avatar
M_McDonald
Super Contributor
16 years ago

Mock Response that "wraps" a Mock Service

This would allow all the customizations available in a Mock Service to be used as a "one-shot" within a test case.

3 Replies

  • Hi!

    Great idea (again..)! This can (probably) be done with a script step, how do you want this to work? How many requests should be dispatched? etc..

    regards,

    /Ole
    eviware.com
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    I did have to implement this with a script as I needed to listen for an HTTP POST before proceeding with the test case, and that meant doing the "wrap the request as a SOAP message" trick that I can only do in a Mock Service.

    I was thinking that it would all be self-contained in the Mock Response, so just 1 request would be processed, but it would be great if it could only complete conditionally if the request met certain criteria, else keep listening until timeout.
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    Correction, I actually had the Mock Service write a file and used a script to repeatedly check for the presence of the file. Not clean at all.