Skip to content
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

Start work on Client Game Test API #4292

Merged
merged 15 commits into from
Dec 16, 2024

Conversation

Earthcomputer
Copy link
Contributor

@Earthcomputer Earthcomputer commented Dec 10, 2024

This PR starts work on the Client Game Test API. The API should be considered experimental and breaking changes in the future are expected.

  • Renames client auto tests to client gametests
  • Moves the existing client gametest code to its own experiment Fabric API module
  • Creates an entrypoint for client gametests which starts running when the client has loaded and starts ticking (no gametest would want to run before this point anyway, and gets rid of the hack which waits until the client thread can start accepting tasks)
  • Moves functionality out of FabricClientTestHelper into non-static methods in ClientGameTestContext
  • Adds an input system that allows gametests to simulate keyboard and mouse inputs (including via key bindings)
  • Unlinks GLFW input handlers from the game, preventing real user input from interfering with tests.

@Earthcomputer Earthcomputer changed the title Client Game Test API Start work on Client Game Test API Dec 11, 2024
@Earthcomputer Earthcomputer marked this pull request as ready for review December 11, 2024 16:01
@modmuss50 modmuss50 added the enhancement New feature or request label Dec 11, 2024
Copy link
Member

@modmuss50 modmuss50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a vast improvement :) Just a few small comments/questions/random ideas. With this module im happy to merge stuff even if we know its going to change later.

Copy link
Member

@modmuss50 modmuss50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More than happy to get this in soon, just under the expectation that it has a higher than usual chance of breaking its API (a none issue as its dev only).

fabric-client-gametest-api-v1/build.gradle Outdated Show resolved Hide resolved
@modmuss50 modmuss50 added the last call If you care, make yourself heard right away! label Dec 13, 2024
@modmuss50 modmuss50 added the merge me please Pull requests that are ready to merge label Dec 16, 2024
@modmuss50 modmuss50 merged commit b47eab6 into FabricMC:1.21.4 Dec 16, 2024
4 checks passed
@Earthcomputer Earthcomputer deleted the client-gametest-api branch December 16, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request last call If you care, make yourself heard right away! merge me please Pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants