Making Pytest Your Batman

Abstract

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.

Talk Description

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.

About the Talk

About the Author

I'm a lifelong developer, geek, recovering sysadmin, husband, and father. I started typing in BASIC programs out of books and magazines as a kid and have been writing software ever since. I've developed software for a variety of environments - desktop, web, server-side, and embedded - in a variety of languages, and I currently work for Corgibytes, LLC, helping companies remodel their legacy code. When I'm not writing code or reading up on the latest trends in software development, I enjoy time with my family; playing board games and computer games; reading fantasy and sci-fi; and walking, hiking, or biking in beautiful East Tennessee.