Clinic testing plays a critical role in containing infectious diseases such as COVID-19. However, one of the key research questions in fighting such pandemics is how to optimize testing capacities across clinics. In particular, domain experts expect to know exactly how to adjust the features that may affect testing capacities, given that dynamics and uncertainty make this a highly challenging problem. Hence, as a tool to support both policymakers and clinicians, we collaborated with domain experts to build ClinicLens, an interactive visual analytics system for exploring and optimizing the testing capacities of clinics. ClinicLens houses a range of features based on an aggregated set of COVID-19 data. It comprises Back-end Engine and Front-end Visualization that take users through an iterative exploration chain of extracting, training, and predicting testing-sensitive features and visual representations. It also combines AI4VIS and visual analytics to demonstrate how a clinic might optimize its testing capacity given the impacts of a range of features. Three qualitative case studies along with feedback from subject-matter experts validate that ClinicLens is both a useful and effective tool for exploring the trends in COVID-19 and optimizing clinic testing capacities across regions. The entire approach has been open-sourced online: https://github.com/YuDong5018/clinic-lens.