Skip to content

Conversation

m4gr3d
Copy link
Contributor

@m4gr3d m4gr3d commented Sep 23, 2025

This PR adds an initial set of instrumented tests to the Godot app module which should help us improve stability of the engine and detect regressions.

To do so, the PR is split into two commits (note: I recommend reviewing each commit by themselves):

  • The first commit updates the project layout for both the app and lib modules in order to align with the default Android Studio project layout. Doing so allow us to more easily set up, use and contribute to instrumented tests for the project. While the commit looks large, it mostly consists of moving files around, and doesn't contain much logical changes except where updates to project paths were needed.

  • The second commit sets up the instrumented tests folder layout and build config for the app module. A new instrumented product flavor is created which defines a custom Godot project and custom test plugins that are launched when running instrumented tests. The Godot project and test plugins are imported from @dsnopek https://github.com/dsnopek/javaclasswrapper-test repo, and the JavaClassWrapper tests it contains make up the initial set of instrumented tests.

…to match the default configuration

Both the `app` and `lib` modules had custom source sets configuration originating from the early days of the project. This updates the configuration to match the default Android Studio configuration which will simplify the addition of unit tests and instrumented tests to the project.

Note that for backcompat reasons, some folders (such as the `res` folder in the `app` module) are left as is.
@m4gr3d m4gr3d added this to the 4.6 milestone Sep 23, 2025
@m4gr3d m4gr3d requested a review from a team as a code owner September 23, 2025 16:50
@m4gr3d m4gr3d requested review from a team as code owners September 23, 2025 16:50
@m4gr3d
Copy link
Contributor Author

m4gr3d commented Sep 23, 2025

@syntaxerror247 To complete the integration, we'll need to set up the CI to automatically run the integrated tests. Can you look into what it'd take to make this happen.

This blogpost seems like a good reference to start with: https://medium.com/@peterkagure/running-instrumented-tests-on-github-actions-with-firebase-test-lab-ac17bb36ae9c

This builds on the work from @dsnopek in https://github.com/dsnopek/javaclasswrapper-test, by importing the set of JavaClassWrapper tests from that repo within the Godot core repo in order to bootstrap and standardize how we write and run Android instrumented tests.
The approach used here should serve as a base to build upon to expand the set of instrumented tests used to validate the project's stability.

Co-authored-by: David Snopek <[email protected]>
@m4gr3d m4gr3d force-pushed the javaclasswrapper_regression_tests branch from c3148e9 to 3397456 Compare September 23, 2025 17:01
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