testing for people who hate testing
Post on 29-Jun-2015
Embed Size (px)
DESCRIPTIONSF Python Meetup lightning talk on unit testing with pytest.
- 1. Testing for people who hate writing tests Tips and tricks for organizing and writing simple tests with pytest.
2. Writing tests is painful what to test how to do it takes time QQ... 3. Case study User facing Mobile API (Bono) Livelovely.com (Spot) Pro.livelovely.com (Pearl) Messaging API (Ditto) Photo API (Jiris) 4. Organizing mimic application structure easy to remember helps scope tests easy test hooks pytest discovery http://pytest.org/latest/goodpractises. html#conventions-for-python-test-discovery 5. Theres a fixture for that... test fixture is a fixed state of the software under test used as a baseline for running tests; also known as the test context. reusable bits of code that are used to write tests. fixtures replace traditional setup/teardown fixtures can be built on top of each other 6. Request fixture 7. User fixture 8. Test using fixture 9. Interaction Fixture 10. Test using fixture 11. @linuxlewis -- @lovely http://livelovely.com firstname.lastname@example.org http://github.com/linuxlewis https://github.com/linuxlewis/sfpython-pytest