Skip to content

Create command line tool integration tests #1568

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

Closed
joshrotenberg opened this issue Jun 5, 2021 · 2 comments · Fixed by #2676
Closed

Create command line tool integration tests #1568

joshrotenberg opened this issue Jun 5, 2021 · 2 comments · Fixed by #2676
Assignees
Labels
A-testing-mdbook-iteself Area: mdbook's testsuite and unittests E-Help-wanted Experience: Help Needed

Comments

@joshrotenberg
Copy link
Contributor

The mdbook API has test coverage but the command line tool, which is probably more often used than the API, could probably benefit from some integration (and possibly unit) testing so that changes can be made with more confidence.

rustup has some examples. assert_cmd is also easy to use.

@ehuss ehuss added A-testing-mdbook-iteself Area: mdbook's testsuite and unittests E-Help-wanted Experience: Help Needed labels Jul 6, 2021
@bbros-dev
Copy link

Our 2c. From experience the more robust e2e test for a CLI is to actually run it as a user would. There are alternatives, but bats or some such setup is actually where you want to sink any time - in our experience.

notriddle added a commit to notriddle/mdBook that referenced this issue Jul 13, 2021
notriddle added a commit to notriddle/mdBook that referenced this issue Jul 14, 2021
notriddle added a commit to notriddle/mdBook that referenced this issue Jul 29, 2021
ehuss pushed a commit to notriddle/mdBook that referenced this issue Sep 26, 2021
notriddle added a commit to notriddle/mdBook that referenced this issue Dec 23, 2021
rubenmoor pushed a commit to rubenmoor/mdBook that referenced this issue Aug 5, 2022
szabgab added a commit to szabgab/mdBook that referenced this issue Mar 31, 2025
szabgab added a commit to szabgab/mdBook that referenced this issue Mar 31, 2025
@szabgab
Copy link
Contributor

szabgab commented Mar 31, 2025

Some ideas for improvements:

  • Check more details in the existing tests.
  • Test with custom plugins.
  • Maybe also test with existing 3rd party plugins.

github-merge-queue bot pushed a commit that referenced this issue Mar 31, 2025
test the command line without any parameters #1568
rik86189 pushed a commit to rik86189/mdBook that referenced this issue Apr 3, 2025
@ehuss ehuss self-assigned this Apr 20, 2025
szabgab added a commit to szabgab/mdBook that referenced this issue Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing-mdbook-iteself Area: mdbook's testsuite and unittests E-Help-wanted Experience: Help Needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants