Skip to content

Improve E2E test debuggability in CI#4332

Merged
JAORMX merged 1 commit intomainfrom
improve-e2e-debuggability
Mar 24, 2026
Merged

Improve E2E test debuggability in CI#4332
JAORMX merged 1 commit intomainfrom
improve-e2e-debuggability

Conversation

@JAORMX
Copy link
Copy Markdown
Collaborator

@JAORMX JAORMX commented Mar 24, 2026

Summary

  • E2E test failures in CI have been hard to diagnose because response bodies aren't logged, thv serve output isn't captured, and Ginkgo report files are never generated. This addresses all four improvements proposed in Improve E2E test debuggability in CI #4077.
  • Enables JUnit XML report generation, adds verbose output in CI, dumps server logs on failure, and provides an ExpectStatus helper for response-body-aware assertions.

Closes #4077

Type of change

  • Bug fix

Test plan

  • Linting (task lint-fix)
  • Manual testing (describe below)

Verified all changes compile with go vet ./test/e2e/.... The JUnit report generation and server log dumping will be validated by the E2E tests in this PR's CI run — if a test fails, the JUnit XML artifact should now be uploaded and server logs should appear in the Ginkgo output.

Changes

File Change
test/e2e/run_tests.sh Add --junit-report and --vv flags to ginkgo in CI
test/e2e/api_helpers.go Dump thv serve stdout/stderr on test failure; add ExpectStatus helper
.github/workflows/e2e-tests.yml Remove never-generated ginkgo-report.xml from artifact upload

Does this introduce a user-facing change?

No

Special notes for reviewers

The ExpectStatus helper is available for adoption in test files incrementally — existing assertions continue to work. The server log dumping only fires when CurrentSpecReport().Failed() is true, so successful test runs produce no extra output.

Generated with Claude Code

@github-actions github-actions bot added the size/XS Extra small PR: < 100 lines changed label Mar 24, 2026
@JAORMX JAORMX force-pushed the improve-e2e-debuggability branch from 58c34a7 to 3427bb0 Compare March 24, 2026 08:42
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.97%. Comparing base (df1a5cd) to head (5100e27).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4332      +/-   ##
==========================================
- Coverage   69.08%   68.97%   -0.11%     
==========================================
  Files         478      478              
  Lines       48432    48484      +52     
==========================================
- Hits        33457    33444      -13     
+ Misses      12314    12306       -8     
- Partials     2661     2734      +73     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@github-actions github-actions bot added size/XS Extra small PR: < 100 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Mar 24, 2026
When E2E tests fail in CI, we lacked the information needed to diagnose
root causes. This adds three improvements:

1. Generate JUnit XML reports by passing --junit-report to ginkgo, and
   enable --vv in CI for verbose step timelines on failure.

2. Dump thv serve stdout/stderr via GinkgoWriter when a test fails,
   so server-side errors appear in the test output.

3. Add ExpectStatus helper that includes the response body in assertion
   failure messages, making HTTP error responses visible.

4. Remove the never-generated ginkgo-report.xml from artifact uploads.

Closes #4077

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
@JAORMX JAORMX force-pushed the improve-e2e-debuggability branch from 3427bb0 to 5100e27 Compare March 24, 2026 12:38
@github-actions github-actions bot added size/XS Extra small PR: < 100 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Mar 24, 2026
@JAORMX JAORMX merged commit cec6b10 into main Mar 24, 2026
37 checks passed
@JAORMX JAORMX deleted the improve-e2e-debuggability branch March 24, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve E2E test debuggability in CI

2 participants