We have a couple of standardized test numbers right across the British network now, at least as far as all BT exchanges are concerned.
The older-style system connects the line straight into the automatic tester, reads back the number, and holds the line up while it does battery/earth/insulation tests on the line, then rings back with the result.
The newer system picks up the regular CLI sent from the line (and in fact will also tell you if the line you are calling from normally has CLI withheld) before offering a whole batch of test options.
We also have a handy test number which can be used from any line on the same exchange to put a test tone on a specified line.