Skip to content

Separate bevy tests from the example on how to run tests #2281

Closed
@Weibye

Description

@Weibye

What problem does this solve or what need does it fill?

The tests currently within ./tests are also listed in the ./examples/README.md and the Cargo.toml as the example on how to test systems.

What solution would you like?

Assuming ./tests will become a much more involved test suite for bevy in the future, I propose a separation of concerns and would like to split these into two.

  1. Leave ./tests/how_to_test_systems.rs as it currently is
  2. Create a near-identical copy and keep in ./examples/testing which then could be elaborated on for user-friendliness if needed
  3. Have this new one listed in ./examples/README.md and Cargo.toml

This way ./tests is free to change and evolve as needed without also having to be considered an approachable and user-friendly entry into testing within Bevy.

What alternative(s) have you considered?

  • To add ./tests to the ignored folders of the example-validation action.
    This reduces cohesion and can create confusion for users as there exists examples that does not reside within ./examples

  • Expand the example-doc-validation action to support multiple locations for examples to be in.
    This would further delay [Merged by Bors] - CI - Check that examples are listed in README and Cargo #1650, and again reduce cohesion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MetaAbout the project itselfC-ExamplesAn addition or correction to our examples

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions