How to customize the return status for same responder?

yerapareddyyerapareddy Posts: 1

I need to achieve following things.
1. 10% Calls should respond with HTTP 404 or HTTP 500
3. One of the services should get failures (HTTP 500) for 15-20 minutes and then it should pass (200 ok) for 15-20 minutes.


  • [Deleted User][Deleted User] Posts: 0

    I believe your question is related to Virtualize?

    With respect to #1, there is a tool extension for Virtualize on Parasoft Marketplace that can accomplish this called the "Responder Randomizer:" randomizer

    It allows you to specify what percentage of the time an alternative response should be sent (and you can specify what the HTTP code should be used for the alternate response):

    With respect to #2, I believe the correct approach would be to build two different virtual services: one which returns failures (HTTP 500) and one which passes (200 OK).

    Point your application under test at a proxy. To start, the proxy will be forwarding traffic to the HTTP 500 virtual service. Then at the 15-20 minute mark make an API call from your test to Environment Manager (or to the Virtualize server directly) to re-point the proxy to the second virtual service.

    It's always preferable to build the simplest virtual assets possible and then use proxies to change the flow of traffic in order to achieve different virtual behavior.

Sign In or Register to comment.