Skip to content

Fix: Migrate tests to GdUnit4#125

Merged
niyazmft merged 11 commits into
mainfrom
fix/issue-108-gdunit4-migration
Jun 3, 2026
Merged

Fix: Migrate tests to GdUnit4#125
niyazmft merged 11 commits into
mainfrom
fix/issue-108-gdunit4-migration

Conversation

@niyazmft
Copy link
Copy Markdown
Owner

@niyazmft niyazmft commented Jun 2, 2026

Closes #108

Migrates all legacy tests to GdUnit4, modernizing the test suite according to the industry standard.

  • Installs GdUnit4 and migrates all test suites
  • Swaps out bash script validation for native CI integration using MikeSchulze/gdUnit4-action
  • Fixes headless execution issues with modals and UI state

niyazmft added 3 commits June 3, 2026 01:22
Fixes #108

- Installed GdUnit4 addon
- Migrated all test suites to use GdUnit4 macros
- Replaced run_all_tests.sh with GdUnitCmdTool.gd
- Updated GitHub Actions to use official GdUnit4 action
- Fixed broken UI test states and headless compatibility
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request integrates the GdUnit4 unit testing framework into the project, replacing the previous custom test runner and updating the PR template, documentation, and contributing guidelines accordingly. The review feedback highlights several critical issues across the newly added scripts, including syntax errors in GDScript (such as invalid spaces in assignment operators and the use of else: if instead of elif), potential runtime crashes due to missing null checks (e.g., when scene() or FileAccess.open returns null, or when returning null in builder pattern methods), and bash anti-patterns in runtest.sh regarding argument expansion. Additionally, the feedback points out a typo in GdUnitTestCIRunner.gd and a logic flaw in GdUnitTestSessionRunner.gd where tests are executed even if the startup hook fails.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread addons/gdUnit4/runtest.sh
Comment thread addons/gdUnit4/runtest.sh Outdated
Comment thread addons/gdUnit4/src/core/GdUnitFileAccess.gd
Comment thread addons/gdUnit4/src/core/runners/GdUnitTestSessionRunner.gd Outdated
Comment thread addons/gdUnit4/src/core/parse/GdScriptParser.gd Outdated
Comment thread addons/gdUnit4/src/cmd/CmdCommandHandler.gd Outdated
Comment thread addons/gdUnit4/src/cmd/CmdCommandHandler.gd Outdated
Comment thread addons/gdUnit4/src/core/runners/GdUnitTestCIRunner.gd Outdated
Comment thread addons/gdUnit4/src/core/runners/GdUnitTestCIRunner.gd
Comment thread addons/gdUnit4/src/core/GdUnitSceneRunnerImpl.gd Outdated
@niyazmft niyazmft added the jules Gating label for Google Jules offload label Jun 3, 2026
@niyazmft
Copy link
Copy Markdown
Owner Author

niyazmft commented Jun 3, 2026

Jules fix this PR CI issue

@niyazmft niyazmft merged commit 6424037 into main Jun 3, 2026
4 checks passed
@niyazmft niyazmft deleted the fix/issue-108-gdunit4-migration branch June 3, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jules Gating label for Google Jules offload

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate testing framework to GdUnit4

1 participant