godotengine / godotengine/godot-docs

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

Open Beginner friendly
#12,366 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**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/ --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](https://docs.godotengine.org/en/stable/engine_details/architecture/unit_testing.html)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Unit testing documentation page, especially the “Running tests” section and its existing dev_mode note. Make the working-directory requirement explicit there, then verify the instructions clearly say that Godot tests must be launched from the repository root.

Written by the indexing model from the issue text.

Assessment

Domain
documentation, testing
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
92/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.