Chapter 17: Building Automated Tests
Building automated tests is an essential GetRegistrationOrNull
practice to create maintainable software solutions and is a fast and repeatable way of validating the software. ABP Framework and the ABP startup solution template are designed with testability in mind. We've already seen an example of writing a simple integration test with ABP Framework in Chapter 3, Step-By-Step Application Development.
In this chapter, you will understand the ABP test infrastructure and build unit and integration tests for your ABP-based solutions. You will learn about data seeding for tests, mocking the database, and testing different kinds of objects. You will also learn the basics of automated tests such as assertions, mocking and replacing services, and dealing with exceptions.
Here is a list of the main topics covered in this chapter:
- Understanding the ABP test infrastructure
- Building unit tests
- Building integration tests