Stephan Jaensch - Fixture factories for faster end-to-end tests
Channel: EuroPython Conference
Date: 2017-10-21

"Fixture factories for faster end-to-end tests
[EuroPython 2017 - Talk - 2017-07-13 - Anfiteatro 2]
[Rimini, Italy]

When developing and maintaining many different services, unit testing is not enough to make sure your code works in production. By now, many teams doing SOA (service-oriented architectures) have a set of end-to-end tests that cover critical workflows to make sure these work. For these tests, all of the utilized services need to have the proper test fixture data in their datastores. This often leads to developers having to deal with raw datastore data (like JSON or SQL) for these tests, making the authoring of those tests very slow, tedious, and error-prone.

This talk is going to discuss several approaches we tried at Yelp to generating these fixture data in a quicker, developer-friendly and more correct way. 

The main part of the talk will be a deep-dive into what fixture factories are, how to implement them and how to integrate them with pytest, the leading Python testing framework. I'll show you several other benefits this approach has over writing raw fixture data and how this leads to more maintainable and easier to adapt code. We'll also explore how you can then run your tests in parallel, cutting down runtime drastically.

License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/
Please see our speaker release agreement for details: https://ep2017.europython.eu/en/speaker-release-agreement/