-
Notifications
You must be signed in to change notification settings - Fork 38
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
Can you write one test and just change the environment variable? #152
Comments
This code should do the trick
|
@AnWeber How would I extract the status codes out of
|
@FrankRua not directly. My main use case is that I want to share the response body between requests. status is no longer important to me. For this reason you have to define a variable with the response of first request yourself
Here is the interface for a httpResponse |
I would meanwhile already set the response as a variable, but initially overlooked it and now I don't want to change the api. But actually I could define an additional variable with |
:-) sorry I closed the wrong issue. |
@AnWeber Is there a way to see if the body of a response contains a string? I see the Could I possibly use a framework like Jest and read the 'response'? I just don't see many examples, sorry for all the questions 😄 |
Jest is another test runner. httpyac is also used here as a test runner. I have also already tested the assertion with chai, here is a example. Maybe you can also use jest for this, But does not feel right. |
Is it possible to do a "contains" on on the response with HttpYac for an assertion? |
If there are any questions just contact me again:-) |
Is it possible that you can have one test in your *.http file and just simply just the variable on one iteration, and then another iteration have it change?
I have a use case for this as I want to run tests against a CDN and the Load Balancer behind the CDN. An example would be like:
The text was updated successfully, but these errors were encountered: