The COVID-19 pandemic poses challenges for continuing economic activity while reducing health risks. While these challenges can be mitigated through testing, testing budget is often limited. Here we study how institutions, such as nursing homes, should utilize a fixed test budget for early detection of an outbreak. Using an extended network-SEIR model, we show that given a certain budget of tests, it is generally better to test smaller subgroups of the population frequently than to test larger groups but less frequently. The numerical results are consistent with an analytical expression we derive for the size of the outbreak at detection in an exponential spread model. Our work provides a simple guideline for institutions: distribute your total tests over several batches instead of using them all at once. We expect that in the appropriate scenarios, this easy-to-implement policy recommendation will lead to earlier detection and better mitigation of local COVID-19 outbreaks.