Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dymanic reaponse based on the request #7

Open
paramadeep opened this issue Oct 15, 2015 · 0 comments
Open

Dymanic reaponse based on the request #7

paramadeep opened this issue Oct 15, 2015 · 0 comments

Comments

@paramadeep
Copy link
Owner

Should be able to populate response based on the request components.

Say for example, when a service talk to a payment gateway, the transaction id is generated dynamically by the application and the transaction id expected expected as part of the response say the response body.

In the above scenario, test will not be able to configure this, using Poisol as the test will not have the value of the transaction id that the application will generate. Here we need to create a provision to create in config where in response can fetch value from request.

request:
  url: payment/{trans_id | .*}
  query: 
    total_amount: "[0-9]+"
response:
  body:'{
          amount : <<trans_id>>
          trans_id:  <<total_amount>>
           status: "success"
        }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant