Claus Ibsen created CAMEL-26564:
-----------------------------------

             Summary: camel-jbang - AI tools: check a Citrus test against the 
test schema of the Citrus catalog
                 Key: CAMEL-26564
                 URL: https://issues.apache.org/jira/browse/CAMEL-26564
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang, camel-jbang-mcp
            Reporter: Claus Ibsen
             Fix For: 4.24.0


The AI tools (camel_write_file, camel_edit_file, camel_validate_source) check a 
Citrus test (test/<name>.citrus.it.yaml) for its YAML syntax only 
(CAMEL-26493). In the local-model benchmark (example test-citrus-orders), a 
model wrote Citrus YAML of its own in 14 of 14 runs: an http action with uri, 
method and expectStatus, and log and assert-log actions that Citrus does not 
have. camel_write_file wrote it, and camel test run then failed with "Unable to 
find property 'http' on class: org.citrusframework.yaml.TestActions".

Check a Citrus test against the JSON schema of a test from the Citrus catalog 
(org.citrusframework:citrus-catalog-schema), for the Citrus version of the CLI, 
and refuse an invalid test as an invalid route is refused:
* Each problem names its line: the keys an action does not take, with the keys 
it takes; an action that Citrus does not have, with "did you mean" or what to 
write for a log check; a body written as text instead of body: {data: ...}.
* Each item of an action list must be one Citrus test action, also inside 
containers. The schema does not check this 
(https://github.com/citrusframework/citrus/issues/1918).
* The schema comes from the classpath (the test plugin and the MCP server have 
the catalog jar), else from the local Maven repository, or it is downloaded 
once. Without it, the test is checked for its YAML syntax only, and the answer 
says so.

Related: CAMEL-26563 (MCP lookups from the Citrus catalog).



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

Reply via email to