Bharatpedia:Template sandbox and test cases explains how template changes are tested safely.

The pattern[edit source]

Every template can have two companion pages: a sandbox, at "Template:Name/sandbox", where a proposed new version is developed, and test cases, at "Template:Name/testcases", a page that shows the old and new versions side by side on the same example inputs.

The workflow[edit source]

  1. Copy the template's current code into its sandbox and make your changes there.
  2. Open the test cases page: it renders both versions on identical examples, so differences are visible at a glance.
  3. Check the examples that matter, including edge cases: empty parameters, long text, missing values.
  4. Only when the sandbox version behaves correctly everywhere, copy it over the live template, and purge a page that uses it to confirm.

For high-risk templates this workflow is not optional.

See also[edit source]