Overview: Testing the REST API

Get an overview of the topics covered in this chapter.

We'll cover the following

In software engineering, testing is the process of checking whether the actual software product performs as expected and is bug free.

There are a lot of ways to test software through both manual and automated tests. But in this project, we’ll focus more on automated testing. However, we’ll first dive into the different ways of testing software, their pros and cons, and the testing pyramid. We’ll also check the tools needed to add tests to a Django application and add tests to the models and the viewsets. By the end of this chapter, you'll have a solid understanding of testing for developers and how to write tests for a Django API.

Topics covered in this chapter

In this chapter, we’ll be covering the following topics:

  • What testing is

  • Testing in Django

  • Configuring the testing environment

  • Writing tests for Django models

  • Writing tests for Django viewsets

Get hands-on with 1200+ tech skills courses.