Skip to content

[EPIC] Refactor and Improve E2E Test Execution #112

@josecelano

Description

@josecelano

Overview

This epic focuses on standardizing, documenting, and improving the End-to-End (E2E) test execution infrastructure to make it more consistent, maintainable, and easier for AI agents to execute. The work involves refactoring the current mixed approach to E2E testing into a unified, black-box testing strategy that uses the application's public CLI interface.

Current Situation

Terminology: E2E vs Rust Test Types

We use "E2E" (End-to-End) as our testing level terminology - the goal is to test at the end-user level via the public CLI interface. This is independent of Rust's test implementation types (unit tests vs integration tests).

  • True E2E tests: Test via public CLI (black-box, end-user level)
  • Temporary integration tests: Called "E2E" but currently test at application layer level because presentation commands don't exist yet

Test Files

We currently have 6 E2E test files with different Rust implementations:

Rust Integration Tests (newer, true E2E approach):

  • tests/e2e_create_command.rs - Tests via public CLI
  • tests/e2e_destroy_command.rs - Tests via public CLI

Explicit Binaries (older, temporary integration test approach):

  • src/bin/e2e_config_tests.rs - Calls application layer directly
  • src/bin/e2e_provision_and_destroy_tests.rs - Calls application layer directly
  • src/bin/e2e_tests_full.rs - Calls application layer directly

The Rust integration tests use the public CLI interface (true black-box E2E testing), while the explicit binary tests call internal application layer handlers directly (temporary integration tests). This inconsistency creates maintenance challenges and makes it harder for contributors and AI agents to understand the testing approach.

Why this split exists: The explicit binary tests were created first, before presentation layer commands existed. The Rust integration tests were added later following the inside-outside development strategy. The explicit binaries are intended to be E2E but are temporarily integration tests until presentation commands are available.

Infrastructure split: Some tests use VMs (production-like), others use Docker (for GitHub Actions compatibility due to networking issues).

Goals

  • Standardize all E2E tests to use black-box testing via public CLI
  • Document different types of E2E tests and their purposes
  • Make E2E tests easier for AI agents to understand and execute
  • Improve test maintainability by decoupling from internal layers
  • Provide clear guidelines for future E2E test development

Sub-Issues

This epic is broken down into sub-issues:

Total Estimated Time: 22.75-35 hours split across multiple focused sub-issues

Specification

See detailed specification: docs/issues/112-epic-refactor-and-improve-e2e-test-execution.md

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions