Unit Testing with Python Training Course

Course Code

pytest

Duration

21 hours (usually 3 days including breaks)

Requirements

  • A general understanding of automation testing

Overview

Unit testing is a testing approach that tests individual units of source code by modifying their properties or triggering an event to confirm whether the outcome is as expected. PyTest is a full-featured, API-independent, flexible, and extensible testing framework with an advanced, full-bodied fixture model.

In this instructor-led, live training, participants will learn how to use PyTest to write short, maintainable tests that are elegant, expressive and readable.

By the end of this training, participants will be able to:

  • Write readable and maintainable tests without the need for boilerplate code
  • Use the fixture model to write small tests
  • Scale tests up to complex functional testing for applications, packages, and libraries
  • Understand and apply PyTest features such as hooks, assert rewriting and plug-ins
  • Reduce test times by running tests in parallel and across multiple processors
  • Run tests in a continuous integration environment, together with other utilities such as tox, mock, coverage, unittest, doctest and Selenium
  • Use Python to test non-Python applications

Audience

  • Software testers

Format of the course

  • Part lecture, part discussion, exercises and heavy hands-on practice

Course Outline

Introduction to Unit Testing with PyTest

Unit Testing with UnitTest vs Unit Testing with PyTest

Writing Readable and Maintainable Tests

Using Mocks, Fakes and Stubs

Using Hooks, Assert Rewriting and Plug-ins

Streamlining Your Tests with Fixtures and Parameterized Testing

Obtaining the Desired Test Coverage

Generating Testable Documentation with Doctest

Integrating Python Unit Tests into a Continuous Integration (CI) Environment

Scaling Your Python Unit Tests

Use Python to Test Non-Python Applications

Summary and Conclusion

Bookings, Prices and Enquiries

Guaranteed to run even with a single delegate!

Private Classroom

From £3750

Private Remote

From £3300 (99)

Public Classroom

Cannot find a suitable date? Choose Your Course Date >>Too expensive? Suggest your price

Course Discounts

Course Discounts Newsletter

We respect the privacy of your email address. We will not pass on or sell your address to others.
You can always change your preferences or unsubscribe completely.