© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
D. IrvineBuild Your Own Test Frameworkhttps://doi.org/10.1007/978-1-4842-9247-1_12

12. Tagging Tests

Daniel Irvine1  
(1)
London, UK
 

When test suites become large, they can become slow to run. Tagging gives us a mechanism for slicing and dicing test suites in ways that allow them to be run differently depending on the run context. You can associate a group of tests with a tag of your choosing (ui, e2e, slow, etc.) that you can then use on the command line to run only these tests (or to avoid running these tests).

This is also useful because a generalized automated test runner, like the one we’re building, can be used for many different types of test, ranging ...

Get Build Your Own Test Framework: A Practical Guide to Writing Better Automated Tests 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.