Skip to content

Doubts with usage #127

Answered by gavv
ernesgonzalez33 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, thanks for asking.

Is there a way to stop running some of the tests if one of them fails and maybe go to a "clean" method. I can't find a way to do an if around a request and do some action if the test fails or not.

As already answered, using httpexpect.NewRequireReporter (or your custom reporter) is the right way to do it.

Related to that. Is there a way to wait for a test to pass with a limited number of retries? I know I can do this by making requests using the http Go library, but I'm curious if there is a way of doing that with httpexpect

There is no way to do it out of the box. There was a PR but it was not finished: #73. I've created an issue: #85.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by gavv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #127 on November 12, 2022 20:27.