Skip to main content

Standardized Test IDs

This document outlines the standardized IDs to use when creating Jest test files while developing for secad. These IDs follow the Cuid2 format.

Standard Test IDs

Entity TypeIDUsage
Useruqyyk4cgkd26vmyca2kw8bhqAll sample users in test data
Transactionec83rv0fkh1zvqhs624zpcg4All transaction-related test data
Entityd5vaqv2ed5pb3gulopy9z5aoAll entity-related test data
Security Classaziq1l0224y78j3vuwe9km2xAll security class-related test data
Member (inc. toMember)ge5qwju028wfh08e8ssvbyulThe generic member (as well as toMember) in transaction test data
Member (fromMember)iics9wtcs2ysxhwn2v1aimx5The fromMember in transaction test data
Certificate Templateqvd5mb9xqn51v7liwvmczge7All certificate template-related test data

Usage Guidelines

When to Use Standard IDs

  • Unit tests, integration tests, error handling tests
  • Mock data creation
  • Error context objects

When NOT to Use Standard IDs

  • Test-specific edge cases requiring unique IDs
  • Conflict testing scenarios
  • Performance tests with large datasets

Benefits

  • Consistency: Predictable test behavior
  • Debugging: Easier issue tracking
  • Maintenance: Reduced cognitive load
  • Documentation: Clear reference for new tests

Notes

  • These IDs are for testing only, not production code
  • Follow the project's ID generation pattern
  • Add new entity types to this document when needed