# test > Run integration tests for the Loyalty Points Program using the containerized test suite. All tests are defined in specs/testing.md. - Author: Alexandre Roman - Repository: alexandreroman/loyalty-points-program-demo - Version: 20260127233605 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/alexandreroman/loyalty-points-program-demo - Web: https://mule.run/skillshub/@@alexandreroman/loyalty-points-program-demo~test:20260127233605 --- --- name: test description: Run integration tests for the Loyalty Points Program using the containerized test suite. All tests are defined in specs/testing.md. metadata: author: Claude Code version: "1.1" --- # Integration Tests Run integration tests for the Loyalty Points Program using the portable test container. ## Overview This skill runs **24 automated tests** across 6 test groups. All test definitions and requirements are in **`@specs/testing.md`**. The tests are implemented in a containerized suite (`@it/`) that validates the Loyalty Service: - **Portable**: Docker container with Ubuntu 24.04 + curl/jq/bash - **Manual execution**: Not integrated in Docker Compose (full control) - **Deterministic**: Numeric prefixes (01-06) ensure consistent ordering ## Quick Start ```bash # 1. Build container cd it && docker build -t loyalty-it . # 2. Clean data and restart services docker compose restart redis temporal && sleep 30 # 3. Wait for all services to be healthy sleep 30 # 4. Run all tests docker run --network loyalty-frontend loyalty-it http://gateway:8080 # Exit code: 0 = pass, 1 = fail ``` **Why restart Redis and Temporal?** - Redis stores all customer data (ephemeral, in-memory) - Temporal stores all workflow state - Restarting them ensures tests start with a clean slate - Prevents data conflicts from previous test runs ## Test Groups | Group | Tests | Description | |-------|-------|-------------| | **health** | H0-H5 (5) | Service health checks | | **core** | T1.1-T2.6 (6) | Core features (enroll, earn, spend) | | **saga** | T3.1-T3.3 (3) | Saga pattern & compensation | | **grace** | T4.1-T4.3 (3) | Grace period & rejoin | | **idempotency** | T5.1-T5.3 (3) | Idempotency & transaction tracking | | **errors** | T6.1-T6.4 (4) | Error handling & edge cases | | **all** | 24 total | All tests | **Run a specific group:** ```bash # Clean data first docker compose restart redis temporal && sleep 30 # Run specific test group docker run --network loyalty-frontend loyalty-it http://gateway:8080 core ``` ## Manual Data Cleanup If you need to clean data manually without restarting: ```bash # Clear Redis data docker compose exec redis redis-cli FLUSHALL # Restart Temporal to clear workflow state docker compose restart temporal && sleep 20 ``` ## Documentation Detailed information is in the `@it/` component: | File | Content | |------|---------| | **`@specs/testing.md`** | All test definitions and requirements | | **`@it/QUICKSTART.md`** | Common patterns and usage examples | | **`@it/README.md`** | Full technical documentation | | **`@it/VALIDATION.md`** | Architecture and verification checklist | | **`@it/MANIFEST.md`** | Component completeness verification | For troubleshooting, see `@it/QUICKSTART.md` or `@it/VALIDATION.md`.