Loop impedance tests are specified by BS7671 (IEE Wiring Regulations).

That means that from a legal point of view, the test would be mandatory in any situation in which compliance with BS7671 is required by law. These days that would mean just about any commercial premises, as I believe that the Health & Safety at Work Acts would apply.

For domestic, at present, BS7671 is recommended, but not obligatory, although plans are in the pipeline to change this.

Scotland has slightly different laws to England, and I think David will confirm that BS7671-compliance is required for all new residential installations under the Scottish building regs.