Various test numbers have also existed here for decades.
Ring-back numbers existed on most exchanges in the past, although there was no standard number. 1267 was a common one, and sometimes a 17x or 18x code, but there were others.
The GPO (and later BT) have employed automatic routiners to test lines for years. The devices became known as SALT machines (Subscriber Apparatus & Line Testing). Again, different codes were used for access, but 175 was a common one, and has become the standard code for all the digital exchanges.
The routiner tests the line, rings back, and gives a verdict: "Testing OK," "Earth A", "Battery B", etc. You then get an interrupted dial tone on which you dial a single digit to perform other tests.
The only option that's really of use to a regular home line is the dial test, for which you dial 1. You get a "Start test" message and a new dial tone, at which you dial all the digits in sequence and the routiners checks for correct frequency/pulse width tolerances.
If you dialed in using pulse, it expects the pulse sequence 1234567890; if you dialed using tone, then it expects the DTMF sequence 123456789*0#. (There is actually a test option for the extra DTMF column ABCD as well.)
The other standard test number found on the new digital systems now is 17070. This gives options for simple ring-back, testing your own line, remote testing of any other line in the country (any BT line, that is), as well as automatically applying a cable-pair identification tone to a line and recording cable IDs at junction boxes.