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

Allow to debug test failures #421

Closed
Kaliumhexacyanoferrat opened this issue Nov 23, 2023 · 0 comments · Fixed by #426
Closed

Allow to debug test failures #421

Kaliumhexacyanoferrat opened this issue Nov 23, 2023 · 0 comments · Fixed by #426
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@Kaliumhexacyanoferrat
Copy link
Owner

Kaliumhexacyanoferrat commented Nov 23, 2023

As a developer of the GenHTTP web server, I would like to know why the server responds with unexpected status codes in some test runs (aka flaky tests), so I can make the stable again.

Example

Instead of ...

Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);

do something like:

response.AssertStatus(HttpStatus.OK);

where AssertStatus is an extension method situated in the acceptance testing project which will print the request body in case of an unexpected status.

Acceptance criteria

  • All places have been changed to the new mechanism
  • The mechanism uses the preferred way to print the response content so it can be seen both in the test explorer as well as in the CI build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant