The COVID-19 pandemic has highlighted the crucial role of testing in mitigating disease transmission. This study comprehensively evaluates the effectiveness and cost-efficiency of various testing strategies, including daily screening, symptom-based testing, and contact-based testing, using assays such as RT-PCR, RT-LAMP, and antigen tests. Employing stochastic modeling on a contact network, we assessed the impact of these strategies on outbreak control, using COVID-19 as a case study. Our findings demonstrate that daily screening, particularly with RT-PCR and RT-LAMP, significantly reduces transmission risks but incurs higher costs. In contrast, symptom-based testing offers a more cost-effective alternative, albeit with lower efficacy in mitigating outbreaks. Notably, testing turnaround time emerges as a more critical factor than assay sensitivity in containing outbreaks. Moreover, combining symptom-based testing with contact tracing further reduces outbreak probability and scale. To provide a comprehensive analysis, we also explored the application of these strategies in scenarios where a portion of the population has acquired immunity. Our results suggest that testing all symptomatic individuals is the most effective and cost-efficient approach in the later stages of an epidemic. These findings provide valuable insights for optimizing testing strategies to tackle current and future infectious disease outbreaks effectively and efficiently. By adapting strategies based on the stage of the epidemic, population immunity, and available resources, public health authorities can design targeted interventions to protect communities while managing limited resources.