Milecia McGregor profile image

Milecia McGregor

Conducto

Unit Testing Your Docs

Biography

Milecia is a senior software engineer that’s worked with JavaScript, Angular, React, Node, PHP, Python, .NET, SQL, AWS, Heroku, Azure, and many other tools to build web apps. She also has a master’s degree in mechanical and aerospace engineering and has published research in machine learning and robotics. She started Flipped Coding in 2017 to help people learn web development with real-world projects and she publishes articles covering all aspects of software on several publications, including freeCodeCamp. She also travels around the world speaking at tech conferences about various software engineering topics ranging from machine learning, PWAs, and managing a career in tech.

Talk description

API docs have code snippets in them to help users get through simple and complex problems. Those code snippets are the ones most likely to be broken. In this talk, you’ll learn how to ensure that none of the code in your docs will be out of date & how you can make it part of your deploy cycle.

When you’re focused on getting a bug release shipped, one of the last things you’re thinking about is updating the docs. So the docs get shipped and become out of date with the current version of your API. That’s when users start getting confused and it could take weeks to figure out it’s because they are copying an old example from your documentation.

By including unit tests for all of the code snippets you use, you’re setting yourself up for long-term success with documentation maintenance. It’s no different than writing tests for the APIs and it will save you a lot of time trying to handle user questions. By the time attendees leave this talk, they will know how to implement unit testing into their new or existing docs and how they can deploy them.