Skip to content

Implement Test Environment Layer #66

@sugat009

Description

@sugat009

Summary

Implement the Test Environment Layer that sets up test environments for manual QA testing, based on discovery findings from #16.

Background

The Test Environment Layer acts as an independent QA engineer, orchestrating environments, preparing config-driven test data, and managing environment lifecycle.

Scope

1. Environment Orchestration

  • Spin up CHT with correct version/branch using `npm run local-images` + `docker compose`
  • Manage lifecycle (start, reset, teardown)

2. Config Discovery

  • Fetch deployed config from `GET /api/v1/settings` (with auth)
  • Parse `contact_types` for hierarchy structure, `roles` for user types, available forms

3. Config-Driven Test Data Preparation

  • Generate data that conforms to deployed config
  • Create valid hierarchies, people, reports
  • Override only when ticket explicitly specifies

4. Tools

Tool Purpose
`npm run local-images` Build local code into Docker images
`docker compose` Container orchestration
CHT API Config discovery, data operations
`cht-conf` Configuration upload, user creation
CouchDB API Data verification

5. No Custom Agent Needed

This is orchestration of existing tools. No LLM involved in environment setup.

Dependencies

Enables

Complexity

Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: FeatureAdd something new.phase-2Discovery phase - evaluate tools and approaches

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions