If I was you I would use Asme b31.3 to design your test end. Remember that for your test end, the design pressure is actually the test pressure, hence your test end may be a thicker pipe than the one you are testing. If you're testing a pipeline, you can use the pipeline code, preferably the liquid one, but again, IMO, you need to use a higher pressure than the pipeline design pressure because that is it's working pressure. This may mean you need higher rated flanges than the rest of your system.
There's nothing particularly special about a test end that isn't covered by 31.3 in the same way you would design a header. If in doubt make it thicker or go up a flange rating....
My motto: Learn something new every day
Also: There's usually a good reason why everyone does it that way