All Practice Exams

100+ Free PCET Practice Questions

Pass your OpenEDG PCET — Certified Entry-Level Tester with Python exam on the first try — instant access, no signup required.

✓ No registration✓ No credit card✓ No hidden fees✓ Start practicing immediately
~70-80% Pass Rate
100+ Questions
100% Free
1 / 10
Question 1
Score: 0/0

What does the AAA pattern stand for in unit testing?

A
B
C
D
to track
2026 Statistics

Key Facts: PCET Exam

30

Exam Questions

OpenEDG

40 min

Exam Duration

OpenEDG

70%

Passing Score

OpenEDG

$59

Exam Fee

OpenEDG

Lifetime

Validity

No expiration

Online

Delivery

OpenEDG Testing Service

The PCET exam has 30 questions in 40 minutes with a 70% passing score. Domains cover Python recap and testing fundamentals (~20%), unittest (~20%), pytest (~25%), mocking and test doubles (~15%), code coverage and CI integration (~10%), and end-to-end / BDD / API testing (~10%). Fee is $59 USD. Delivered online via OpenEDG Testing Service. Lifetime validity, no expiration. PCEP is recommended but not required.

Sample PCET Practice Questions

Try these sample questions to test your PCET exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1What does the AAA pattern stand for in unit testing?
A.Assemble, Activate, Assert
B.Arrange, Act, Assert
C.Allocate, Apply, Audit
D.Authenticate, Authorize, Audit
Explanation: AAA = Arrange (set up data and dependencies), Act (invoke the code under test), Assert (verify the result). Following this pattern keeps each test focused, readable, and easy to maintain.
2In the testing pyramid, which layer should have the MOST tests?
A.End-to-end tests
B.Integration tests
C.Unit tests
D.UI tests
Explanation: The testing pyramid prescribes many fast unit tests at the base, fewer integration tests in the middle, and very few slow end-to-end tests at the top. This balances confidence with execution speed and maintenance cost.
3Which of the FIRST principles requires that tests can run in any order?
A.Fast
B.Independent
C.Repeatable
D.Self-validating
Explanation: FIRST = Fast, Independent, Repeatable, Self-validating, Timely. Independent means each test can run alone or in any order — no shared state between tests. This is what allows pytest to run tests in parallel safely.
4Which method is called BEFORE every test method in a unittest.TestCase subclass?
A.init()
B.setUp()
C.before()
D.prepare()
Explanation: `setUp(self)` runs before each test method to set up fresh state. `tearDown(self)` runs after each test for cleanup. The class-level equivalents are `setUpClass(cls)` (with @classmethod) and `tearDownClass(cls)`.
5Which unittest assertion verifies that two values are equal?
A.self.assertSame(a, b)
B.self.assertEqual(a, b)
C.self.assertMatch(a, b)
D.self.assertEquals(a, b)
Explanation: `self.assertEqual(a, b)` is the canonical assertion for value equality (using ==). `assertEquals` is a deprecated alias. `assertSame` does not exist. Use `assertIs(a, b)` for identity (is) and `assertAlmostEqual` for floating-point comparison.
6Which assertion confirms that a specific exception is raised when calling a function?
A.self.assertRaises(ExceptionType, func, *args)
B.self.assertException(ExceptionType, func)
C.self.expectError(ExceptionType, func)
D.self.willRaise(ExceptionType)
Explanation: `self.assertRaises(ExceptionType, callable, *args, **kwargs)` calls the callable and asserts the exception was raised. The context-manager form is also common: `with self.assertRaises(ValueError): risky_call()`.
7Which assertion compares two floating-point numbers within a tolerance?
A.self.assertEqual(a, b)
B.self.assertAlmostEqual(a, b, places=7)
C.self.assertFloat(a, b)
D.self.assertNear(a, b)
Explanation: `self.assertAlmostEqual(a, b, places=7)` checks that `round(a - b, places) == 0` — the default is 7 decimal places. Use `delta=` for a custom absolute tolerance. Plain `assertEqual` on floats can fail due to precision (e.g. 0.1 + 0.2 != 0.3).
8Which decorator unconditionally skips a unittest test method?
A.@unittest.skip('reason')
B.@unittest.ignore
C.@unittest.disabled
D.@skipTest
Explanation: `@unittest.skip('reason')` skips the test. Variants include `@unittest.skipIf(condition, 'reason')`, `@unittest.skipUnless(condition, 'reason')`, and `@unittest.expectedFailure` (test SHOULD fail; passing is reported as unexpected success).
9Which decorator marks a test that is expected to fail (and reports a real pass as 'unexpected success')?
A.@unittest.expectedFailure
B.@unittest.fail
C.@unittest.todo
D.@unittest.knownBug
Explanation: `@unittest.expectedFailure` declares that the test currently fails (e.g. for a known bug). If it passes, the runner reports an 'unexpected success' so you remember to remove the decorator. Useful for documenting open bugs.
10Which command runs unittest test discovery from the project root?
A.python -m unittest discover
B.python -m unittest run
C.python -m unittest .
D.python unittest discover
Explanation: `python -m unittest discover` finds and runs every `test_*.py` (or `*_test.py`) file in the current directory tree. Pass `-s` to set the start directory and `-p` to override the file pattern.

About the PCET Exam

The OpenEDG PCET (Certified Entry-Level Tester with Python) certification validates entry-level software-testing and test-automation skills using Python 3. It covers software testing fundamentals, the unittest module, the pytest framework, the unittest.mock library, code coverage with coverage.py, Selenium WebDriver basics, BDD with behave / pytest-bdd, and API testing with requests. PCET sits alongside PCED (data analyst) and PCES (security) in OpenEDG's Python specialization track.

Questions

30 scored questions

Time Limit

40 minutes

Passing Score

70%

Exam Fee

$59 USD (OpenEDG / OpenEDG Testing Service)

PCET Exam Content Outline

~20%

Python Recap and Testing Fundamentals

Python data types, exceptions, OOP basics; software testing fundamentals — unit/integration/system tests, test pyramid, AAA pattern (Arrange/Act/Assert), FIRST principles (Fast/Independent/Repeatable/Self-validating/Timely), test design

~20%

unittest

TestCase class; setUp/tearDown/setUpClass/tearDownClass; assert methods (assertEqual, assertNotEqual, assertTrue, assertFalse, assertIsNone, assertRaises, assertAlmostEqual, assertIn, assertCountEqual); test discovery; test runner; @unittest.skip / @unittest.skipIf / @unittest.skipUnless / @unittest.expectedFailure

~25%

pytest Framework

Test functions and plain assert; @pytest.fixture and scopes (function/class/module/session); @pytest.mark.parametrize; marks; conftest.py; pytest.ini; CLI flags (-v, -x, -k, -m); yield fixtures; monkeypatch; tmp_path; pytest plugins

~15%

Mocking and Test Doubles

unittest.mock — Mock, MagicMock, patch decorator and context manager, return_value, side_effect, call_args, assert_called_with; categories of test doubles (dummy, fake, stub, spy, mock); when to use each

~10%

Code Coverage and CI

coverage.py and the --cov pytest plugin; line vs branch coverage; coverage thresholds; integrating tests with CI; reading coverage reports

~10%

End-to-End, BDD, and API Testing

Selenium WebDriver basics (driver, find_element, By.ID/CLASS_NAME/CSS_SELECTOR/XPATH, click, send_keys, get, current_url, WebDriverWait + expected_conditions); BDD with behave / pytest-bdd (Gherkin Given/When/Then, .feature files, step definitions); API testing with requests + pytest; performance-testing intro with locust

How to Pass the PCET Exam

What You Need to Know

  • Passing score: 70%
  • Exam length: 30 questions
  • Time limit: 40 minutes
  • Exam fee: $59 USD

Keys to Passing

  • Complete 500+ practice questions
  • Score 80%+ consistently before scheduling
  • Focus on highest-weighted sections
  • Use our AI tutor for tough concepts

PCET Study Tips from Top Performers

1Memorize the AAA pattern (Arrange / Act / Assert) and the FIRST principles (Fast, Independent, Repeatable, Self-validating, Timely) — both show up in concept questions
2Know the unittest assert family inside out: assertEqual vs assertIs vs assertAlmostEqual; assertRaises as both method and context manager
3For pytest fixtures, understand all four scopes: function (default), class, module, session — and what 'session' means for setup cost
4Practice @pytest.mark.parametrize with multiple parameters and ids — gap-fill questions love this syntax
5Be precise about test doubles: a stub returns canned data; a mock verifies interactions; a fake has working logic but is not production-ready
6When using mock.patch, remember to patch where the name is looked up, not where it is defined
7Know the difference between line coverage and branch coverage — branch coverage is what catches missed if/else paths

Frequently Asked Questions

What is the OpenEDG PCET exam?

The PCET (Certified Entry-Level Tester with Python) is an entry-level software-testing certification from the OpenEDG Python Institute. It validates the ability to write automated tests in Python using unittest and pytest, mock dependencies, measure coverage, and write basic UI/API/BDD tests. PCET is part of OpenEDG's Python specialization track alongside PCED and PCES.

How many questions are on the PCET exam?

The PCET exam has 30 questions in 40 minutes. Item formats include single-select, multi-select, drag-and-drop, gap-fill, and code-snippet questions. The passing score is 70%.

What is the PCET exam fee?

The PCET exam fee is $59 USD via the OpenEDG Testing Service online proctoring platform. Vouchers are sometimes available through OpenEDG promotions and partner academies.

Are there prerequisites for PCET?

There are no formal prerequisites. PCEP (Certified Entry-Level Python Programmer) is strongly recommended — PCET assumes you can already write Python functions, classes, and exception handlers. The certification then layers testing concepts and frameworks on top of that base.

How should I prepare for PCET?

Plan for 40-60 hours of study over 4-6 weeks. Work through the official OpenEDG Python testing course on edube.org. Write at least one small project covered by both unittest and pytest. Practice writing fixtures, parametrized tests, and patches with unittest.mock. Run coverage.py and learn to read its output. Aim for 80%+ on practice questions before scheduling.

Does the PCET certification expire?

No. PCET has lifetime validity with no expiration and no continuing-education requirement, consistent with OpenEDG's other entry-level Python credentials (PCEP, PCED, PCES).