Skip to content

Commit 15bcb4b

Browse files
committed
Update new-dmn-check skill to run test suite
1 parent e6a74df commit 15bcb4b

1 file changed

Lines changed: 25 additions & 6 deletions

File tree

.claude/commands/new-dmn-check.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,32 @@ Not:
407407

408408
Use realistic test data: concrete IDs (e.g. `"p1"`), dates (ISO 8601), and parameter values that clearly demonstrate the pass vs. fail condition.
409409

410-
## Step 5 — Print a Summary and Next-Steps Checklist
410+
## Step 5 — Run Tests
411411

412-
After writing all files, print:
412+
Run the full test suites to verify the new check integrates correctly.
413+
414+
**1. Maven tests** — compile and run the Java test suite:
415+
```bash
416+
cd library-api && mvn test
417+
```
418+
If tests fail, diagnose the error (most likely a malformed DMN or namespace conflict) and fix the DMN file before proceeding.
419+
420+
**2. Bruno tests** — run the full API test suite (requires the library-api dev server running at `http://localhost:8083`):
421+
```bash
422+
cd library-api/test/bdt && bru run
423+
```
424+
If the server is not running, start it first (`cd library-api && quarkus dev`), wait for it to be ready, then run `bru run`.
425+
426+
If any Bruno tests fail:
427+
- Check that the endpoint URL in the `.bru` files matches the actual generated route (verify in Swagger UI at `http://localhost:8083/q/swagger-ui`)
428+
- Verify the FEEL logic produces the expected `true`/`false`/`null` outputs for each test case
429+
- Fix the DMN or `.bru` files and re-run until all tests pass
430+
431+
Only proceed to Step 6 once **both** `mvn test` and `bru run` pass cleanly.
432+
433+
## Step 6 — Print a Summary and Next-Steps Checklist
434+
435+
After all tests pass, print:
413436

414437
```
415438
## Files Created
@@ -421,12 +444,8 @@ After writing all files, print:
421444
422445
## Next Steps
423446
424-
- [ ] Start (or restart) the dev server: `cd library-api && quarkus dev`
425-
(or `devbox services up` if using the full stack)
426447
- [ ] Verify the endpoint appears in Swagger UI:
427448
http://localhost:8083/q/swagger-ui (look for POST /checks/{category}/{check-name})
428-
- [ ] Run Bruno tests: `cd library-api/test/bdt && bru run checks/{category}/{CheckName}`
429-
(Pass → checkResult: true, Fail → checkResult: false, Null → checkResult: null)
430449
- [ ] If you created a new category, create the base module DMN first:
431450
library-api/src/main/resources/checks/{category}/{Category}.dmn
432451
```

0 commit comments

Comments
 (0)