davsclaus opened a new pull request, #29395: URL: https://github.com/apache/camel/pull/29395
## Description [CAMEL-26725](https://issues.apache.org/jira/browse/CAMEL-26725): W-4 of the stage 2 decisions on CAMEL-26607, make a test of a chaos run. **Stacked on #29393** (base `CAMEL-26723-chaos-from-error`, which is on #29392); retarget to main once those are merged. The JUnit test it asks for uses `ChaosAssertions` of #29394 (CAMEL-26724), by name only (no code dependency). `t` on a rule of the chaos screen of the Camel TUI asks the AI panel to make a test of it, so the finding runs again with the same faults. The question (`ChaosAiPrompt.ofTest`) has the rule, the seed, the state of the rule (fired, effect, expectation, recent faults, the counts of its routes), and what to write: - a Maven project (`pom.xml` in the folder of the integration): a JUnit test in `src/test/java` with chaos switched on (`camel.chaos.enabled`, `camel.chaos.seed`, `camel.chaos.rules`, camel-chaos as a test dependency), messages sent to the route (AdviceWith for a consumer that needs a broker), and `ChaosAssertions.assertFired` / `assertExpectationMet` / `assertVerdict`; - a folder that runs with `camel run`: the scenario `chaos/<id>-test.chaos` with the seed and the rule, and the `camel run * --chaos=chaos/<id>-test.chaos --max-seconds=<seconds> --chaos-report=...` command, whose exit code is the verdict (#29392). When the rule has no expectation the AI adds one. It writes the file with `camel_write_file`, which asks first, and changes no route. The question is put in the input of the panel (as explain with AI), to send with Enter or change first. Docs: the chaos screen help, the TUI page and the camel-chaos page. ## Tests - `ChaosAiPromptTest`: the question for a Maven project and for a `camel run` folder, with and without an expectation; `t` asks the AI and the footer has the key. - TUI chaos, errors, help and size tests: 168 green. - Not tried with a model yet. _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012nJsFsjqqFiwroeHRWaKbS -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
