Class AllureExternalKey
A key is a recomputable identity built from framework data: reconstruct the same key in the start and
stop hooks and equal keys resolve to the same internal Allure item, so neither the adapter nor the lifecycle needs a
Map<frameworkId, uuid>. The namespace is the integration class (provenance, and no ad-hoc constant strings);
the values are the framework data that identifies the entity.
The key reduces its values to a digest at construction and retains no framework objects. Value contract: at
least one value (enforced by the signature), no null values, no array values, and every value must have a
stable, value-based serialized form (String.valueOf) for the lifetime of the run. The key must be unique
per live entity: a retry of the same test must not recompute an equal key while the previous entity is still
unwritten — include an attempt counter in the values when the framework can re-run the same id within one run.
Keys are process-local and in-memory only; they are never serialized into result files.
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()static AllureExternalKeyCreates a key with the given namespace class and at least one identifying value.static AllureExternalKeyCreates a key with the given namespace class and a random UUIDv4 value, for frameworks that expose no stable id.toString()
-
Method Details
-
of
Creates a key with the given namespace class and at least one identifying value.- Parameters:
namespace- the integration class that owns the keyfirst- the first identifying value (required)rest- the remaining identifying values- Returns:
- the key
-
random
Creates a key with the given namespace class and a random UUIDv4 value, for frameworks that expose no stable id.- Parameters:
namespace- the integration class that owns the key- Returns:
- the key
-
equals
-
hashCode
public int hashCode() -
toString
-