Chapter 9Automated Testing

For a long time in the web development world, automated testing was unlikely to be part of a developers’ toolkit. Nowadays, a test suite is an integral part of most successful projects, libraries, and frameworks. An automated test suite is a series of tests that can be run to ensure that the business logic of your code is behaving as it should. There are a variety of test types: from checking the end-to-end processes of your code, to simply testing that a single function or method does as it’s supposed to. In this chapter, we’ll look at the tools that Go provides out of the box for writing and running a test suite.

Writing tests at the start of a project is a great way to explore the requirements of a set piece of work, ...

Get Level Up Your Web Apps With Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.