Page MenuHomePhabricator

Phester: provide a way to generate a unique value.
Closed, InvalidPublic

Description

To avoid tests leaking into each other's state, we often need a way to generate unique names for resources created by a test, like wiki pages or user accounts. For this purpose, a special tag p/uniq should be defined which appends a unique sequence of characters to its literal value. The suffix will consist of lower case alphabetical ascii characters, and will be unique within a phester instance. The length is unspecified but should not exceed 12 characters. A length of 8 characters would already result in a space of 26^8, which is a bit over 200 billion.

Example:

variables:
  name: p/uniq: "Foo_"

The value of name will be something like Foo_jdzwe.