본문으로 건너뛰기
cccskills
무료GitHub에 공개

test-fixer

Guide for running, reviewing, and fixing test failures across grails-core modules using Gradle test reports

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

<!-- SPDX-License-Identifier: Apache-2.0 Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0. -->

What I Do

  • Guide targeted and full test runs across grails-core modules.
  • Help interpret Gradle HTML and XML test reports.
  • Help triage failing specs, static state pollution, and module-specific regressions.

When to Use Me

Activate this skill when:

  • Running a failing module or specific spec.
  • Preparing a commit and verifying affected module tests.
  • Triaging regressions after a dependency upgrade or refactor.
  • Reviewing aggregate test results from :grails-test-report.

Key Tasks

Targeted Testing Recommended

To save time, run only related tests:

./gradlew :grails-data-hibernate7-core:test --tests "grails.gorm.tests.BasicCollection*"

Full Run

./gradlew test --continue

Use --continue when you need later modules to run after an earlier module fails.


Aggregate Test Reports

The grails-test-report project owns repository test aggregation.

./gradlew :grails-test-report:check --continue

This generates:

  • Unit HTML: grails-test-report/build/reports/tests/test/index.html
  • Unit Markdown: grails-test-report/build/reports/tests/test.md
  • Integration HTML: grails-test-report/build/reports/tests/integrationTest/index.html
  • Integration Markdown: grails-test-report/build/reports/tests/integrationTest.md
  • Combined HTML: grails-test-report/build/reports/tests/combined/index.html
  • Combined Markdown: grails-test-report/build/reports/tests/combined.md

The 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.


Running Tests for a Specific Module

# 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

Test Source Layout

Source setDirectoryTask
Unit testssrc/test/groovy/test
Integration testssrc/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.


Parallel Test Execution

Tests run in parallel (maxParallelForks defaults to 4 on CI and to availableProcessors * 3/4 otherwise; override with -PmaxTestParallel). This can cause:

  • Static state pollution: one test mutating a static field that another test reads.
  • Port conflicts: multiple test JVMs binding the same port.
  • @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

Test Configuration Flags

PropertyEffect
skipTestsSkips all Test tasks (build only)
maxTestParallel=NOverride parallel fork count
onlyFunctionalTestsRun only functional test suites
skipHibernate7TestsSkip H7-specific test suites
onlyMongodbTestsRun only MongoDB test suites
onlyCoreTestsRun only core module tests

XML Report Location

Gradle writes JUnit XML test results to:

<module>/build/test-results/
├── test/
│   └── TEST-org.grails.SomeSpec.xml
└── integrationTest/
    └── TEST-org.grails.SomeIntegrationSpec.xml

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

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

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

apache/grails-core2.9천2026년 10월 21일 업데이트

Guide for upgrading Grails applications from Grails 7.x to Grails 8, covering Java 21, Groovy 5 name resolution and static compilation, Spring Boot 4.1, Spring Framework 7, dependency management, Micronaut, Jackson 3, Hibernate 7, TagLibs, testing, content negotiation, asset pipeline wildcard paths, and validation behavior changes

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

apache/grails-core2.9천2026년 10월 21일 업데이트

Comprehensive guide for Grails development, covering web applications, REST APIs, GORM, controllers, services, views, plugins, and testing with Spock and Geb

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

apache/grails-core2.9천2026년 10월 21일 업데이트

Expert guide for Groovy 5 development, covering concise syntax, closures, DSLs, metaprogramming, static compilation, and integration with Java 21 and Grails

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

apache/grails-core2.9천2026년 10월 21일 업데이트

Guide for working in the grails-data-hibernate7 module, especially Hibernate 7 domain binding, mapping migration, generators, and integration tests. Use this when changing code or tests under grails-data-hibernate7.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

apache/grails-core2.9천2026년 10월 21일 업데이트

Guide for developing on the Java 21 baseline, including modern features, best practices, and integration with Groovy/Grails projects

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

apache/grails-core2.9천2026년 10월 21일 업데이트

apache의 스킬 모두 보기

이 스킬의 문제 신고