Skip to content

Modular Tests#67

Open
Roudenn wants to merge 6 commits into
Goob-Station:masterfrom
Roudenn:modular-tests
Open

Modular Tests#67
Roudenn wants to merge 6 commits into
Goob-Station:masterfrom
Roudenn:modular-tests

Conversation

@Roudenn
Copy link
Copy Markdown
Contributor

@Roudenn Roudenn commented Jun 4, 2026

About the PR

Added support for modular tests and Content.Goobstation.IntegrationTests project.

Why

In a perfect world, any compicated enough open source code needs integration tests. Modules can't be tested right now because of their independency and making a subfolder in Content.IntegrationTests is stupid.

Technical details

Each modular test is a normal IntegrationTest project that directly references all modules in its own module folder.

Other modules are also loaded during the test, but testing code cannot reference types from them directly, because there's no project reference to them during compilation and they are copied to the bin folder instead.

In order to launch integration test project from the Modules folder, a loophole in Content.Benchmarks is used: since it's able to access internal types of RobustToolbox, it also can change the relative root in ProgramShared, allowing the project to start up correctly.
This is horrible and may be patched someday, but I hope by the time when it's fixed RT will provide a way to change the root offset safely.

Test plan

  1. Make a dummy test for something goob related
  2. See if it works correctly
  3. Debug that all modules are loaded correctly using debug (both Goobstation and Lavaland)

Requirements

  • Make some tests for Goobstation stuff
  • See how it interacts with another module (Lavaland)
  • Implement a github action that finds and then runs all modular tests automatically

Breaking changes

PoolManager's module discovery now accounts if the launched project is already located in the Modules/ folder and loads all of them correctly.

Changelog

no cl no fun

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant