简体   繁体   中英

Dynamically change the saved response in mountebank imposter without hitting target app

I am using mountebank for service virtualisation in my performance test. So, first time when I hit the mountebank service url with request parameter eg flightNo=513, it goes to target application using proxyOnce mode and saves the response in imposter at specific port but second time when I change the flightNo so I don't want to hit the target application but I want to manipulate the saved response based on the given flightNo. How can I do that in mountebank ? Please help.

您将需要使用addDecorateBehavior ,它允许您访问传入的请求(在您的情况下为 request.query.flightNo)以在输出时操作保存的响应。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM