ワンクリックで
java-test-runner
Runs Java tests, mapped to Tests in Xray, using Maven Surefire and Failsafe
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Runs Java tests, mapped to Tests in Xray, using Maven Surefire and Failsafe
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Obtains the IDs of automated tests from JUnit XML reports, similar to the ones used by Xray on generic tests.
Extracts testing data from Xray test management.
Works with Xray entities, such as test run results, test step statuses, coverage statuses
Manages folders in Xray test management, in Test Repository or in Test Plans.
| name | java-test-runner |
| description | Runs Java tests, mapped to Tests in Xray, using Maven Surefire and Failsafe |
| allowed-tools | Bash(mvn:*, mvnw:*, find:*, grep:*, cat:*) |
This skill enables discovery of automated Tests based on a user specified Test Plan issue key or Test Execution issue key, and then running those tests by classname and method name using Maven Surefire and Failsafe plugins.
When a user asks to run Java tests, follow these steps:
obtaining-tests skill to obtain the list of tests with their automation ids, and then filter the tests based on the test automation ids specified by the user, to get the classnames and method names of the tests to be executed.*Test for unit tests and *IT for integration tests), to determine whether to use Maven Surefire or Failsafe plugin for execution.To prepare the test automation ids for Maven Surefire and Failsafe, follow these steps:
com.example.tests.UserServiceUnitTest.existsReturnsTrueIfExisting, where the package is com.example.tests, the classname is UserServiceUnitTest, and the method name is existsReturnsTrueIfExisting. So, for each test automation id, split it by the last dot (.) to separate the classname and method name. In this example, the classname would be UserServiceUnitTest and the method name would be existsReturnsTrueIfExisting.package.classname#methodname for running a specific test method, and classname for running all tests in a class.Prefer to use mvnw (Maven Wrapper) if available in the project (always check before running if mvnw is available), to ensure consistent Maven version across different environments. If mvnw is not available, fallback to using mvn (it has the same syntax).
Run a specific unit/surefire test:
./mvnw test -Dtest=UserServiceUnitTest#existsReturnsTrueIfExisting
Run a specific integration (failsafe) test:
./mvnw integration-test -Dit.test=UserRestControllerIT#createUserWithSuccess
Run several tests at once (example for surefire and failsafe) - preferred approach:
./mvnw test -Dtest=UserManagerUnitTest#existsReturnsTrueIfExisting,UserManagerUnitTest#existsReturnsFalseIfNotExisting
./mvnw integration-test -Dit.test=UserRestControllerIT#createUserWithSuccess,UserRestControllerIT#removeUserWithSuccess
Run with less verbose output:
./mvnw test -Dtest=TestClassName --quiet
This project uses two types of tests:
Unit Tests: Files ending with *Test.java (e.g., UserServiceUnitTest.java)
./mvnw test -Dtest=...target/surefire-reports/Integration Tests: Files ending with *IT.java (e.g., UserRestControllerIT.java)
./mvnw integration-test -Dit.test=...target/failsafe-reports/pom.xml is located)./mvnw if available, fallback to mvn if neededverify phase, as it will run both unit and integration tests; instead, run only the integration-test phase to run only the integration teststarget/surefire-reports/ for unit tests and target/failsafe-reports/ for integration tests, to get detailed information about the test execution, including which tests passed or failed, and any error messages or stack traces for failed tests. Make sure you're not looking at previous test execution results, but the most recent ones, to ensure you're checking the correct test results.## Output format
Example of output format when the user asks for all tests of a given test plan or test execution:
✅ Test results All 5 tests from ST-297 PASSED successfully:
✅ ST-6 - UserRestControllerIT.createUserWithSuccess (0.026s) ✅ ST-7 - UserRestControllerIT.deleteUserUnsuccess (0.031s) ✅ ST-9 - IndexControllerIT.getWelcomeMessage (1.926s) ✅ ST-10 - UserRestControllerIT.listAllUsersWithSuccess (0.033s) ✅ ST-11 - UserRestControllerIT.getUserUnsuccess (0.045s)