Skip to content

Conversation

@timvw
Copy link
Owner

@timvw timvw commented Jan 25, 2026

Summary

Redesign e2e testing to be declarative and easy to maintain:

  • Single source of truth: All test scenarios defined in YAML files
  • Multi-OS/shell support: Linux, macOS, Windows × bash, zsh, powershell, pwsh
  • CI simplification: Reduced from 611 → 235 lines (62% reduction)
  • Easy to extend: Adding tests = adding YAML, no code changes

Changes

New Files

  • e2e/scenarios/*.yaml — 5 scenario files with 18 test cases
  • e2e/run.go — Go orchestrator that parses YAML and executes tests
  • e2e/lib/setup.{sh,ps1} — Shared helper functions
  • e2e/README.md — Documentation

Modified Files

  • justfile — Added e2e recipes
  • .github/workflows/ci.yml — Unified e2e job using orchestrator
  • go.mod — Added yaml.v3 dependency

Test Plan

  • Local tests pass with bash (18/18)
  • Local tests pass with zsh (18/18)
  • CI tests pass on Linux (bash, zsh)
  • CI tests pass on macOS (bash, zsh)
  • CI tests pass on Windows — non-blocking, needs more work on PowerShell script generation

Known Issues

Windows PowerShell tests are currently marked as continue-on-error because:

  • Different behavior between PowerShell 5.1 and pwsh 7
  • Path handling differences on Windows
  • Auto-cd tests need different handling

This can be addressed in a follow-up PR.

timvw added 3 commits January 25, 2026 19:27
Replace fragmented e2e tests with a unified, declarative approach:

- Add YAML scenario files for checkout, create, list, remove, shellenv
- Add Go orchestrator that parses YAML and generates shell scripts
- Support bash, zsh, powershell, pwsh across Linux, macOS, Windows
- Simplify CI workflow from 611 to 233 lines (62% reduction)
- Add justfile recipes: e2e, e2e-bash, e2e-zsh, e2e-shells

Adding new tests now requires only YAML changes, no code modifications.
@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

❌ Patch coverage is 0% with 298 lines in your changes missing coverage. Please review.
✅ Project coverage is 11.83%. Comparing base (bf5724c) to head (4db8fac).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
e2e/run.go 0.00% 298 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
- Coverage   18.95%   11.83%   -7.12%     
==========================================
  Files           1        2       +1     
  Lines         496      794     +298     
==========================================
  Hits           94       94              
- Misses        396      694     +298     
  Partials        6        6              
Files with missing lines Coverage Δ
e2e/run.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

timvw added 8 commits January 25, 2026 19:39
- Update settings.yml with new CI job names
- Fix PowerShell script generation:
  - Handle expected non-zero exit codes with try/catch
  - Normalize path separators for cwd_ends_with checks
  - Translate $WT_BIN to $env:WT_BIN for PowerShell
  - Run commands directly when auto-cd is needed
- Skip remove_cleans_directory on Windows (uses Unix test -d)
- Add & call operator when running commands that start with $env:
- Skip remove_nonexistent_fails on Windows (exit code handling differs)
- Skip shellenv_produces_output on PowerShell (expects POSIX syntax)
All Windows tests now pass, remove continue-on-error.
Remove deprecated test files now replaced by declarative YAML e2e tests:
- e2e/docker/ - Docker-based shell tests
- e2e/native/ - Native shell test scripts
- e2e/lib/ - Unused setup helpers
- e2e_test.go - Go e2e tests
- e2e_windows_test.go - Windows Go e2e tests
- test-gitlab-support.sh - Manual test script
- test-windows-local.ps1 - Local Windows test script

All scenarios are now covered by e2e/scenarios/*.yaml running via
the Go orchestrator (e2e/run.go).

Kept: e2e_interactive_test.go (PTY tests for future integration)
The helper functions (setupTestRepo, buildWtBinary, runGitCommand) were
previously in e2e_test.go which was removed. Add them back to support
the interactive PTY tests.
@timvw timvw merged commit 0459d50 into main Jan 26, 2026
11 checks passed
@timvw timvw deleted the feature/e2e-yaml-redesign branch January 26, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants