Two types of approaches -- physical inspection and mathematical-model simulation -- are used to identify a leak in a gas pipeline. The former method can result in an accurate detection of the location and the size of the leak, but comes with the expense of production shutdown and the high cost/long time to run the physical detection, which is very crucial in long-distance gas pipeline. The latter approach detects a gas leak by solving the governing equations, thus leading to quick evaluation at much lower costs, but with higher uncertainties. Our literature review indicates that a simple, practical, and reliable method to detect a gas leak under the conditions of unknown inlet or outlet gas rate, or unknown inlet or outlet pressure, is highly desirable. In this study, we develop single and multiple rate test methods to detect leaks in a gas pipeline. By conducting multiple rate tests, the location and size of leaks can be detected. The new method can be applied under the conditions of no inlet or outlet rate available or no inlet or outlet pressure available. Because these conditions are not uncommon in gas-pipeline transportation, our method provides a quick and low-computational-cost approach to detect leaks corresponding to different scenarios.