davsclaus opened a new pull request, #28884: URL: https://github.com/apache/camel/pull/28884
https://issues.apache.org/jira/browse/CAMEL-26495 A Citrus test of a Camel project, such as `test/orders.citrus.it.yaml`, runs with `camel test run`. In the local-model benchmark, the model gave the test to the `camel_run` tool of the camel-jbang-mcp server, and Camel started it as an integration with no routes. `camel run test/orders.citrus.it.yaml` did the same. The CLI and the AI tools now point to the `camel test` commands for Citrus. **camel run, camel dev and camel debug** - Only Citrus tests: exit code `2`, before anything else is printed: `ERROR: test/orders.citrus.it.yaml is a Citrus test, not a route: run it with camel test run test/orders.citrus.it.yaml` The same goes for a folder that holds only Citrus tests (`camel run test/`). - Exit code 2 is used because the command line asks for the wrong command, and the fix is another command. It is not 66, because the file exists, and not 1, because nothing ran. - Citrus tests given with routes, such as by `camel run *`, are skipped with one line each, and the routes run as before: `Skipping orders.citrus.it.yaml: a Citrus test, not a route (run it with camel test run orders.citrus.it.yaml)` - A directory or `--source-dir` with a `test` folder runs as before. - A file is a Citrus test by the names Citrus 5 runs: `*.citrus*.yaml`/`.yml`/`.xml`/`.groovy` and `*.feature`. `*Test.java`, `*IT.java` and similar count only when the file contains `citrusframework`, because a route can have such a name too. **The camel_run tool** - With only Citrus tests, it starts nothing, and the answer points to `camel test run <file>`. - With routes, it starts the routes, and the answer lists the tests it skipped and how to run them. **Help and docs** - The `camel run` help, the MCP server instructions and the camel_run files description point to `camel test run`. - The Testing Plugin page used `route-test.yaml`, which `camel test run` in Citrus 5 skips. It now shows `camel test init orders.citrus.it.yaml` and `camel test run test/orders.citrus.it.yaml`. The running and MCP pages say the same. - The 4.24 upgrade guide describes the new exit code. **Tests** - camel-jbang-run `RunFilesTest`: 23 tests pass. - camel-jbang-core: 937 tests pass, with 1 skipped as before. This includes the run tests, the three CLI golden tests and the AI tool tests. - camel-jbang-mcp: 527 tests pass. This applies cleanly next to #28872 (CAMEL-26493), which makes the write tools check a Citrus test as YAML only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016Y4dDi5iQNgtHrDdz2NpwF -- 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]
