UK Fake Phone Numbers for Mobile Form Testing

Use a fictional United Kingdom phone fixture for QA. Compare the original display value with international notation and test phone validation.

Test fixture

Input:          07700 900142
International:  +447700900142

Phone format

The UK example uses an Ofcom mobile number intended for drama. The national presentation begins with 0. In international form the country calling code is +44 and that initial trunk zero is omitted. Keep the local and normalized versions as strings so the leading zero survives before normalization.

Run browser tests for pasting a domestic number in a form with the country set to the United Kingdom. Assert the normalized request separately from the visible field. Add a case with +44 already present and a case with an extra zero after it to check your product’s handling of mixed national and international notation.

Form and import tests

When users choose another region, confirm that the UI does not silently reinterpret a number already stored in international form. Test editing a profile with the existing number in the national display format and saving it again. That round trip should keep the same value in the database.

A London landline exercise and a UK mobile exercise should use separate fixtures because their display groups differ. Test whether the contact page stays aligned after replacing a short-looking placeholder with a fully formatted value. Use a different case if the product allows extensions or rejects landlines during signup.

Fixture assertions

For a messaging flow, test a separate provider sandbox destination or intercept all outbound calls. A string that looks like a UK mobile number does not establish SMS capability. A screenshot fixture is useful for checking wraps, labels and copy buttons before adding integration cases.

The snippet rewrites the known leading zero only in this domestic fixture. Generic validation needs your supported numbering patterns and a strategy for extensions. Add an invalid placeholder with too few digits and assert that the form reports the error before sending any request to a messaging provider.

Keep the region selector and number as separately asserted values in end-to-end tests. This makes it easier to see whether a failure came from prefix conversion or a selector reset.

JavaScript test example

const raw = "07700 900142";
const normalized = raw.replace(/ /g, "").replace(/^0/, "+44");
if (normalized !== "+447700900142") {
  throw new Error("Unexpected normalized phone fixture");
}

Related generators