This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-jbang-examples.git
The following commit(s) were added to refs/heads/main by this push:
new d3e033a CAMEL-24808: one tool to learn: the Camel CLI runs the Citrus
tests, in CI and in every README (#77)
d3e033a is described below
commit d3e033a5a15d722d0387d355d9d70644ad28f66d
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Sep 18 16:04:16 2026 +0200
CAMEL-24808: one tool to learn: the Camel CLI runs the Citrus tests, in CI
and in every README (#77)
The Camel CLI's test plugin runs the Citrus YAML tests (camel test run, at
the Citrus version
camel-parent pins), so the examples no longer ask for a second CLI. The CI
workflow installs
the plugin and runs camel test run <example>/test; every README and the
contributor guide say
camel test run; install-citrus.adoc is removed.
---
.github/workflows/build.yml | 5 ++---
AGENTS.md | 7 +++----
README.md | 20 ++++----------------
ai/smart-log-analyzer/README.md | 10 ++--------
cloud/aws-sqs/README.md | 7 +++----
install-citrus.adoc | 20 --------------------
messaging/ftp/README.md | 5 ++---
messaging/mqtt/README.md | 7 +++----
rest/openapi-client/README.md | 5 ++---
rest/openapi-server/README.md | 7 +++----
transformation/edi-x12-as2/README.md | 6 +++---
11 files changed, 27 insertions(+), 72 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 161fbcb..0ba88b5 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -75,11 +75,10 @@ jobs:
source "/home/runner/.sdkman/bin/sdkman-init.sh"
jbang --version
- jbang trust add https://github.com/citrusframework/citrus/
jbang trust add https://github.com/apache/camel/
- jbang citrus@citrusframework/citrus --version
jbang camel@apache/camel --version
+ jbang camel@apache/camel plugin add test
- name: Run tests
env:
CITRUS_CAMEL_JBANG_DUMP_INTEGRATION_OUTPUT: "true"
@@ -87,7 +86,7 @@ jobs:
CITRUS_TESTCONTAINERS_REGISTRY_MIRROR: "mirror.gcr.io"
run: |
source "/home/runner/.sdkman/bin/sdkman-init.sh"
- jbang citrus@citrusframework/citrus run ${{ matrix.path }}/test
+ jbang camel@apache/camel test run ${{ matrix.path }}/test
- uses: actions/upload-artifact@v4
if: always()
with:
diff --git a/AGENTS.md b/AGENTS.md
index 4536df2..d69b742 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -61,7 +61,6 @@ essentials and adds what is specific to this examples
repository.
```shell
# install tooling once
jbang app install camel@apache/camel
-jbang app install citrus@citrusframework/citrus
# start infra if the example needs it
camel infra run <service> # or: docker compose up --detach
@@ -72,11 +71,11 @@ camel run * # loads every YAML in the
directory
camel run <name>.camel.yaml application.properties
# run its test
-citrus run test/<name>.citrus.it.yaml
+camel test run test/<name>.citrus.it.yaml
```
-The CI workflow (`.github/workflows/build.yml`) installs the Camel CLI and
Citrus
-and runs `jbang citrus@citrusframework/citrus run <example>/test` for each
tested
+The CI workflow (`.github/workflows/build.yml`) installs the Camel CLI and its
test
+plugin and runs `camel test run <example>/test` for each tested
example. If your example ships a `test/`, add it to that workflow.
## Conventions
diff --git a/README.md b/README.md
index 178b18f..0d79e77 100644
--- a/README.md
+++ b/README.md
@@ -43,30 +43,18 @@ camel --version
## Integration testing
-The examples provide automated integration tests that you can run with the
[Citrus](https://citrusframework.org/) test framework.
-
-You need to install Citrus as a JBang app, too:
-
-```shell
-jbang app install citrus@citrusframework/citrus
-```
-
-Now you can start running commands for the Citrus JBang app with `citrus`:
-
-```shell
-citrus --version
-```
+The examples provide automated integration tests in the
[Citrus](https://citrusframework.org/) YAML DSL, which the Camel CLI runs (the
test plugin installs on first use).
Usually the Citrus tests are written in YAML files and named accordingly to
the Camel CLI route source file.
For instance the Camel route `mqtt.camel.yaml` route provides a test named
`mqtt.citrus.it.yaml`.
-You can run the test with Citrus JBang like this:
+You can run the test with the Camel CLI like this:
```shell
-citrus run test/mqtt.citrus.it.yaml
+camel test run test/mqtt.citrus.it.yaml
```
-Usually the test prepares the complete infrastructure (e.g. via Docker
compose) and starts the Camel route automatically via JBang.
+Usually the test prepares the complete infrastructure (e.g. via Docker
compose) and starts the Camel route automatically.
Of course the test also performs some validation steps to make sure that the
Camel route works as expected.
## Other Examples
diff --git a/ai/smart-log-analyzer/README.md b/ai/smart-log-analyzer/README.md
index 4a9c053..f3641fa 100644
--- a/ai/smart-log-analyzer/README.md
+++ b/ai/smart-log-analyzer/README.md
@@ -61,16 +61,10 @@ camel run analyzer.camel.yaml
--dep=org.apache.camel:camel-openai
The first-iteration includes a Citrus integration test that uses
`--stub=openai` to mock the LLM endpoint.
-First, install Citrus as a JBang app (one-time setup):
+Run the test with the Camel CLI (the test plugin installs on first use):
```bash
-jbang app install citrus@citrusframework/citrus
-```
-
-Then run the test:
-
-```bash
-citrus run first-iteration/test/first-iteration.citrus.it.yaml
+camel test run first-iteration/test/first-iteration.citrus.it.yaml
```
The test starts Kafka via testcontainers, sends log events, and verifies the
aggregation triggers correctly.
diff --git a/cloud/aws-sqs/README.md b/cloud/aws-sqs/README.md
index 5a86c32..f7051ee 100644
--- a/cloud/aws-sqs/README.md
+++ b/cloud/aws-sqs/README.md
@@ -79,16 +79,15 @@ You will see the message content being processed and the
AWS SQS queue should re
## Integration testing
-The example provides an automated integration test
(`http-to-aws-sqs.citrus.it.yaml`) that you can run with the
[Citrus](https://citrusframework.org/) test framework.
-Please make sure to install Citrus as a JBang application (see [Citrus
installation guide](../../install-citrus.adoc)).
+The example provides an automated integration test
(`http-to-aws-sqs.citrus.it.yaml`) in the
[Citrus](https://citrusframework.org/) YAML DSL, which the Camel CLI runs (the
test plugin installs on first use).
You can run the test with:
```shell
-citrus run test/http-to-aws-sqs.citrus.it.yaml
+camel test run test/http-to-aws-sqs.citrus.it.yaml
```
-The test prepares the complete infrastructure and starts the Camel route
automatically via JBang.
+The test prepares the complete infrastructure and starts the Camel route
automatically.
The Citrus test starts a Localstack Testcontainers instance to simulate the
AWS SQS services.
Once the AWS services are configured the test loads the Camel route and
creates a proper Http POST request.
As a result you will see the SQS data being consumed by the test to verify the
event processing.
diff --git a/install-citrus.adoc b/install-citrus.adoc
deleted file mode 100644
index bb50c0b..0000000
--- a/install-citrus.adoc
+++ /dev/null
@@ -1,20 +0,0 @@
-First install JBang according to the https://www.jbang.dev/download/[JBang
installation guide]
-
-For a more convenient way to use the Citrus JBang scripts you can install
Citrus as a JBang app.
-
-.Install Citrus app
-[source,shell]
-----
-jbang trust add https://github.com/citrusframework/citrus/
-jbang app install citrus@citrusframework/citrus
-----
-
-Now you can run Citrus with the command `citrus` to execute some tests:
-
-.Run my.camel.it.yaml
-[source,shell]
-----
-citrus run my.citrus.it.yaml
-----
-
-For more information about using Citrus JBang please refer to the
https://citrusframework.org/citrus/reference/html/index.html#runtime-jbang-install[Citrus
installation guide].
diff --git a/messaging/ftp/README.md b/messaging/ftp/README.md
index cad77bc..3289235 100644
--- a/messaging/ftp/README.md
+++ b/messaging/ftp/README.md
@@ -81,13 +81,12 @@ Then you can browse: http://localhost:8080/q/dev to
introspect the running Camel
## Integration testing
-The example provides an automated integration test (`ftp.citrus.it.yaml`) that
you can run with the [Citrus](https://citrusframework.org/) test framework.
-Please make sure to install Citrus as a JBang application (see [Citrus
installation guide](../../install-citrus.adoc)).
+The example provides an automated integration test (`ftp.citrus.it.yaml`) in
the [Citrus](https://citrusframework.org/) YAML DSL, which the Camel CLI runs
(the test plugin installs on first use).
You may run the test with:
```shell
-citrus run test/ftp.citrus.it.yaml
+camel test run test/ftp.citrus.it.yaml
```
## More Information
diff --git a/messaging/mqtt/README.md b/messaging/mqtt/README.md
index 6610692..3075ec7 100644
--- a/messaging/mqtt/README.md
+++ b/messaging/mqtt/README.md
@@ -84,16 +84,15 @@ camel stop mqtt
## Integration testing
-The example provides an automated integration test (`mqtt.citrus.it.yaml`)
that you can run with the [Citrus](https://citrusframework.org/) test framework.
-Please make sure to install Citrus as a JBang application (see [Citrus
installation guide](../../install-citrus.adoc)).
+The example provides an automated integration test (`mqtt.citrus.it.yaml`) in
the [Citrus](https://citrusframework.org/) YAML DSL, which the Camel CLI runs
(the test plugin installs on first use).
You can run the test with:
```shell
-citrus run test/mqtt.citrus.it.yaml
+camel test run test/mqtt.citrus.it.yaml
```
-The test prepares the complete infrastructure (e.g. via Docker compose) and
starts the Camel route automatically via JBang.
+The test prepares the complete infrastructure (e.g. via Docker compose) and
starts the Camel route automatically.
The test sends some test data to the MQTT broker and verifies that the Camel
route successfully processes the messages.
## Help and contributions
diff --git a/rest/openapi-client/README.md b/rest/openapi-client/README.md
index c8dda2f..8cc804e 100644
--- a/rest/openapi-client/README.md
+++ b/rest/openapi-client/README.md
@@ -35,8 +35,7 @@ Now you should see the client invoking the REST service using
the OpenAPI specif
## Integration testing
-The example provides an automated integration test
(`petstore-client.citrus.it.yaml`) that you can run with the
[Citrus](https://citrusframework.org/) test framework.
-Please make sure to install Citrus as a JBang application (see [Citrus
installation guide](../../install-citrus.adoc)).
+The example provides an automated integration test
(`petstore-client.citrus.it.yaml`) in the
[Citrus](https://citrusframework.org/) YAML DSL, which the Camel CLI runs (the
test plugin installs on first use).
You can run the test with:
@@ -44,7 +43,7 @@ You can run the test with:
citrus test/run petstore-client.citrus.it.yaml
```
-The test prepares the complete infrastructure and starts the Camel route
automatically via JBang.
+The test prepares the complete infrastructure and starts the Camel route
automatically.
## Help and contributions
diff --git a/rest/openapi-server/README.md b/rest/openapi-server/README.md
index 9a21514..dda56f9 100644
--- a/rest/openapi-server/README.md
+++ b/rest/openapi-server/README.md
@@ -58,16 +58,15 @@ The REST service in Camel is configured to load example
response data from a dir
## Integration testing
-The example provides an automated integration test (`petstore.citrus.it.yaml`)
that you can run with the [Citrus](https://citrusframework.org/) test framework.
-Please make sure to install Citrus as a JBang application (see [Citrus
installation guide](../../install-citrus.adoc)).
+The example provides an automated integration test (`petstore.citrus.it.yaml`)
in the [Citrus](https://citrusframework.org/) YAML DSL, which the Camel CLI
runs (the test plugin installs on first use).
You can run the test with:
```shell
-citrus run test/petstore.citrus.it.yaml
+camel test run test/petstore.citrus.it.yaml
```
-The test prepares the complete infrastructure and starts the Camel route
automatically via JBang.
+The test prepares the complete infrastructure and starts the Camel route
automatically.
The Citrus test loads the Open API specification from the Camel service and
uses the rules in that specification to verify the response data.
## Help and contributions
diff --git a/transformation/edi-x12-as2/README.md
b/transformation/edi-x12-as2/README.md
index 00d34ec..29fcc51 100644
--- a/transformation/edi-x12-as2/README.md
+++ b/transformation/edi-x12-as2/README.md
@@ -40,15 +40,15 @@ The Camel application (i.e.,
`camel/edi-x12-as2.camel.yaml`) represents the supp
## Integration testing
-The example provides an automated integration test
(`edi-x12-as2.citrus.it.yaml`) that you can run with the
[Citrus](https://citrusframework.org/) test framework. Please make sure to have
installed Citrus as a JBang application.
+The example provides an automated integration test
(`edi-x12-as2.citrus.it.yaml`) in the [Citrus](https://citrusframework.org/)
YAML DSL, which the Camel CLI runs (the test plugin installs on first use).
Please make sure to have installed Citrus as a JBang application.
You can run the test with:
```shell
-citrus run test/edi-x12-as2.citrus.it.yaml
+camel test run test/edi-x12-as2.citrus.it.yaml
```
-The test prepares the complete infrastructure and starts the Camel route
automatically via JBang. The test sends some test data to the AS2 endpoint and
verifies that the Camel route successfully processed the purchase order.
+The test prepares the complete infrastructure and starts the Camel route
automatically. The test sends some test data to the AS2 endpoint and verifies
that the Camel route successfully processed the purchase order.
## Help and contributions