Understand the fundamentals of software testing, learn how different testing techniques fit into the development process, and prepare for the PCAT™ – Certified Associate Tester with Python certification.
Python for Testing 102 (PT102) takes you beyond the fundamentals and into the practical world of building clean, maintainable, and scalable test suites using Python. You’ll learn how professional testers structure their code, manage resources, design robust assertions, apply mocking and fixtures, work with both unittest and pytest, and use TDD/BDD workflows to drive development with clarity and confidence.
By completing this course, you’ll build a strong foundation in software testing and be prepared for the PCAT™ – Certified Associate Tester with Python certification.
Enroll in Python for Testing 102 (PT102) and gain practical skills in:
unittest and advanced assertion techniques.pytest for scalable, expressive testing workflows.INTERMEDIATE
--
Intermediate
30-40 hours
English
Free
This course is the second in the Testing Essentials series, designed to prepare you for the PCAT™ – Certified Associate Tester with Python certification exam.
The Python for Testing 102 (PT102) is a hands-on, project-driven continuation of PT101. Across this course you’ll deepen your testing practice with both unittest and pytest, level up your use of fixtures and parameterization, mock external dependencies cleanly, and round it out with TDD and BDD.
Python for Testing 102 (PT102) is ideal for:
To get the most out of PT102, you should have:
You should already be comfortable with basic Python programming. We recommend completing Python for Testing 101 (PT101), holding the PCEP™ – Certified Entry-Level Python Programmer certification, or having equivalent experience.
By the end of this course, you will be able to:
unittest toolkit – apply test anatomy and F.I.R.S.T., write precise assertions (assertEqual, assertAlmostEqual, assertRaises, assertCountEqual), remove duplication with setUp/tearDown and class/module hooks, use subTest(), and control runs with @skip/@expectedFailure.pytest for speed and clarity – native assert with rich introspection, reusable fixtures (including yield cleanup) and scopes (function → session), parameterization with @pytest.mark.parametrize, markers (skip/xfail/importorskip), targeted selection (-k/-m), verbosity and reports (-v, -r), and centralized config in pytest.ini.unittest.mock (stubs/fakes/spies, Mock/MagicMock, patch with spec/create_autospec) and the pytest-mock mocker fixture ("mock where it’s used").pytest-cov and share results via pytest-html (including self-contained reports).zip()), then describe behavior with Gherkin (Feature/Scenario, Given/When/Then) and bind to Python step definitions (e.g., behave).unittestsetUp, tearDown, and class-level fixturessubTest()unittest.mock@pytest.mark.parametrizebehave