@ Sauce Labs • Evangelist of software engineering in Python • Substack - pythoneer.substack.com • Fan of Bartosz Walaszek • Apprentice of alternative coffee brewing methods whoami
of vendor’s API 2. Browsing offers from one vendor 3. Ability to make a purchase on one vendor 4. Adding 2nd vendor with refactoring 5. Adding more vendors
a user see some change after their action? • Where other types of users can see some effect? • How this action affects other features? • What a user can now do which they couldn’t do before? • What a user can no longer do which they were able to do before?
- Pick up a task and ensure it can be veri f ied • Step #2 - Come up with acceptance testing scenario(s) • Step #3 - Write a test for this scenario (or at least empty test) • Step #4 - Implement the feature • Step #5 - Check code coverage • Repeat steps 2-5 until satis f ied
Returned result (from a function / a method) • Raised exception (or lack of it) • State veri f ication - we call one method / endpoint, then we check result using other method / endpoint • Interaction - Mocks • e.g. assert_called_once_with
tests • Add more lower-level tests if necessary (fractal testing) • Test(s) end-to-end / synthetic monitoring etc • # pragma: no cover where it makes sense (e.g. abstract methods)