If the pipeline is a "DOT regulated line", most operating companies will have a formal Hydrotest Procedure to make sure the tested pipe and components meet the requirements of DOT “Transportation of Hazardous Liquids by Pipeline”, 49CFR.195, Subpart E and/or “Transportation of Natural or Other Gas by Pipeline” 49CFR Part 192 Subpart J.
Off the top of my head a few of the more important factors are pipe size/grade, desired operating pressure, elevation data along the pipeline route, test water source and water properties, post test treatment(biocides), test equipment specifications, test duration, documentation and reports etc. etc. The list is actually quite long of all the pertinent data and steps.
Long pipelines , say 150 to 200 miles can have several test segments depending on many of the factors mentioned.