Commits
Tarun Sukhani authored cb8fb8adec0
fix(testrunner): use Class.getName() instead of Groovy .name property (PF-91)
When rendering /@tests against an end-user app (observed against
~/Programming/payments at localhost:9009), the template raised
NullPointerException: "Cannot invoke method replace() on null
object" at the @{TestRunner.run(test.name+'.class')} /
${test.name.replace(...)} expressions in the functionalTests
loop.
Root cause: Groovy's `test.name` property access on a Class
instance returns null in some app classloader/metaclass
configurations even though `Class.getName()` returns a valid
fully-qualified name (verified — the same list rendered correctly
via /@tests.list, which calls c.getName() in Java directly).
The literal-property syntax has been latent for over a decade
(introduced in early commits; survived intact across the Tailwind
migration); it just happens to coincide with whatever Groovy
metaclass state ~/Programming/payments has at boot.
Fix: switch all four `test.name` occurrences to explicit
`test.getName()` calls. Same string value; bypasses Groovy's
property-resolution path entirely.
Verified live: localhost:9009/@tests now renders the 2 unit and
2 functional tests cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>