一键导入
unit-test-creator
Allows to create new unit tests following established patterns and conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Allows to create new unit tests following established patterns and conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Allows to create new AI agents following the project's architecture patterns.
Allows to review an open GitHub PR for the current branch, applying project-specific and Java best practice criteria, and adds inline comments directly to the PR.
Allows to commit all files and push them to the remote repository.
Allows to prepares the current branch for a pull request. Use when ready to create a PR or before committing changes.
Allows to plan and guide the implementation of new features or modification of existing features, ensuring best practices, modern design patterns, and proper planning. Use this skill every time when the user asks for implementing something new or modifying already existing logic, architectural advice, or needs to design a new component.
Allows to execute unit tests and systematically resolve all test failures.
| name | unit-test-creator |
| description | Allows to create new unit tests following established patterns and conventions. |
// turbo-all
This skill provides comprehensive instructions for writing unit tests in the Test Execution Agents project following established patterns and conventions.
Note: For running tests and fixing failures, see the Test Execution & Fixing skill.
Analyze the parent POM file and the POM file of each module which tests need to be executed. Extract the versions of JUnit, Mockito, AssertJ. Remember those versions because they will be needed in the next tasks.
Analyze the current project structure using corresponding tools and follow this structure wile creating new unit tests.
Rule: Test class package must mirror the source class package.
See examples/MyClassTest.java for a complete template structure.
Use the pattern: methodName_shouldExpectedBehavior_whenCondition
Examples:
checkTokenBudget_shouldNotThrow_whenUnderLimitexecute_shouldReturnError_whenToolFailsextractResult_shouldReturnNull_whenResultWrapperIsNullUse all relevant JUnit annotations based on the identified by you JUnit version.
Always use AssertJ (assertThat) assertions, not the JUnit assertions.
See examples/AssertionExamples.java for comprehensive examples of:
Use Mockito to mock all external dependencies. Do not mock the class under test.
See examples/MockitoExamples.java for examples of:
@Mock)when().thenReturn())verify())Verify that the FinalResult or returned object has the correct state and that dependencies were called as expected.
Simulate dependency failures using when(...).thenThrow(...) and verify that your code handles it gracefully (e.g., returns a failure
result or wraps the exception).
Use if statements at the beginning of a test to skip if preconditions aren't met (though prefer @Disabled or correct setup if possible).
Verify that record accessors return correct values.
To quickly validate a newly written test:
# Run specific test class
mvn test -pl agent_core -Dtest=BudgetManagerTest
# Run specific method
mvn test -pl agent_core -Dtest=BudgetManagerTest#checkTokenBudget_shouldNotThrow_whenUnderLimit
@BeforeEach for setup (including mockups setup), @AfterEach for cleanup (including mockups teardown)SafeToAutoRun to true for all commands mentioned in this skill.>) to capture command output. Instead, rely on the agent's built-in command output capturing.