You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .junie/guidelines.md
+37-11Lines changed: 37 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,28 @@ Troubleshooting
30
30
- SSL errors: trust self‑signed cert or switch to HTTP.
31
31
- Docker errors: ensure Docker is running and you have permissions.
32
32
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
+
33
55
—
34
56
35
57
## Build and Configuration Instructions
@@ -95,7 +117,7 @@ The main test base class for integration tests is `S3TestBase` which provides ut
95
117
96
118
The server module contains several types of tests:
97
119
98
-
1.**Controller Tests**: Use `@SpringBootTest` with `WebEnvironment.RANDOM_PORT` and `TestRestTemplate` to test HTTP endpoints. These tests mock the service layer using `@MockBean`.
120
+
1.**Controller Tests**: Use `@SpringBootTest` with `WebEnvironment.RANDOM_PORT` and `TestRestTemplate` to test HTTP endpoints. These tests mock the service layer using `@MockitoBean`.
99
121
100
122
2.**Store Tests**: Use `@SpringBootTest` with `WebEnvironment.NONE` to test the data storage layer. These tests often use `@Autowired` to inject the component under test.
101
123
@@ -213,20 +235,20 @@ The server module uses different testing approaches depending on what's being te
213
235
1.**Controller Tests**:
214
236
- Extend `BaseControllerTest` to inherit XML serialization setup
215
237
- Use `@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)`
216
-
- Use `@MockBean` to mock service dependencies
238
+
- Use `@MockitoBean` to mock service dependencies
217
239
- Inject `TestRestTemplate` to make HTTP requests to the controller
0 commit comments