Lesson 9

Testing, Logging, and Deploying Flask Applications

Share Tweet


  1. Introduction
  2. Resources
  3. Exercises
  4. Further Reading


In this lesson, we will focus on the procedure for testing, logging, and deploying Flask applications. Developing unit tests is a good practice to make sure the application, especially its functionality, is working properly and in the expected way. Unit test is a sort of automation testing that allows you to save time and effort because it can be repeated easily. The first part of this lesson will cover some handy and powerful tools to support application/software testing such as Coverage, Selenium. In the second part of this lesson, we will implement the logging mechanism in order to keep track of the database and source code performance. In the last part, after evaluating all of the aspects of the application, we now can deploy the application in the production environment.

Since the content of this lesson heavily depends on hands-on practice fashion, we organize this lesson as self-study. Please visit the Resources section to download the learning materials including book chapters, sample source code, and additional tutorials.


  • Textbook: "Miguel Grinberg. Flask Web Development, Second Edition. O'Reilly Media, Inc., 2018.".
    • Chapter 15 - Testing
    • Chapter 16 - Performance
    • Chapter 17 - Deployment
    • Chapter 18 - Additional Resources
    • Sample Code of Chapter 15, 16, 17
    • How to Work with the Example Code
  • Python IDE:


  1. Try to develop a new Social Blogging Application project on another platform such as desktop app, mobile app or another programming framework such as PHP, Node.JS, but instead of implementing all functionalities from the ground up, you should take advantage of the current APIs that were implemented and deployed on production environment. 💪

Further Reading

  1. Airbnb's Microservices Architecture Journey To Quality Engineering
  2. [Apple Podcasts] Why Digital Transformations Need APIs

Relaxing ☕