Types of Tests

Learn the difference between unit tests and integration tests.

There are several types of tests we could write for our application: units tests, integration tests, functional tests, smoke tests, and so on. We focus on the first three in this lesson.

Unit tests

When building a test-driven web application in Django, each piece of functionality is individually tested. For example, maybe we implement a specific function to get particular data from the database. We can then write a test to make sure that the expected data is returned. This small test that tests a particular functionality of our application is called a unit test.

They’re called unit tests because they’re not meant to be comprehensive. They also don’t test the application as a whole but only test a particular functionality within the application.

Get hands-on with 1400+ tech skills courses.