Challenge: Applying an Integration Test

Test yourself by setting up an integration testing environment.

In this challenge, we’ll set up integration tests that follow some requirements in the playground at the end of this lesson.

We have an API application and a test project. Within the test project, we have the ApiTests.cs class, which is a placeholder for integration tests. We don’t have any tests in it just yet, but we need to add them according to the following requirements:

  • Making any necessary modifications to the original WebApiApp project to enable integration testing.

  • Adding a test that verifies that the /user GET endpoint returns a successful status code.

  • Adding a test that verifies that the /user/1 GET endpoint returns a successful status code.

  • Ensuring that these tests are added according to the best practices of automated testing.

Get hands-on with 1200+ tech skills courses.