markzu,
The B31.1 Code has several levels of requirements for pressure testing to ensure leak tightness.
1). Para 137.3.1 Boiler External Piping shall be hydrotested ... in presence of the AI.
2) Nonboiler External Piping shall be hydrotested,or when specified by owner, alternative test of pneumatic, halide leak, or initial service testing is accepted.
3) Lines open to the atmosphere, such as vents or drains past the shutoff valve, are not required to be tested.
The B31.3 Process Piping Code has provisions for alternative leak testing, again to be specified by owner, which include an option for radiogragraphy supplemented by sensitive leak test plus stress analysis, in lieu of a hydrotest.
The B31.1 Power piping Code does not have specific limitations for the initial service testing, as does the B31.3 Code limits for service testing. The only B31.1 Power Code limit for initial service testing is that it does not apply to boiler external piping. I would suggest considering the fluid service hazards, and the difficulty of repairs for leaks found by initial service tests. If the piping is to be insulated, then the welded and flanged joints need to be left uncovered for initial service testing. If the fluid is flammable, then a pneumatic test could possibly be applied on smaller piping systems. If the piping system is for higher pressures, say CL300 and above, then take extra precautions for restricting personnel in area during an initial service test. If weld repairs on a piping leak would require cleaning and decontamination of a pipe line, then do the leak test before line is put into service.