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
Game Test API #226
Game Test API #226
Conversation
…d resource loader handling TestServer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wow, this PR looks great!
I only have few nitpicks
...k_content_registry/src/testmod/java/org/quiltmc/qsl/block/test/BlockContentRegistryTest.java
Outdated
Show resolved
Hide resolved
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/api/package-info.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Ennui Langeweile <85590273+EnnuiL@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation in the package-info is really nice! I provided some really picky corrections, but the structure is really really good.
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/api/package-info.java
Outdated
Show resolved
Hide resolved
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/api/package-info.java
Outdated
Show resolved
Hide resolved
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/api/package-info.java
Outdated
Show resolved
Hide resolved
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/api/package-info.java
Outdated
Show resolved
Hide resolved
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/api/package-info.java
Outdated
Show resolved
Hide resolved
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/api/package-info.java
Outdated
Show resolved
Hide resolved
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/api/package-info.java
Outdated
Show resolved
Hide resolved
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/api/package-info.java
Outdated
Show resolved
Hide resolved
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/api/package-info.java
Outdated
Show resolved
Hide resolved
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/api/package-info.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Glitch <glitch.g3431@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I'll give it a proper look/test in my IDE later :D
library/core/game_test/src/main/java/org/quiltmc/qsl/game_test/mixin/server/MainMixin.java
Outdated
Show resolved
Hide resolved
Hm, as a precaution, we should probably consider merging this GameTest mappings PR before doing any further push for release |
that mappings PR doesn't target the version this PR targets anymore :) |
Not if we downgrade it back! |
And with some poking? My dreams became true! :P But yeah, the PR has been merged on the 22w03a branch and backported to the 1.19.3 one on QM 1.19.3-build.18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only change that I'd make is adding the "You agree to the EULA by running these tests" message, but yeah, it can be done after merge
One of the most important addition for stronger testing!
This API is, well, the game test API, which allows mods to use the Minecraft test automation framework (keynote about it by Henrik Kniberg).
This API introduces a new entrypoint
quilt:game_test
of classes implementingQuiltGameTest
. Any method annotated withGameTest
in that class will be registered as a test, and you can implement a method fromQuiltGameTest
to programmatically register more test classes.The API is partially a port from Fabric API's game test API, but extended to be more comfortable to use, and more powerful!
As you can see there's also some game tests implemented for Block Content Registries to show how it can be used (and its benefits).