Book Announcement: Speed Up Your Django Tests2020-05-04
At the start of March I started writing a blog post called “How to Speed Up Your Django Tests.” Before I knew it, the outline alone was 4,000 words! I realized writing it up would be a major undertaking. As lockdown arrived, I found the time to write it all up.
So, I’m delighted to announce my new book, coming May 18…
Speed Up Your Django Tests!
It’s a practical guide to making your Django project’s tests faster. It has many tips and tricks that apply to all projects, big and small. And it covers the two most popular test runners: Django’s test framework and pytest.
Reducing test run time is the easiest and safest way to increase your speed of delivery. And it’s an organic way of increasing team happiness!
The content is based on my 8 years of experience with tests on Django projects. I’ve sped up many projects’ test suites, improved Django’s own testing framework, and created several pytest plugins.
It contains 13 chapters:
- Introduction - Opening notes, how to use the book.
- Toolbox - A tour of the various tools you can use to change how your tests run.
- Measure! - The importance of profiling, with walkthroughs using two different profilers on a test suite.
- Easy Wins - 11 things you can do in 5 minutes to speed up your test suite.
- Upgrades - The importance of upgrades, and some how-to guidance to get them done easily.
- Parallelize - How to use test suite parallelization to boost your tests.
- Migrations - Reduce the overhead of building your test database.
- Database Configuration - Tweak your database’s configuration to get more speed.
- CI Configuration - And tweak your CI configuration to boost test speed too.
- Test Structure - Notes on the best structure for fast, accurate tests, and ways you can restructure.
- Test Data - The best strategies for creating data in your tests.
- Targeted Mocking - A guide to mocking, and the best libraries for mocking out specific things such as HTTP requests and time.
- Outroduction - Closing notes with extra links.
Pre-order now on Gumroad for $39 (US dollars), with higher tiers if you’re buying to share with teams of more than 3 people. After the release on May 18, the price will increase to $49.
Thanks for learning about my project,
Working on a Django project? Check out my book Speed Up Your Django Tests which covers loads of best practices so you can write faster, more accurate tests.
One summary email a week, no spam, I pinky promise.
- "Speed Up Your Django Tests" is Out Now
- Announcing a Regional Discount for “Speed Up Your Django Tests”
- Django's Test Case Classes and a Three Times Speed-Up
Tags: django, pytest, python
© 2020 All rights reserved.