Selective testing is a key technique necessary for working with any large codebase or monorepo: picking which tests to run to validate a change or pull-request, because running every test every time is costly and slow. This blog post will explore what selective testing is all about, the different approaches you can take with selective testing, based on my experience working on developer tooling for the last decade at Dropbox and Databricks. Lastly, we will discuss how selective testing is supported by the Mill build tool.
Although codebases can be large, in any large codebase you are typically only working on a fraction of it at any point in time. As an example that we will use throughout this article, consider a large codebase or monorepo that contains the code for:
The three deployments may be combined into a staging_environment, which is then used in three sets of end_to_end_tests, one for each deployment