Claus Ibsen created CAMEL-27521:
-----------------------------------

             Summary: camel-jbang - the Citrus test check catches mistakes that 
fail only when the test runs
                 Key: CAMEL-27521
                 URL: https://issues.apache.org/jira/browse/CAMEL-27521
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang
            Reporter: Claus Ibsen
             Fix For: 4.25.0


Each of these was schema-valid and then failed at run time in the benchmark 
below:
# {{==}} in a repeat/until condition. ftp test: "Unknown operator '=='". Say 
which operator Citrus takes.
# Invented container variables. postgres test: "Unknown variable 
'CITRUS_TESTCONTAINERS_POSTGRESQL_HOST'". Compare each 
{{$\{CITRUS_TESTCONTAINERS_*\}}} with the variables that container provides, 
from the infra services of the Citrus catalog ({{citrus-catalog-schema}}).
# An unknown endpoint type. solr test: "Unable to create endpoint component 
with name 'httpClient'". Compare with the endpoints of the Citrus catalog.
# A test variable whose value is set only later. header and http tests: 
"Unknown segment-value for segment 'http' of variable expression 
'http.server.port'". Explain that test variables are resolved when the test 
starts.
# A test that receives on an HTTP server the route never calls. insert-field 
and jslt tests: a 60 s timeout on {{httpServer.inbound}}. Give a hint that 
names the URL the route sends to.
# A test that never starts the integration and checks nothing: an echo-only 
test passes. Warn about it.

*Background: the benchmark*
Qwen 3.6 (local, think=false) wrote Citrus YAML tests for 20 Kamelet itests and 
got feedback from {{camel_validate_source}}. Each condition ran once per task 
(k=1):
* A: one try: 0/20 pass
* B: up to 6 tries with the validator's errors: 6 valid, 0 pass
* C: B plus a YAML skeleton of the keys each error names: 16 valid, 4 pass
* D: C plus one complete example test: 19 valid, 7 pass

C beat B on 13 tasks, B beat C on 2. The validator is {{CitrusTestChecks}} in 
{{dsl/camel-jbang/camel-jbang-core}} ({{commands/ai}}). On main (8d7bf426d764) 
it already covers an http request and response in one client action, several 
actions in one list item, and log written for echo.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to