用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/apache/grails-core --skill test-fixer命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Expert guide for Gradle 9 builds in apache/grails-core on the 8.0.x line - multi-project topology, convention plugins, BOM platforms, dependency rules, task configuration hygiene, and repo-specific patterns that override generic Gradle docs
Comprehensive guide for current Grails development, covering web applications, REST APIs, GORM, controllers, services, views, plugins, and testing with Spock and Geb
Expert guide for Groovy 5 development, covering concise syntax, closures, DSLs, metaprogramming, static compilation, and integration with Java 21 and Grails
正在显示 SKILL.md
基于 SOC 职业分类
| name | test-fixer |
| description | Guide for running, reviewing, and fixing test failures across grails-core modules using Gradle test reports |
| license | Apache-2.0 |
Activate this skill when:
:grails-test-report.To save time, run only related tests:
./gradlew :grails-data-hibernate7-core:test --tests "grails.gorm.tests.BasicCollection*"
./gradlew test --continue
Use --continue when you need later modules to run after an earlier module fails.
The grails-test-report project owns repository test aggregation.
./gradlew :grails-test-report:check --continue
This generates:
grails-test-report/build/reports/tests/test/index.htmlgrails-test-report/build/reports/tests/test.mdgrails-test-report/build/reports/tests/integrationTest/index.htmlgrails-test-report/build/reports/tests/integrationTest.mdgrails-test-report/build/reports/tests/combined/index.htmlgrails-test-report/build/reports/tests/combined.mdThe aggregate report includes root subprojects that define matching test or integrationTest tasks.
The collected unit and integration Test tasks are finalized by their matching aggregate report tasks. Reports are attempted after failures and after targeted module test runs, but they summarize the XML results currently available on disk. Use --continue for full-suite runs so Gradle keeps scheduling later test tasks after an earlier failure; without it, reports can be partial. Run clean first when stale XML results should be excluded.
# All tests in a module
./gradlew :grails-data-hibernate7-dbmigration:test
# A specific spec
./gradlew :grails-data-hibernate7-dbmigration:test \
--tests "org.grails.plugins.databasemigration.command.DbmGenerateGormChangelogCommandSpec"
# A specific feature method
./gradlew :grails-data-hibernate7-core:test \
--tests "org.grails.orm.hibernate.FooSpec.my feature name"
# Force rerun even if Gradle thinks it is up-to-date
./gradlew :grails-data-hibernate7-core:test --rerun-tasks
| Source set | Directory | Task |
|---|---|---|
| Unit tests | src/test/groovy/ | test |
| Integration tests | src/integration-test/groovy/ | integrationTest |
Most specs in grails-core are unit tests (src/test/groovy/) run by the test task. A small number of modules use integrationTest for full Spring context tests.
Tests run in parallel (maxParallelForks defaults to 4 on CI and to availableProcessors * 3/4 otherwise; override with -PmaxTestParallel). This can cause:
@Shared field contamination: shared state not properly cleaned up between feature methods.To diagnose flaky failures, rerun with forced serial execution:
./gradlew :module:test -PmaxTestParallel=1 --rerun-tasks
| Property | Effect |
|---|---|
skipTests | Skips all Test tasks (build only) |
maxTestParallel=N | Override parallel fork count |
onlyFunctionalTests | Run only functional test suites |
skipHibernate7Tests | Skip H7-specific test suites |
onlyMongodbTests | Run only MongoDB test suites |
onlyCoreTests | Run only core module tests |
Gradle writes JUnit XML test results to:
<module>/build/test-results/
├── test/
│ └── TEST-org.grails.SomeSpec.xml
└── integrationTest/
└── TEST-org.grails.SomeIntegrationSpec.xml