You should give more information on the pipe you wish to test and the service it will be in. All important pipework is designed, installed and tested to a reputable code these days and the relevant code (of which there are many) normally specifies the pressure that the pipe must be hydrotested to. If you give us details of the system you are dealing with we can point you to codes that are relevant. We need to know for example if you are dealing with steel, cast iron, plastic or concrete pipe. Also, what is the service? Is it water, oil, gas or steam?. Also, what industry are you dealing with?. Is it building services, high pressure oil and gas, power generation?.
In general you will find that the hydrostatic test pressure is a percentage over the intended design pressure of the line. Formulas are used to determine the design pressure of the line, not normaly the hysrostatic test pressure. Long cross country oil and gas lines for example are tested to 25% over their design pressure while refinery and power station piping is tested to 50% over the design pressure. Depending on the relevant code the hydrostatic test pressure may have to be adjusted for the design temperature of the line, and possibly the corrosion allowance used in the design of the line.
So as you can see there is no simple formula for determining the hydrostatic test pressure of a pipeline. Please feel free to email me with details and I will do my best to point you in the right direction.