mountebank icon indicating copy to clipboard operation
mountebank copied to clipboard

Develop a process for retrospectively generating predicates

Open lyricnz opened this issue 8 years ago • 3 comments

The existing predicateGenerators functionality works really well if you know exactly how to match the requests before you begin; however sometimes you have limited opportunity to put mountebank in the middle of the traffic flow, or need some experimentation to determine exactly how to match (or how the predicates->responses generation will work out).

In those cases, it would be useful to be able to record everything (request+response), then "have a shot at" writing the predicateGenerators, and see how it pans out. Rather than reinventing the predicateGenerators logic, I guess this means being able to replay recorded requests into the system (just like as if they were being observed in realtime).

Thoughts?

lyricnz avatar Jun 02 '17 10:06 lyricnz

Thanks. Do you have any ideas what the "interface" to this might look like?

bbyars avatar Jun 03 '17 15:06 bbyars

An endpoint that can accept the JSON emitted by "mb save" and process each request-response via the current predicateGenerators? (optionally dropping the current generated state, so it's clean)

lyricnz avatar Jun 03 '17 22:06 lyricnz

That makes sense.

bbyars avatar Jun 11 '17 19:06 bbyars