-
Notifications
You must be signed in to change notification settings - Fork 0
Testing and Debugging
Python testing and debugging are optional practice for the Module Three Assignment. The graded deliverables are the flowchart and pseudocode.
If you complete the optional Python program, testing helps you check whether the program actually follows your design.
Run the optional program and try values that exercise different paths.
Boundary values are especially useful. In this assignment, 40 hours is the point where the pay rule changes for additional hours.
The provided SRS includes four numeric acceptance cases you can use for practice.
From the repository root:
python3 tests/test_paycheck_calculator.pyThe tests run your program with several values and look for the expected numeric paycheck in its output.
They do not require one exact prompt or currency format because the assignment does not specify exact wording for the optional Python implementation.
When a test fails, compare four things:
- Requirement — what should happen?
- Flowchart — what did you design?
- Pseudocode — what did you design in text form?
- Python — what did you implement?
Find the first place where they disagree. Fix one problem, then test again.
If the design is wrong, update the design first. If the design is correct but the program differs, update the program.
A failed test tells you that the observed result does not match the expected result for that case. Read the failure message and use the input value to reproduce the problem manually.
You do not need to understand every line of the provided test script to benefit from its results.