...

/

Adding Automated Tests to a Serverless Application

Adding Automated Tests to a Serverless Application

Learn how to add automated integration tests to a serverless application project.

Unit vs. integration tests

If we use a hosted ASP.NET Core web application as a serverless AWS Lambda application, we can run the same types of automated tests as we can for any standard ASP.NET Core application. Any business logic can be tested via standard unit tests. However, we can also test the endpoints using an integration test host provided by ASP.NET Core.

Here are the key differences between unit tests and integration tests.

  • Unit tests are designed to test a unit of functionality. They don’t rely on the application being hosted, and they call methods directly.

  • Integration tests rely on the application being hosted, even if it’s a local test host. They trigger the application via its endpoints, not by calling the methods directly.

Note: Even though the application needs to be hosted for integration ...

Access this course and 1400+ top-rated courses and projects.