Wrap Up

This lesson concludes the course.

We'll cover the following


Congratulations! You have now finished the course. Thank you for seeing it through to the end. We hope it was an enriching and enjoyable learning experience. You now have a solid understanding of the test-driven development process and how to run unit tests automatically.


Let’s have a quick recap of what we’ve learned in this course.

Writing automated tests for medium to large applications is essential. Using the test-driven development approach to write these automated tests gives us a robust way of planning each feature before we start writing the code.

In this course, we took a look at several benefits of driving the development of our application through tests. The main benefit is that it gives us the ability to easily extend our application while also making it free from bugs. However, this works only if the test coverage is robust enough to cover most use cases.

There are several types of tests. We took a look at writing unit tests extensively for each functionality that we developed in this course. Furthermore, a web application written in Django has numerous components that make up the whole application. We have the template that renders the HTML and CSS. We also have the URLs, the forms that receive users’ inputs, the view that processes our request, and the model that describes our database. Therefore, we need to test all these components and make sure that the form we create does what it’s intended to do.

The full advantage of writing tests can’t be appreciated until we start using third party libraries in our application or until the application scales tremendously.

We also learned that the test-driven development approach can be summed up as the Red, Green, Refactor process. The red part involves writing the test and running it to see it fail. The green part comprises writing the code and rerunning the test to see it pass. After this, we refactor the code as we see fit. Using technologies like GitHub Actions to run the tests automatically for us can be quite useful once we make our Django application available online. The application can then be used by other people or by developers to contribute to its code. Finally, we briefly discussed Selenium, which is a way to test the application from the user’s view. We simulate and test the user’s interaction with our application.

Check out the official Django documentation to read more about testing our Django application.

Get hands-on with 1200+ tech skills courses.