Code Maven

Testing and test-automation in Python

This, along with the other courses can be given either on-site in the offices of the client or on-line via Zoom or other means. Contact Gabor Szabo for more details.


This course provides an introduction to the world of testing with Python. It starts with an overview of what is the goal of testing and how it can help you improve the speed of development and the reliability of your applications


  • Be able to write unit, integration, and acceptance tests in Python.
  • Understand regression testing.
  • Understand Continuous Integration and how to use it with Python.
  • Be able to test various types of application: web based, CLI, databases (both SQL, and NoSQL), cloud-based (AWS, GCP)


  • Developers
  • QA engineers
  • DevOps engineers
  • Automation engineers


  • At least 1 year experience programming in Python.
  • Bring your own computer where you already have Python installed and where you have the rights to install new software.

Course format

  • 8 academic hours. (Two half-days)



  • Short review of rhe Unit-test package and doctest.
  • Getting started with testing: top-down and bottom-up.
  • The rest of the course covers Pytest:
  • Setup
  • Test a module
  • Capture Standard output and standard error
  • Skipping irrelevant tests
  • Tests that are expected to fail
  • Setup and teardown methods
  • Fixtures
  • Creating your own fixtures
  • Separating test executions
  • Parallel test run
  • Testing web applications
  • Creating and understanding test coverage
  • Faking an external API
  • Testing error conditions
  • Verifying the proper exceptions are raised.
  • Testing how the application behaves when a third-party API breaks.
  • Faking random numbers for testing


If you are interested in this course, contact Gabor Szabo for more details.