PyCon Pittsburgh. April 15-23, 2020.

Talk: Write Less and Test More with Data Regression Testing

Presented by:

Igor T. Ghisi

Description

As data structures of a project increases in size and complexity, it becomes harder and harder to preserve test completeness. Testing objects with dozens of attributes and arrays with hundreds of values could turn into a laborious task. Often, programmers let these kind of data partially tested, especially if the required code coverage was already achieved.

In this talk we’ll show how to increase test completeness for data structures by applying data regression testing. We’ll be presenting pytest-regressions, a pytest plugin that helps to test datasets and objects by automatically serializing expected data on disk and later checking test results against it. We’ll also show how pytest-regressions make it easier to inspect test data and debug failing tests. The talk will demonstrate examples of data regression being applied to numerical algorithms, web APIs, Flask views and SQLAlchemy models.

Video

Watch on YouTube