Einstein’s general relativity theory provides a successful understanding of the flow of time in the gravitational field. From Einstein’s equivalence principle, the influence of the Sun and Moon masses on clocks is given in the form of tidal potentials. Two clocks fixed on the surface of the Earth, compared to each other, can measure the tidal effects of the Sun and Moon. The measurement of tidal effects can provide a test for general relativity. Based on the standard general relativity method, we rigorously derive the formulas for clock comparison in the Barycentric Celestial Reference System and Geocentric Celestial Reference System, and demonstrate the tidal effects on clock comparison experiments. The unprecedented performance of atomic clocks makes it possible to measure the tidal effects on clock comparisons. We propose to test tidal effects with the laboratory clock comparisons and some international missions, and give the corresponding estimations. By comparing the state-of-the-art clocks over distances of 1000 km, the laboratory may test tidal effects with a level of 1%. Future space missions, such as the China space station and FOCOS mission, can also be used to test tidal effects, and the best accuracy may reach 0.3%.