[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACE9Y7AFJV4ZERD6WPF8QS":3,"skill-same:01M6ACE9Y7AFJV4ZERD6WPF8QS":48},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":21,"linkOnly":22,"markdownContent":23,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M6ACE9Y7AFJV4ZERD6WPF8QS","groovy-tests",null,"apache\u002Fgroovy","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACDPCXGWGWJN1KV90SHDQB",5482,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fapache\u002Fgroovy\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fgroovy-tests\u002FSKILL.md",[],[18,19,20],"groovy","groovy tests","tests","2026-11-10 10:12:30",false,"\u003C!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements.  See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership.  The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License.  You may obtain a copy of the License at\n\n    http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied.  See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n---\nname: groovy-tests\ndescription: AI-tooling guardrails for writing and modifying tests in the Apache Groovy repository — points at the project's test conventions in CONTRIBUTING.md (JUnit 5 framework, `Groovy\u003CNNNN>` regression-test naming, executable-AsciiDoc pattern, targeted runs, test-writing pitfalls), then adds the AI-specific constraints on top: no fabricated assertions, no `assert false` theatre, regression tests that actually fail on master before the fix, no scratch files left in the working tree, hand-back for human review. Use when writing or modifying tests under src\u002Ftest\u002F, src\u002Fspec\u002Ftest\u002F, or a subproject's src\u002Ftest\u002F.\nlicense: Apache-2.0\ncompatibility: claude, codex, copilot, cursor, gemini, aider\nmetadata:\n  audience: contributors to apache\u002Fgroovy\n  scope: ai-tooling-test-guardrails\n---\n\n# Groovy tests\n\nThis skill is the **AI-tooling layer** over the project's test\nconventions. The conventions themselves — JUnit 5 framework, the\n`Groovy\u003CNNNN>` regression-test naming, the executable-AsciiDoc\npattern, targeted Gradle runs, and the platform-portability\npitfalls — live in\n[`CONTRIBUTING.md`'s \"Tests\" section](..\u002F..\u002F..\u002FCONTRIBUTING.md#tests).\nThis skill cites them and adds the AI-specific guardrails: no\nfabricated assertions, regression tests that actually exercise the\nbug, no scratch files left behind, hand-back for review.\n\n- [`groovy-fix-workflow`](..\u002Fgroovy-fix-workflow\u002FSKILL.md) — pair\n  with when the test is part of a JIRA-tracked fix; that skill\n  owns the AI guardrails for the surrounding fix workflow.\n- [`groovy-internals`](..\u002Fgroovy-internals\u002FSKILL.md) — pair with\n  when the test exercises the compiler\u002Fruntime.\n- [`groovy-reproducer`](..\u002Fgroovy-reproducer\u002FSKILL.md) — pair with\n  when the test starts as an extracted reproducer.\n- [`CONTRIBUTING.md`](..\u002F..\u002F..\u002FCONTRIBUTING.md) — the canonical\n  source for every test convention this skill cites; load\n  alongside.\n\n## When to use this skill\n\n**Use it for:**\n\n- Writing or modifying a regression test for a JIRA-tracked bug.\n- Adding or modifying an executable AsciiDoc example.\n- Modifying any test under `src\u002Ftest\u002F`,\n  `subprojects\u002F\u003Cmodule>\u002Fsrc\u002Ftest\u002F`, or\n  `subprojects\u002Ftests-preview\u002Fsrc\u002Ftest\u002F`.\n- Choosing which Gradle test task to run for fastest feedback.\n\n**Don't use it for:**\n\n- Pure compiler\u002Fruntime changes —\n  [`groovy-internals`](..\u002Fgroovy-internals\u002FSKILL.md) is the home;\n  this skill complements it for the test side.\n- User-facing AsciiDoc prose that doesn't include any executable\n  example.\n- Build-script changes to `build.gradle` test configuration —\n  [`groovy-build`](..\u002Fgroovy-build\u002FSKILL.md) is the home.\n\n## Read first\n\n- [`CONTRIBUTING.md`](..\u002F..\u002F..\u002FCONTRIBUTING.md) \"Tests\" — the\n  canonical conventions this skill cites (framework, naming,\n  AsciiDoc pattern, targeted runs, pitfalls). Includes the\n  **inline Javadoc test** convention: a\n  `\u003Cpre class=\"...groovyTestCase\">` block in a doc comment is run\n  as a real JUnit test by `JavadocAssertionTestSuite` and is the\n  standard test form for the GDK — see \"Inline Javadoc tests\" there.\n- [`ARCHITECTURE.md`](..\u002F..\u002F..\u002FARCHITECTURE.md) \"Tests\" — the\n  test-layout map.\n- [`COMPATIBILITY.md`](..\u002F..\u002F..\u002FCOMPATIBILITY.md) — what\n  API-affecting tests need to demonstrate.\n\n## Top failure modes\n\nThese are the recurring mistakes specific to AI tooling writing\ntests:\n\n1. **Regression test that passes by construction.** Writing the\n   test after the fix, with assertions that mirror the fix rather\n   than reproducing the bug. The test must fail on `master`\n   before the fix is applied — see\n   [Fix workflow](..\u002F..\u002F..\u002FCONTRIBUTING.md#fix-workflow).\n   Quickest proof: stash the production change, run the targeted\n   test, watch it fail; pop, run, watch it pass.\n\n2. **Hallucinated assertions.** Asserting on output the code\n   doesn't actually produce. Run the test and check the actual\n   output before locking in `assertEquals(\"x\", actual)`.\n\n3. **`assert false \u002F\u002F bug` to \"force a failure\".** That tells you\n   nothing about the underlying behaviour. The test should\n   exercise the same path the bug report describes and let it\n   fail naturally; `assert \u003Creporter-expected>` is fine,\n   `assert false` is theatre.\n\n4. **Ignoring the platform-portability pitfalls.** Locale, line\n   endings, Windows path escaping, the `junit.network` gate are\n   all covered in\n   [Test-writing pitfalls](..\u002F..\u002F..\u002FCONTRIBUTING.md#test-writing-pitfalls).\n   AI tooling tends to hard-code platform defaults; check before\n   asserting.\n\n5. **Scratch test files left in the working tree.** When running\n   reproducers or experimenting, AI tooling can leave\n   half-written test files behind. `git status` before declaring\n   done; the working tree at hand-back contains only the\n   intentional changes.\n\n6. **Reaching for Spock by reflex.** New tests in this repo are\n   JUnit 5 — see\n   [Test framework](..\u002F..\u002F..\u002FCONTRIBUTING.md#test-framework).\n   Spock works but isn't the house style; don't import\n   `spock.lang.Specification` in a new test class without a\n   specific reason.\n\n7. **Treating `groovyTestCase`-covered behaviour as untested.**\n   A `\u003Cpre class=\"...groovyTestCase\">` block in a method's\n   Javadoc *is* its test (run by `JavadocAssertionTestSuite`) —\n   the GDK is tested this way. Don't add a redundant `*Test.groovy`\n   for, or report \"missing tests\" on, behaviour already covered by\n   such a block; add\u002Fextend the inline block instead. See\n   [Inline Javadoc tests](..\u002F..\u002F..\u002FCONTRIBUTING.md#inline-javadoc-tests).\n\n8. **Duplicating spec-test coverage into `src\u002Ftest\u002F`.** Tests under\n   `src\u002Fspec\u002Ftest\u002F` are curated to read as user documentation and\n   run as real tests; a spec test *is* that behaviour's coverage.\n   Don't re-add it under `src\u002Ftest\u002F` or report a spec example as\n   untested. New error\u002Fedge\u002Fregression coverage belongs in the\n   ordinary `src\u002Ftest\u002F` tree (it need not double as docs); a *good\n   user-facing example* belongs in the spec test. See\n   [Executable AsciiDoc examples](..\u002F..\u002F..\u002FCONTRIBUTING.md#executable-asciidoc-examples).\n\n9. **Unused imports or unneeded FQNs in test source.** Same\n   source-style rule as production — see\n   [Documentation](..\u002F..\u002F..\u002FCONTRIBUTING.md#documentation).\n   Inline `\u003Cpre class=\"...groovyTestCase\">` blocks are published\n   Groovydoc. A `\u002F\u002F GROOVY-` comment above a regression-test\n   method is required, not a violation — see\n   [Regression tests for JIRA fixes](..\u002F..\u002F..\u002FCONTRIBUTING.md#regression-tests-for-jira-fixes).\n\n## Procedure\n\nWhen writing or modifying a test:\n\n1. **Identify the shape.** Regression test (standalone class or\n   method-on-existing) per\n   [Regression tests for JIRA fixes](..\u002F..\u002F..\u002FCONTRIBUTING.md#regression-tests-for-jira-fixes),\n   or executable example per\n   [Executable AsciiDoc examples](..\u002F..\u002F..\u002FCONTRIBUTING.md#executable-asciidoc-examples).\n\n2. **Follow the convention** in `CONTRIBUTING.md` — naming,\n   JUnit 5 shape, tag\u002Finclude matching, target tree.\n\n3. **For a regression test, prove it fails on `master` first.**\n   See [Fix workflow](..\u002F..\u002F..\u002FCONTRIBUTING.md#fix-workflow).\n\n4. **Run targeted before module before full** — see\n   [Targeted runs](..\u002F..\u002F..\u002FCONTRIBUTING.md#targeted-runs).\n\n5. **Verify nothing leaks.** Clean working tree, no orphaned\n   tagged regions, no half-finished scratch files.\n\n## Validation checklist\n\nBefore declaring the change ready:\n\n- [ ] Test follows the convention in\n      [`CONTRIBUTING.md`](..\u002F..\u002F..\u002FCONTRIBUTING.md#tests) —\n      JUnit 5 shape, naming, placement.\n- [ ] Regression test was confirmed to fail on `master` *before*\n      any fix was applied (not after, not by construction).\n- [ ] Targeted Gradle test run is green.\n- [ ] If the change touches an executable example: AsciiDoc and\n      tagged Groovy snippet were edited in the same PR; tag\n      names match; no orphaned tagged regions (see\n      [Executable AsciiDoc examples](..\u002F..\u002F..\u002FCONTRIBUTING.md#executable-asciidoc-examples)).\n- [ ] No platform-default assumptions (locale, line endings,\n      path separators) baked into assertions — see\n      [Test-writing pitfalls](..\u002F..\u002F..\u002FCONTRIBUTING.md#test-writing-pitfalls).\n- [ ] `git status` shows no scratch files in the working tree.\n- [ ] Test source and inline Javadoc match\n      [Documentation](..\u002F..\u002F..\u002FCONTRIBUTING.md#documentation). A\n      `\u002F\u002F GROOVY-` comment on a regression-test method is\n      required, not a violation.\n- [ ] Commit message references `GROOVY-NNNNN` where applicable.\n\n## References\n\n- [`CONTRIBUTING.md`](..\u002F..\u002F..\u002FCONTRIBUTING.md) \"Tests\" — the\n  canonical test conventions (framework, naming, AsciiDoc\n  pattern, pitfalls).\n- [`CONTRIBUTING.md`](..\u002F..\u002F..\u002FCONTRIBUTING.md) \"Documentation\" —\n  source and Groovydoc style (including inline Javadoc tests).\n- [`ARCHITECTURE.md`](..\u002F..\u002F..\u002FARCHITECTURE.md) — overall test\n  layout.\n- [`COMPATIBILITY.md`](..\u002F..\u002F..\u002FCOMPATIBILITY.md) — what\n  API-affecting tests need to demonstrate.\n- `.agents\u002Fskills\u002Fgroovy-fix-workflow\u002FSKILL.md` — AI guardrails\n  for the surrounding fix workflow.\n- `.agents\u002Fskills\u002Fgroovy-internals\u002FSKILL.md` — AI guardrails for\n  compiler\u002Fruntime changes.\n- `.agents\u002Fskills\u002Fgroovy-reproducer\u002FSKILL.md` — pair with when\n  the test starts as an extracted reproducer.\n",{},"master","4ab67ec26055b11dc3c98a4a350020b99fecd8bd",".agents\u002Fskills\u002Fgroovy-tests",1914,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fgroovy","https:\u002F\u002Fgroovy-lang.org","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-15 01:42:11",{"source":7,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add apache\u002Fgroovy --skill groovy-tests",{"tool":40,"command":41},"bunx","bunx skills add apache\u002Fgroovy --skill groovy-tests",{"tool":43,"command":44},"pnpm","pnpm dlx skills add apache\u002Fgroovy --skill groovy-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Fgroovy\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fgroovy-tests\u002FSKILL.md",true,[],[49,55,63,70,78,86],{"skillNo":50,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":21},"01M6ACEDS969D6ZXE8SGZSPR3B","groovysh","https:\u002F\u002Fgithub.com\u002Fapache\u002Fgroovy\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fgroovysh\u002FSKILL.md",[],[51],{"skillNo":56,"name":57,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":21},"01M6ACEBR5V55F0X8YS9EJGRW2","groovy-triage","https:\u002F\u002Fgithub.com\u002Fapache\u002Fgroovy\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fgroovy-triage\u002FSKILL.md",[],[61,18,62],"triage","groovy triage",{"skillNo":64,"name":65,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":21},"01M6ACE7HZNK305VJGV3WN4P5N","groovy-skills","https:\u002F\u002Fgithub.com\u002Fapache\u002Fgroovy\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fgroovy-skills\u002FSKILL.md",[],[18,69],"groovy skills",{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":21},"01M6ACE5BJCXWJPMZD0M12H3D5","groovy-reproducer","https:\u002F\u002Fgithub.com\u002Fapache\u002Fgroovy\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fgroovy-reproducer\u002FSKILL.md",[],[18,76,77],"groovy reproducer","reproducer",{"skillNo":79,"name":80,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":21},"01M6ACE2M14SX17HE4JKR57DCC","groovy-reassess","https:\u002F\u002Fgithub.com\u002Fapache\u002Fgroovy\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fgroovy-reassess\u002FSKILL.md",[],[18,84,85],"groovy reassess","reassess",{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":21},"01M6ACDZWW85YHH8R4CMK1P5G3","groovy-jira","https:\u002F\u002Fgithub.com\u002Fapache\u002Fgroovy\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fgroovy-jira\u002FSKILL.md",[],[92,18,93],"jira","groovy jira"]