Contribute Media
A thank you to everyone who makes this possible: Read More

How to TDD a REST API

Description

If you’re working with a framework for writing APIs (and who doesn’t), writing tests up front, almost guarantees the tests will be ugly. And the code might not be that great, either. TDD is great for unit tests, but if you take it up a level, for REST APIs, or an end-to-end behavior, TDD may not look like the tool as advertised.

Unless…

TDD can work for building REST APIs. And I’m not talking about just writing a test before the code, but the entire TDD experience, with tests passing every few minutes. But unlike “regular” TDD, it doesn’t just work. We need to prepare and plan a bit before we can harness of the power of TDD in our real-world applications. In this session, I’m going to go step by step of building APIs from scratch, including the thinking of what to do next. I’ll be using small steps, and show you where I backtracked and made changes. At the end we’ll have working APIs, with tests that prove that they work. TDD is not just for unit tests anymore.

#PWC2022 attracted nearly 375 attendees from 36 countries and 21 time zones making it the biggest and best year yet. The highly engaging format featured 90 speakers, 6 tracks (including 80 talks and 4 tutorials) and took place virtually on March 21-25, 2022 on LoudSwarm by Six Feet Up.

More information about the conference can be found at: https://2022.pythonwebconf.com

Details

Improve this page