IntelliJ `AnAction` 클래스를 구현하거나 수정하고 `plugin.xml`에 등록하도록 안내합니다. 표시 이름과 설명은 메시지 번들에 두고, 필요하면 아이콘을 설정하며, 이벤트 코루틴 범위에서 중단 함수를 실행해 동기식 처리로 IDE가 멈추는 일을 방지합니다.
- IDE 메뉴에 새 동작 추가
- 동작 등록이나 아이콘 변경
- 동작 이름과 설명 정리
`bt.cmd` 또는 `tests.cmd`로 IntelliJ 테스트를 실행하고 테스트 선택, 모듈 지정, 검색 실패, 빌드 실패를 진단합니다. 재시도와 JVM 설정도 다룹니다.
Run or troubleshoot IntelliJ tests with `bt.cmd` or `tests.cmd`.
실행 점수 미검증
설치 방법 보기IntelliJ 테스트를 실행하고 대상 클래스, 메서드, 패키지를 지정하는 방법을 안내합니다. Bazel로 실행할 수 있는 모듈에는 bt.cmd를 사용하고, 지원되지 않는 모듈에서는 tests.cmd로 전환합니다. 테스트 클래스를 찾지 못하면 완전 수식 이름, 와일드카드 패턴, 테스트를 포함하는 JPS 모듈을 확인합니다. 단순한 클래스 이름만으로는 검색할 수 없습니다.
실패한 경우 종료 코드를 바탕으로 테스트 실패, 빌드 실패, 인프라 장애를 구분합니다. 실패 테스트 재시도, 테스트 JVM 메모리 설정, 시스템 속성 전달, 디버거 연결 방법도 다룹니다. 별도의 Bazel 모듈에 속한 테스트와 제품 패키징 변경 시 필요한 테스트 실행 방법도 안내합니다.
IntelliJ의 특정 테스트만 실행하거나 테스트를 찾지 못하는 문제, 메모리 부족, 빌드 완료 전 실패를 조사할 때 유용합니다. 테스트가 속한 모듈을 모르거나 bt.cmd와 tests.cmd 중 무엇을 쓸지 판단할 때도 사용할 수 있습니다.
tests.cmd에서 테스트를 찾지 못하는 원인을 조사해 주세요.”테스트를 실행하려면 대상 저장소의 빌드 환경이 필요합니다. 독립 Bazel 모듈의 테스트는 해당 모듈의 지침에 따라 Bazel로 실행해야 합니다.
이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.
AI가 SKILL.md의 내용에서 주의가 필요한 작업과 도입 전제를 확인했습니다. 점수는 실제로 실행한 결과(실행 검증)만으로 매깁니다.
점수에는 넣지 않았습니다. 2026년 10월 28일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.
설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Run the tests of a module with bt first:
./community/tools/bt.cmd --module <module> --filter <FQN>
--module: the JPS module that holds the test classes. Always use the module of the test itself. The module name is the name of the .iml file in the test directory, without the extension.--filter: an FQN, FQN#method, or an all-lowercase package. A package value runs all the test classes in that package.In a community checkout, the wrapper is ./tools/bt.cmd.
# Single test class (FQN)
./community/tools/bt.cmd --module intellij.platform.util.tests \
--filter com.intellij.openapi.util.io.FileUtilLightTest
# Specific test method
./community/tools/bt.cmd --module intellij.platform.util.tests \
--filter 'com.intellij.openapi.util.io.FileUtilLightTest#isAncestor'
# All test classes of a package
./community/tools/bt.cmd --module intellij.platform.util.tests \
--filter com.intellij.openapi.util.io
bt runs a module when the migrated list names it, or when a bt.json area owns its directory. The bt README gives the resolution rules.
| Option | Effect |
|---|---|
--filter <value> | Runs one class, one method, or one package of the target. |
--no-cache | Runs the tests again when Bazel has a cached result. |
--dry-run | Prints the resolved label, the filter, and the Bazel command. Runs nothing. |
--json | Writes one JSON object to stdout and nothing else. |
--host <host> | Runs the committed HEAD on another machine of the user over yonder. The yonder skill (yonder skill install) gives the rules. |
-- --flaky_test_attempts=3 | Runs a failed test up to 3 times. tests.cmd uses -Dintellij.build.test.attempt.count=3 for this. |
-- --test_arg=--jvm_flag=-Dkey=value | Sets a system property in the test JVM. tests.cmd uses -Dpass.key=value for this. |
-- --test_arg=--jvm_flag=-Xmx8g | Sets the heap of the test JVM. tests.cmd uses -Dintellij.build.test.jvm.memory.options=-Xmx8g for this. |
bt gives all arguments after -- to Bazel without a change. Run ./community/tools/bt.cmd --help for all selectors and options. To attach a debugger, use tests.cmd. The section Additional JVM options shows the flags.
| Exit code | Meaning |
|---|---|
| 0 | All tests passed. |
| 2 | Usage error, or bt refuses the module. |
| 3 | Tests failed. |
| 4 | Zero tests ran. |
| 5 | The build failed before the tests. |
| 6 | Infrastructure failure. |
bt buildA green bt run in a linked work tree, such as a Branch Deck lease, records the tree that it saw: one line in bd-checks.jsonl of the git directory. bd lease pick reads the record. A repository can set pick_requires_check in .branchdeck.toml, and then the pick refuses a lease whose tree has no green build or test. A run during which the files changed records nothing. A red run records nothing.
Check the last tree with bt, not with a raw ./bazel.cmd build. bazel.cmd gives the process to bazelisk, so it leaves no record. Commit or delete scratch files before the last check: a record of local changes counts only for a commit of the same files, and bt names those files on the stderr.
./community/tools/bt.cmd build //plugins/air/... # bazel build -k, one digest line, and the record
./community/tools/bt.cmd build //plugins/air/... --host studio
bt build exits 0 for a green build, 5 for a build failure, and 6 for an infrastructure failure. A --host run records the tree of the commit that ran on the host. The bt README gives the record format.
bt refuses a module whose tests do not run under Bazel yet. It exits with code 2 and prints the tests.cmd command. Run that command:
./tests.cmd --module <module> --test <pattern>
--module — the JPS module containing the test classes (always use the test's own module). To find the module name, look at the .iml file in the test's directory — the module name is the .iml filename without the extension.--test — FQN, wildcard pattern, or FQN#methodName# Single test class (FQN)
./tests.cmd --module intellij.cidr.compiler.custom.tests \
--test com.intellij.cidr.compiler.custom.CidrCustomCompilerReadTest
# Wildcard pattern
./tests.cmd --module intellij.goland.tests \
--test com.goide.comments.*Test
# Specific test method (wildcards cannot be used with #)
./tests.cmd --module intellij.cidr.compiler.custom.tests \
--test com.intellij.cidr.compiler.custom.CidrCustomCompilerReadTest#testSingleDefine
# Multiple (semicolon-separated)
./tests.cmd --module intellij.platform.build.tests \
--test org.jetbrains.intellij.build.TestSelectorsTest#class selector;org.jetbrains.intellij.build.FileSetTest
Simple class names like MyTest do NOT work — always use FQN or wildcard (*MyTest).
Patterns are transformed (* → .*, . → \.) and matched against the fully qualified class name using Pattern.matches() (full-string match):
| Pattern | Regex | Matches org.example.MyTest? |
|---|---|---|
MyTest | MyTest | NO — doesn't cover the package prefix |
*MyTest | .*MyTest | YES |
org.example.MyTest | org\.example\.MyTest | YES |
org.example.* | org\.example\..* | YES |
Use community/tests.cmd for tests that belong to community-only modules:
./community/tests.cmd --module <module> --test <pattern>
In an Ultimate checkout, run ApiCheckTest directly through its Bazel test target. For a focused check, pass one or more comma-separated module names:
bazel test //tests/ideaProjectStructure:projectStructureTests_test \
--test_filter=com.intellij.ideaProjectStructure.api.ApiCheckTest \
--test_arg=--jvm_flag=-Dapi.dump.test.modules.to.check=<module>[,<module>...] \
--test_output=summary \
--test_summary=detailed
Omit --test_arg to check all modules. Do not use bazel run for this target: it streams noisy test output and does not provide Bazel's test summary.
This bt command is the same run with a digest:
./community/tools/bt.cmd //tests/ideaProjectStructure:projectStructureTests_test \
--filter com.intellij.ideaProjectStructure.api.ApiCheckTest \
-- --test_arg=--jvm_flag=-Dapi.dump.test.modules.to.check=<module>[,<module>...]
On failure, keep agent context small by extracting the failing dynamic-test names and messages from Bazel's JUnit report instead of printing the full test.log:
xmllint --xpath '//testcase[failure or error]/@name | //testcase[failure or error]/*[self::failure or self::error]/@message' \
out/bazel-testlogs/tests/ideaProjectStructure/projectStructureTests_test/test.xml
When changing ProductProperties, productImplementationModules, product content descriptors, plugin/module-set packaging, or generated product layout XML, also run:
./community/tools/bt.cmd //build:all-products-packaging_test
The target pins the one class AllProductsPackagingTest and is tagged manual, so no --filter is needed, and no lane or wildcard pattern runs it. bt prints the digest, and Bazel writes out/bazel-testlogs/build/all-products-packaging_test/test.xml. The raw form is ./bazel.cmd test //build:all-products-packaging_test.
When running tests.cmd from PowerShell, pass JVM -D... arguments via stop-parsing mode to avoid argument mangling:
./tests.cmd --% -Dintellij.build.test.patterns=com.example.MyTest
Without --%, PowerShell can alter -D... arguments before they reach tests.cmd, which may lead to errors like Could not find or load main class ....
Some parts of the repository are standalone Bazel modules and must not use tests.cmd or community/tests.cmd. The tests of a module that matches a pattern in the migrated list run only under Bazel. The migrated list is community/build/bazel-migrated-test-modules.txt, or build/bazel-migrated-test-modules.txt in a community checkout. tests.cmd refuses such a module with an error that names the pattern. Run the module with bt:
./community/tools/bt.cmd --module <module> --filter <FQN>
When you have the Bazel label of the target, ./community/tools/bt.cmd <label> --filter <FQN> runs the same target.
community/platform/build-scripts/bazelcommunity/platform/build-scripts/bazel/README.md:cd community/platform/build-scripts/bazel
../../../../bazel.cmd test //:bazel-generator-integration-tests --test_output=all
./tests.cmd for org.jetbrains.intellij.build.bazel.BazelGeneratorIntegrationTests or other tests in that module.community/platform/build-scripts/bazel, prefer that module-local ../../../../bazel.cmd test flow for verification.tests.cmd is a cross-platform script (works on Windows/Linux/macOS)--module and --test, maps them to JVM properties, and calls bazel run //build:local_idea_ultimate_run_tests_build_targetTroubleshooting test discovery:
bazel cleanFor deeper troubleshooting, see TESTING-internals.md.
Usage: tests.cmd --module <module> --test <pattern> [options]
Required:
--module <module> Name of the JPS module which contains the test classes
--test <pattern> Full test class name (FQN) or wild card pattern (e.g. com.intellij.*Test) or exact FQN#methodName
Options:
--debug Debug build scripts JVM process
--help Show this help message
Additional options are passed as JVM flags to org.jetbrains.intellij.build.TestingOptions
Example: -Dintellij.build.test.debug.enabled=true -Dintellij.build.test.debug.suspend=true -Dintellij.build.test.debug.port=5005
Extra -D... arguments are passed through as JVM flags to org.jetbrains.intellij.build.TestingOptions:
-Dintellij.build.test.attempt.count=<n>
-Dintellij.build.test.jvm.memory.options=<options>
-Xmx8g for 8GB heap-Dpass.<property>=<value>
pass. prefix is stripped, so -Dpass.my.flag=true becomes -Dmy.flag=true in the test JVMDebugging: -Dintellij.build.test.debug.enabled=true -Dintellij.build.test.debug.port=5005 -Dintellij.build.test.debug.suspend=true — attach IDE debugger to port 5005.
Tests fail with OutOfMemoryError:
-Dintellij.build.test.jvm.memory.options=-Xmx8gTests not found:
--test uses FQN or wildcard, not simple class name: --test com.example.MyTest--module is the module that actually contains the test class (look at the .iml file location)community/platform/build-scripts/bazel; those tests must be run with module-local ../../../../bazel.cmd test, not tests.cmdtests.cmd refuses the module and names a pattern from bazel-migrated-test-modules.txt, the tests are Bazel-only. Run them with ./community/tools/bt.cmd --module <module> --filter <FQN>, as in Separate Bazel ModulesTests pass locally but fail in CI:
-Dintellij.build.test.attempt.count=3 for flaky testsBazel build fails before tests run:
.iml fileFor deeper troubleshooting, see TESTING-internals.md.
For detailed information about how tests.cmd works internally, including:
For guidelines on writing tests (as opposed to running them), see the guidelines:
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
IntelliJ `AnAction` 클래스를 구현하거나 수정하고 `plugin.xml`에 등록하도록 안내합니다. 표시 이름과 설명은 메시지 번들에 두고, 필요하면 아이콘을 설정하며, 이벤트 코루틴 범위에서 중단 함수를 실행해 동기식 처리로 IDE가 멈추는 일을 방지합니다.
IntelliJ JPS 테스트 모듈을 Bazel로 옮기고 Bazel에서만 발생하는 실패를 조사하는 안내서입니다. 의존성, 플러그인, 테스트 데이터와 runfiles 문제를 확인하고 생성된 대상과 이전된 테스트를 검증합니다.
IntelliJ 프로젝트 규칙에 맞춰 Kotlin과 Java 코드를 작성하거나 검토합니다. 언어 선택, 서식, 봉인 타입, 스레드 주석, 제어 흐름 예외 처리를 확인합니다.
이 가이드는 IntelliJ 프로젝트의 변경 사항을 목적별로 나누고 프로젝트 형식에 맞는 커밋 메시지를 작성하도록 돕습니다. 티켓이 있으면 번호와 변경 설명을, 없으면 레이블과 하위 시스템명을 사용하며 필요에 따라 이유와 판단을 본문에 담습니다.
여러 Python 타입 검사기로 코드 조각이나 파일의 타입 추론과 오류 판정을 비교합니다. 도구별 결과, 실행 시간, 진단 내용을 Markdown 보고서로 모아 저장할 수 있습니다.
Compose Desktop 화면을 구성할 때 컴포저블은 렌더링을 맡고 프레젠터나 코디네이터는 앱 결정을 맡도록 구조를 정리합니다. 상태 소유권, Effect, 재사용 컴포넌트 API, 지연 목록 키, 애니메이션과 성능을 개별 UI 변경에 맞춰 살펴봅니다.