Skip to content

test(ci): consolidate integration tests into tests/it across 6 crates - #360

Open
Elvis33LE wants to merge 1 commit into
storytold:mainfrom
Elvis33LE:ci/consolidate-integration-tests
Open

Elvis33LE wants to merge 1 commit into
storytold:mainfrom
Elvis33LE:ci/consolidate-integration-tests

Conversation

@Elvis33LE

@Elvis33LE Elvis33LE commented Dec 4, 2026 •

Copy link
Copy Markdown

Consolidates stateless integration test files into a single tests/it/main.rs binary per crate across 6 crates, reducing link overhead and target/debug/deps artifact size without removing or weakening any tests:

  • crates/formats: moved 14 top-level integration tests into a new tests/it/main.rs
  • crates/nodes: moved 6 integration tests into a new tests/it/main.rs
  • crates/eval: moved 5 integration tests into a new tests/it/main.rs
  • crates/automation: moved 3 integration tests into a new tests/it/main.rs
  • crates/engine: moved package_resources.rs into the existing tests/it/main.rs (kept session as its own binary: it is the hostile-input sweep target named in AGENTS.md)
  • crates/ui-egui: moved flatpak_updates.rs into the existing tests/it/main.rs (kept snapshot, language_switching and resize standalone, as documented in docs/testing-ci.md)

The only source edits are the four include_bytes!/include_str! paths that gain one ../ level; every other moved file is byte-for-byte unchanged. Documentation links in docs/atomic-parity-improvements.md, docs/parity-fixes.md and docs/testing-ci.md follow the moves.

Local Windows Benchmark (CARGO_INCREMENTAL=0, -j 4)

Scoped to -p materialcraft-formats -p materialcraft-nodes -p materialcraft-eval -p materialcraft-automation -p materialcraft-engine -p materialcraft-ui-egui:

Metric Before After Delta
Test .exe binaries (target/debug/deps) 42 16 -26 (-61.9%)
Total test .exe size 973.31 MiB 727.80 MiB -245.51 MiB (-25.2%)
Warm rebuild + link (cargo test --no-run, dependencies warm) 550.76 s 485.26 s -65.50 s (-11.9%)
Test parity 1,548 passed, 0 failed, 71 ignored 1,548 passed, 0 failed, 71 ignored Exact match

What ran / What did not run

  • Ran:

    • cargo test --no-run -q -j 4 on all 6 crates (exit 0, 16 test .exes)
    • cargo test -q -j 4 on all 6 crates, three times after the change: 1,548 passed, 0 failed, 71 ignored in every run
    • cargo clippy --no-deps -q -j 4 <the 6 crates> --all-targets -- -D warnings (exit 0)
    • cargo fmt --all -- --check (exit 0)
  • Did not run:

    • Full workspace cargo clippy without --no-deps and the workspace crates outside the six above
    • Linux/macOS CI gates (delegated to PR CI)
  • Not a controlled benchmark: the ui-egui tests dominate the test run wall-clock and vary with machine load: the same tree measured 166.81 s before and 221.73 s / 259.50 s / 181.62 s after. The test run wall-clock is therefore not claimed as a gain; only the binary count, the size, the warm-rebuild time and the test parity are.

Summary by CodeRabbit

  • Chores
    • Consolidated integration tests into shared test executables across several components.
    • Updated test references and fixture paths to reflect the reorganized test layout.
  • Documentation
    • Updated testing guidance and regression-test links to match the new layout.

Move 29 top-level integration test files into one `it` executable per crate
(automation, eval, formats, nodes) or the existing one (engine, ui-egui),
cutting the test executables of these crates from 42 to 16 and their total
size by 245.5 MiB without removing or weakening any test.

Kept standalone on purpose: engine `session` (hostile-input sweep command in
AGENTS.md), ui-egui `snapshot`, `language_switching` (process-global locale)
and `resize` (global Rayon pool wait), render's single `view_settings`.
@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Integration-test executables now register test modules across several crates. Fixture paths, regression-test links, and the testing guide were updated to reflect the test layout.

Changes: Integration test layout

Layer / File(s) Summary
Register integration-test modules
crates/automation/tests/it/main.rs, crates/engine/tests/it/main.rs, crates/eval/tests/it/main.rs, crates/formats/tests/it/main.rs, crates/nodes/tests/it/main.rs, crates/ui-egui/tests/it/main.rs, docs/testing-ci.md
The test executables declare integration-test modules. The guide describes the shared layout used by automation, eval, formats, and nodes, and notes that render retains one integration-test file.
Update fixture and documentation paths
crates/formats/tests/it/function_library.rs, crates/ui-egui/tests/it/flatpak_updates.rs, docs/atomic-parity-improvements.md, docs/parity-fixes.md
Fixture references use paths relative to the relocated tests. Regression-test links point to the updated test locations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: chasse20, dylanmtaylor, fredapps

Merge Risk: Minimal · up to 93e33

This change only reorganizes integration tests into shared executables and updates paths and links. Test coverage and CI selection are preserved, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "test(ci): consolidate integration tests into tests/it across 6 crates" matches the main change. The PR moves integration test files into a single tests/it/main.rs binary per crate across si…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "test(ci): consolidate integration tests into tests/it across 6 crates" matches the main change. The PR moves integration test files into a single tests/it/main.rs binary per crate across six crates, which reduces the number of test executables from 42 to 16. The title is specific and concise. It does not mention the documentation link updates or the four include path changes, which is expected for a title.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 736c625 and 93e3346.

Files selected for processing: 39

  • crates/automation/tests/it/main.rs
  • crates/automation/tests/it/normal_maps.rs
  • crates/automation/tests/it/package_files.rs
  • crates/automation/tests/it/view_settings.rs
  • crates/engine/tests/it/main.rs
  • crates/engine/tests/it/package_resources.rs
  • crates/eval/tests/it/filter_tiling.rs
  • crates/eval/tests/it/instance_image_properties.rs
  • crates/eval/tests/it/instance_pixel_size.rs
  • crates/eval/tests/it/main.rs
  • crates/eval/tests/it/pattern_opacity.rs
  • crates/eval/tests/it/seed_arithmetic.rs
  • crates/formats/tests/it/bitmap_imports.rs
  • crates/formats/tests/it/curve_tables.rs
  • crates/formats/tests/it/explorer_folders.rs
  • crates/formats/tests/it/font_fallback.rs
  • crates/formats/tests/it/foreign_resources.rs
  • crates/formats/tests/it/function_library.rs
  • crates/formats/tests/it/fx_map_roughness.rs
  • crates/formats/tests/it/gradient_values.rs
  • crates/formats/tests/it/graph_attributes.rs
  • crates/formats/tests/it/library_native_ports.rs
  • crates/formats/tests/it/main.rs
  • crates/formats/tests/it/parity_function_loop.rs
  • crates/formats/tests/it/parity_input_defaults.rs
  • crates/formats/tests/it/project_packages.rs
  • crates/formats/tests/it/resource_replacements.rs
  • crates/nodes/tests/it/atomic_filter_parity.rs
  • crates/nodes/tests/it/brick_primitives.rs
  • crates/nodes/tests/it/distance.rs
  • crates/nodes/tests/it/fx_map_opacity.rs
  • crates/nodes/tests/it/fx_map_regions.rs
  • crates/nodes/tests/it/main.rs
  • crates/nodes/tests/it/parity_unconnected.rs
  • crates/ui-egui/tests/it/flatpak_updates.rs
  • crates/ui-egui/tests/it/main.rs
  • docs/atomic-parity-improvements.md
  • docs/parity-fixes.md
  • docs/testing-ci.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@Elvis33LE

Copy link
Copy Markdown
Author

Claiming the tests/it consolidation for the remaining loose integration test files in this repository (WP-16 fleet rollout, template: storytold/pdfcraft#9050). Scope and local measurements are in the description; I will say so here if I stop.

This branch has not been deployed

No deployments
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.

1 participant