Achieving coherent sampling has always been a major challenge in analog-to-digital converter (ADC) spectral testing. If the coherent sampling condition cannot be met, leakage appears in the spectrum, which results in inaccurate parameters. The windowing method is widely used to process ADC data to eliminate leakage. However, this method requires prior knowledge about the type of window, and some commonly used windows cannot provide accurate results for a high precision ADC. In this paper, some general principles for optimizing the cosine-sum window and some windows with maximum side-lobe decay have been presented. A test method for eliminating the leakage caused by non-coherent sampling is also proposed. The proposed method can accurately evaluate the dynamic parameters of an ADC with arbitrary non-coherency. Various simulation results and measurement data demonstrate the functionality and robustness of the proposed method. The proposed method significantly relaxes the condition of coherent sampling and decreases the test cost.