Skip to content

Commit ad6704a

Browse files
committed
More Junie guidelines
Junie keeps trying to run tests, fails, and then declares that all tests ran successfully. Let's see if this works better.
1 parent 1b47c53 commit ad6704a

File tree

1 file changed

+32
-6
lines changed

1 file changed

+32
-6
lines changed

.junie/guidelines.md

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,28 @@ Troubleshooting
3030
- SSL errors: trust self‑signed cert or switch to HTTP.
3131
- Docker errors: ensure Docker is running and you have permissions.
3232

33+
## Junie Operations Playbook (Critical)
34+
To ensure tests execute successfully in this environment, follow these strict rules:
35+
36+
- Default test scope: server module only. Do NOT run full project builds by default.
37+
- Use the test tool, not shell, to run tests:
38+
- Preferred: run_test on specific test files, e.g., "server/src/test/kotlin/com/adobe/testing/s3mock/store/ObjectStoreTest.kt".
39+
- One test by name: use run_test with full path and the test method name parameter.
40+
- Note: Directory-wide runs via run_test may not be supported in this environment. If you need to run all server tests, use Maven with: ./mvnw -pl server -DskipDocker test.
41+
- Avoid integration tests unless explicitly requested and Docker availability is confirmed. If requested, run via Maven lifecycle only.
42+
- If a build is required, prefer fast builds:
43+
- Use ./mvnw -pl server -am -DskipDocker clean test or rely on run_test which compiles as needed.
44+
- Only run ./mvnw clean install (full) when the user explicitly asks for a full build or cross-module changes demand it.
45+
- Never run mvnw verify without confirming Docker is available; if not available, add -DskipDocker.
46+
- Java 17+ required; if build fails due to JDK, report and stop, do not retry with different commands.
47+
- Decision tree:
48+
1) Need to validate changes in server module? -> run_test on one or more specific test files (fast path). If you truly need all server tests, use: ./mvnw -pl server -DskipDocker test.
49+
2) Need a specific server test? -> run_test on that file.
50+
3) Need ITs and Docker is confirmed? -> mvnw -pl integration-tests -am verify; otherwise skip.
51+
4) Need a build artifact quickly? -> mvnw clean install -DskipDocker.
52+
53+
Note: Always summarize which scope you ran and why.
54+
3355
3456

3557
## Build and Configuration Instructions
@@ -352,9 +374,13 @@ docker run -p 9090:9090 -p 9191:9191 -e debug=true -t adobe/s3mock
352374
### Recommended Development Workflow
353375

354376
1. Make changes to the code
355-
2. Run unit tests frequently to verify basic functionality
356-
- Unit tests should be run very frequently during development
357-
- No task can be declared as done without running a full Maven build successfully
358-
3. Run integration tests to verify end-to-end functionality
359-
4. Build the Docker image to verify packaging
360-
5. Test with your application to verify real-world usage
377+
2. Validate changes with server module tests first (fast path)
378+
- Use the run_test tool on "server/src/test" or on a specific test file/method.
379+
- Prefer this over invoking Maven directly; run_test compiles as needed.
380+
3. Only run a full Maven build when explicitly requested or when cross-module changes demand it
381+
- If building in this environment, prefer fast builds: ./mvnw -pl server -am -DskipDocker clean test
382+
- Do not run mvnw verify unless Docker is confirmed; otherwise add -DskipDocker
383+
4. Run integration tests only when Docker availability is confirmed and when explicitly requested
384+
- Execute via Maven lifecycle: ./mvnw -pl integration-tests -am verify (or add -DskipDocker to skip ITs)
385+
5. Optionally build the Docker image to verify packaging when needed
386+
6. Test with your application to verify real-world usage

0 commit comments

Comments
 (0)