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.

Goals

  • 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)

Audience

  • Developers
  • QA engineers
  • DevOps engineers
  • Automation engineers

Prerequisites

  • 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)

Syllabus

Details

  • 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

Resources


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