Skip to content

Introduce new testsuite infrastructure #2676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 69 commits into from
Apr 23, 2025
Merged

Introduce new testsuite infrastructure #2676

merged 69 commits into from
Apr 23, 2025

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Apr 23, 2025

This introduces a new testsuite called testsuite that replaces all of the previous integration tests (except for gui). This new testsuite is intended to address a few things:

  • Has a uniform way for exercising mdbook.
  • Consolidates into a single integration binary, which should build faster.
  • Provides the ability to do CLI tests which easily validate the output.
  • Individual tests have their own books which focus on the specific feature being tested. This helps avoid changes in one test affecting other tests.
  • Has more comprehensive testing of the exact contents of the rendered output and the CLI output.
  • Tests are powered by the snapbox library which makes it easy to update tests.

This generally only migrates existing tests, and doesn't really add new ones (other than the extended coverage in each existing test). I expect this to make it easier to add tests in the future to improve coverage. I also expect this to evolve improvements as we gain more experience with it.

Closes #1568

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Apr 23, 2025
ehuss added 28 commits April 22, 2025 20:50
This is a new testsuite intended to replace the other tests, which
provides an easy facility to update tests, validate output, and more.
This doesn't exercise *everything* that the old test did, but other
tests will take care of those gaps. This is intended as just a smoke
test.
ehuss added 22 commits April 22, 2025 21:11
I don't think these exercise anything in particular that aren't
necessarily covered by other things. If this ends up exposing a lack
of coverage somewhere, I would prefer to add more focused test for
specific things.
This helps if you are creating new tests, or debugging existing tests by
allowing you to run `mdbook` directly in the test directory to try
things out. But we don't want to ever check these files in.
These tests are now all superseded by the new testsuite.
Although there isn't a direct equivalent in the new testsuite, I felt
like these weren't adding any specific coverage that the existing tests
don't already exercise. If it does turn up that there is specific
coverage missing, then I would prefer to have tests which exercise the
specific thing of interest rather than have these kinds of non-specific
tests.
@ehuss ehuss added this pull request to the merge queue Apr 23, 2025
Merged via the queue into rust-lang:master with commit 9b12c51 Apr 23, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create command line tool integration tests
2 participants