Skip to content

Decouple test data from seed.json to improve test stability and flexibility #408

@avirajsingh7

Description

@avirajsingh7

Our test cases currently depend on the global seed.json file for initial data setup.
This reduces flexibility because any change in seed.json can unintentionally break multiple test suites.

Examples of issues:

  • Changing or regenerating IDs in seed.json breaks tests referencing fixed organization_id or project_id.
  • Removing or renaming records (e.g., users, credentials) causes missing-entity errors in dependent tests.
  • Adding new data changes query counts (e.g., tests expecting only one organization now get multiple).
  • Schema updates or relationship changes make old seed.json data invalid.

Proposed Solution

Create a dedicated test baseline (e.g., test_seed.py or setup fixtures) that:
Inserts only essential test data (organization, project, User).
Is isolated from the main application seed.
Can be freely modified.
And couple it with TestAuthContext also.
Inserts only essential test data required for authentication (organization, project, and user).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions