Skip to content

Consolidate 29 e2e test binaries into single binary#48

Merged
ractive merged 2 commits intomainfrom
iter-46/e2e-test-consolidation
Apr 17, 2026
Merged

Consolidate 29 e2e test binaries into single binary#48
ractive merged 2 commits intomainfrom
iter-46/e2e-test-consolidation

Conversation

@ractive
Copy link
Copy Markdown
Owner

@ractive ractive commented Apr 17, 2026

Summary

  • Merge 29 separate *_e2e_test.rs files into a single tests/e2e/ module with one [[test]] entry in Cargo.toml
  • Eliminates redundant linking of 29 independent test binaries against the full CLI crate
  • All 681 tests continue to pass; no functional changes

Test plan

  • cargo fmt — no changes
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo test --workspace -q — all 681 tests pass (295 core + 178 e2e + 197 cli + 9 daemon + 2 live)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Consolidated E2E test suite into a single entry point and added an E2E test target
    • Centralized shared test utilities and updated test imports across modules
    • Minor stability fix in the mock test server to ensure proper connection handling
  • Documentation

    • Marked iteration tasks as completed and updated iteration metadata/formatting

Move all *_e2e_test.rs files into tests/e2e/ directory with a single
[[test]] entry in Cargo.toml. This eliminates redundant linking of
29 separate test binaries against the CLI crate, dramatically reducing
clean build times.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 072468cf-e1c5-4c24-8ad5-e37a5ca85830

📥 Commits

Reviewing files that changed from the base of the PR and between ee7490a and c7c193e.

📒 Files selected for processing (6)
  • crates/ff-rdp-cli/tests/e2e/daemon_parity.rs
  • crates/ff-rdp-cli/tests/e2e/snapshot.rs
  • crates/ff-rdp-cli/tests/e2e/support/mock_server.rs
  • crates/ff-rdp-cli/tests/e2e/support/mod.rs
  • kb/iterations/iteration-45-dogfood-fixes.md
  • kb/iterations/iteration-46-e2e-test-consolidation.md

📝 Walkthrough

Walkthrough

Introduces a consolidated E2E test entry (tests/e2e/main.rs) and registers it in crates/ff-rdp-cli/Cargo.toml as the e2e test target. Individual test files now import shared helpers from super::support (single support module), and a control-flow label was added in the mock server loop.

Changes

Cohort / File(s) Summary
Test Configuration
crates/ff-rdp-cli/Cargo.toml
Added [[test]] name = "e2e" pointing to tests/e2e/main.rs.
Test Entry Point
crates/ff-rdp-cli/tests/e2e/main.rs
New file declaring mod support; and 29 e2e test submodules to centralize test harness.
E2E Test Modules (imports)
crates/ff-rdp-cli/tests/e2e/{a11y,click,computed,console,cookies,daemon,daemon_parity,dom,dom_tree,eval,geometry,inspect,launch,nav_action,navigate,network,page_text,perf,perf_compare,responsive,screenshot,scroll,snapshot,sources,storage,styles,tabs,type_text,wait}.rs
Removed per-file mod support; and changed imports from use support::{...} to use super::support::{...} to use the centralized support module.
Support implementation
crates/ff-rdp-cli/tests/e2e/support/mock_server.rs
Added a loop label ('conn: loop { ... }) and changed a break to break 'conn; to exit the connection loop on failure.
Support module wiring
crates/ff-rdp-cli/tests/e2e/support/mod.rs
Removed #[allow(dead_code)] attribute from pub mod mock_server; (module remains exported; re-exports unchanged).
Documentation / Iteration notes
kb/iterations/iteration-45-dogfood-fixes.md, kb/iterations/iteration-46-e2e-test-consolidation.md
Updated task/status metadata to mark iteration tasks as completed and documented consolidation of e2e test harness and import changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰
I hopped through crates and rewired the test,
Gathered helpers home so each file can rest.
One main to call, one support to share,
A labelled loop to stop when things tear.
Tiny paws, big tidy—huzzah for the nest!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: consolidating 29 separate e2e test binaries into a single binary via a refactored test module structure.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch iter-46/e2e-test-consolidation

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@kb/iterations/iteration-45-dogfood-fixes.md`:
- Line 5: The document currently sets "status: completed" while the execution
checklist and acceptance items remain unchecked; update the file so the status
matches the checklist in the same commit by either marking "status: in-progress"
(or similar active state) if items remain open, or checking off all remaining
acceptance/checklist items and keeping "status: completed"; ensure you update
the "status: completed" token and the corresponding checklist entries (the
unchecked execution checklist / acceptance items) together in this commit so the
iteration state is unambiguous.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 399230d8-2184-4e97-b452-e033e5d037f9

📥 Commits

Reviewing files that changed from the base of the PR and between 838d3a4 and ee7490a.

📒 Files selected for processing (35)
  • crates/ff-rdp-cli/Cargo.toml
  • crates/ff-rdp-cli/tests/e2e/a11y.rs
  • crates/ff-rdp-cli/tests/e2e/click.rs
  • crates/ff-rdp-cli/tests/e2e/computed.rs
  • crates/ff-rdp-cli/tests/e2e/console.rs
  • crates/ff-rdp-cli/tests/e2e/cookies.rs
  • crates/ff-rdp-cli/tests/e2e/daemon.rs
  • crates/ff-rdp-cli/tests/e2e/daemon_parity.rs
  • crates/ff-rdp-cli/tests/e2e/dom.rs
  • crates/ff-rdp-cli/tests/e2e/dom_tree.rs
  • crates/ff-rdp-cli/tests/e2e/eval.rs
  • crates/ff-rdp-cli/tests/e2e/geometry.rs
  • crates/ff-rdp-cli/tests/e2e/inspect.rs
  • crates/ff-rdp-cli/tests/e2e/launch.rs
  • crates/ff-rdp-cli/tests/e2e/main.rs
  • crates/ff-rdp-cli/tests/e2e/nav_action.rs
  • crates/ff-rdp-cli/tests/e2e/navigate.rs
  • crates/ff-rdp-cli/tests/e2e/network.rs
  • crates/ff-rdp-cli/tests/e2e/page_text.rs
  • crates/ff-rdp-cli/tests/e2e/perf.rs
  • crates/ff-rdp-cli/tests/e2e/perf_compare.rs
  • crates/ff-rdp-cli/tests/e2e/responsive.rs
  • crates/ff-rdp-cli/tests/e2e/screenshot.rs
  • crates/ff-rdp-cli/tests/e2e/scroll.rs
  • crates/ff-rdp-cli/tests/e2e/snapshot.rs
  • crates/ff-rdp-cli/tests/e2e/sources.rs
  • crates/ff-rdp-cli/tests/e2e/storage.rs
  • crates/ff-rdp-cli/tests/e2e/styles.rs
  • crates/ff-rdp-cli/tests/e2e/support/mock_server.rs
  • crates/ff-rdp-cli/tests/e2e/support/mod.rs
  • crates/ff-rdp-cli/tests/e2e/tabs.rs
  • crates/ff-rdp-cli/tests/e2e/type_text.rs
  • crates/ff-rdp-cli/tests/e2e/wait.rs
  • kb/iterations/iteration-45-dogfood-fixes.md
  • kb/iterations/iteration-46-e2e-test-consolidation.md

Comment thread kb/iterations/iteration-45-dogfood-fixes.md
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Consolidates the ff-rdp-cli end-to-end test suite from many independent integration test binaries into a single e2e integration test target, reducing repeated linking/compile overhead while keeping existing test behavior intact.

Changes:

  • Adds a single [[test]] target (e2e) pointing at tests/e2e/main.rs.
  • Refactors each e2e test module to share a single support module via super::support.
  • Updates iteration KB docs to reflect progress/status and task completion.

Reviewed changes

Copilot reviewed 32 out of 35 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
kb/iterations/iteration-46-e2e-test-consolidation.md Updates iteration status/tasks/acceptance criteria for the e2e consolidation work.
kb/iterations/iteration-45-dogfood-fixes.md Marks iteration completed and normalizes tags frontmatter into a YAML list.
crates/ff-rdp-cli/Cargo.toml Adds a single [[test]] entry for the consolidated e2e test binary.
crates/ff-rdp-cli/tests/e2e/main.rs New unified e2e test crate root declaring all e2e test modules and shared support.
crates/ff-rdp-cli/tests/e2e/support/mod.rs New shared support module (fixture loading + re-exports).
crates/ff-rdp-cli/tests/e2e/support/mock_server.rs New shared MockRdpServer implementation for e2e tests.
crates/ff-rdp-cli/tests/e2e/a11y.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/click.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/computed.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/console.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/cookies.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/daemon.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/daemon_parity.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/dom.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/dom_tree.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/eval.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/geometry.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/inspect.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/launch.rs Adds a consolidated e2e module containing launch CLI argument smoke tests.
crates/ff-rdp-cli/tests/e2e/nav_action.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/navigate.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/network.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/page_text.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/perf.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/perf_compare.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/responsive.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/screenshot.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/scroll.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/snapshot.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/sources.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/storage.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/styles.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/tabs.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/type_text.rs Updates support imports to use the shared super::support.
crates/ff-rdp-cli/tests/e2e/wait.rs Updates support imports to use the shared super::support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 16 to +20
Each `tests/*_e2e_test.rs` file compiles and links as its own binary against the full CLI crate. Clean `cargo test` takes ~71s, with most time spent on redundant linking. The hyalo project had the same problem (31 binaries, 3m13s) and solved it by merging into a single `tests/e2e/mod.rs` — build dropped to ~25s (7.5x speedup).

## Tasks

### 1. Consolidate e2e test files into single binary [0/5]
### 1. Consolidate e2e test files into single binary [5/5]
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section says the consolidation pattern is a single tests/e2e/mod.rs, but the tasks (and Cargo.toml) now point to tests/e2e/main.rs. Please update the motivation text to match the actual entrypoint file to avoid confusion for future readers.

Copilot uses AI. Check for mistakes.
- Fix snapshot.rs comment: --depth 2 → --depth 1 to match actual test
- Fix daemon_parity.rs: use FF_RDP_HOME instead of HOME/USERPROFILE
  for consistency with start_daemon() and other tests
- Fix mock_server.rs: use labeled break 'conn to exit outer loop on
  followup write failure instead of only breaking inner for-loop
- Remove vacuous #[allow(dead_code)] on mock_server module
- Check off iter-45 tasks (iteration already merged)
- Update iter-46 status to completed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ractive ractive merged commit 3f4deb2 into main Apr 17, 2026
3 of 6 checks passed
@ractive ractive deleted the iter-46/e2e-test-consolidation branch April 17, 2026 14:39
@coderabbitai coderabbitai Bot mentioned this pull request Apr 17, 2026
8 tasks
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