Skip to content

Unit testing: document necessity of being in Godot's root folder #12366

Description

@ArchieVillain

Your Godot version:

4.7 Stable (Applies to any Godot version).

Issue description:

In order for tests to be run correctly, the command launching Godot with the test option --test must be executed with the Godot source repository root as the working directory.

The documentation does instruct to execute ./bin/<godot_binary> --test in the "Running tests" section. I feel like it's not clear that this is a hard requirement and not just a way to keep the docs lean by skipping CD'ing into /bin after executing scons from the root folder.

Further down, the "Integration tests for GDScript" does instruct explicitly to CD the root folder before doing further operations. Since this is in the context of writing new GDScript tests, I don't feel like it would be automatic to assume this is a requirement for running them as well. Furthermore, if a user has a problem generically running the tests, they're going to look for help in the "Running tests" section rather than the one about writing new tests specifically for GDScript.

Because of this, I think there should be a a small sentence or perhaps a WARNING or NOTE box (like the one already present for information about dev_mode) making it explicit that this is a hard requirement.

URL to the documentation page (if already existing):

Unit testing

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions