There are countless books and articles on automated testing. But it doesn't have to be complicated - it's really just making your computer do your work for you. This talk looks at using pytest to get started with automated testing and shares some tips for getting the most of its unique features.
Automated testing and unit testing are popular topics in the field of software development, with numerous books, articles, blog posts, and debates. However, a lot of the material on unit tests quickly delves into theory and specifics, and a lot of it can just leave you feeling guilty about not doing more if it. It doesn’t have to be this complicated, though. We already naturally test our code after we write it - so automated testing can be as simple as taking the steps we use to test it and putting them in a script. As developers, we automate things for a living; this can (and should) extend to automating the process of testing our code.
And pytest in particular happens to work really well for automated testing - it has several features and plugins that make it painless to get started and rewarding to use, and that makes a positive feedback loop for going further into more advanced testing.
This talk presents a brief background of automated testing and unit testing, compares pytest to Python’s built-in
unittest module, explains how to get started with or switch to pytest, and presents several pytest features and plugins that make it more powerful and rewarding.