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

Runner results misleading #2487

Open
2 tasks done
adobitar opened this issue Jun 19, 2024 · 2 comments
Open
2 tasks done

Runner results misleading #2487

adobitar opened this issue Jun 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@adobitar
Copy link

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

My project has a couple bad API calls in it currently. When I run my collection, I get at least one 415 result and one 400 but the runner results shows "Total Requests: 109, Passed: 109, Failed: 0" and all of the individual requests show green checks. I would expect the 400 and 415 to possibly trigger a failed call.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

image
image

@adobitar adobitar added the bug Something isn't working label Jun 19, 2024
@jwetzell
Copy link
Contributor

jwetzell commented Jun 21, 2024

Unless a test or assertion fails then a "successful" HTTP request/response is a pass.

@Sirafe
Copy link

Sirafe commented Jun 25, 2024

You need to set an assertion in the request on the http response status. Example under the tab:
If you want the assert to pass only on the HTTP Response Codes 200, 201, or 204 for example use the following Expr, Operator, and Values:

res.status in 200,201,204

In this case your request will only pass if the http response header status is one of those three values.

As far as Bruno is concerned your request worked, because it received a response from your API. It doesn't care what that response is unless you tell it to care with an assert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants