Robot Framework
Run Robot Framework test suites, passing the message body, headers and variables to the test cases as Robot Framework variables.
What’s inside
-
Robot Framework component, URI syntax:
robotframework:resourceUri
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-robotframework-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 52 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.robotframework.allow-context-map-all | Whether to also pass the exchange properties to the test, as properties.name variables. By default only the message body, headers and exchange variables are passed. | false | Boolean |
camel.component.robotframework.allow-template-from-header | Whether the CamelRobotResourceUri header can set the test suite file or directory to run instead of the resourceUri of the endpoint. Enabling this lets a message choose which tests run, which is a security risk if the header comes from an untrusted sender, so use this with care. | false | Boolean |
camel.component.robotframework.argument-files | The path of a text file to read more robot command line arguments from, one per line (the robot --argumentfile option). | String | |
camel.component.robotframework.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.robotframework.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.robotframework.combined-tag-stats | Creates combined statistics based on tags, in the format tags:name, which are added to the Statistics by Tag table (the robot --tagstatcombine option). The tags can be combined with AND, OR and NOT, such as tag1ANDtag2:My_name. Separate several entries with comma. | String | |
camel.component.robotframework.configuration | The shared configuration of the endpoints. Each endpoint gets a copy of it, which its own options then change. The option is a org.apache.camel.component.robotframework.RobotFrameworkCamelConfiguration type. | RobotFrameworkCamelConfiguration | |
camel.component.robotframework.critical-tags | Deprecated since Robot Framework 4.0 (the robot --critical option): a test case that has none of these tags is marked as skipped instead of failed when it fails. Separate several tags with comma. | String | |
camel.component.robotframework.debug-file | The path of a debug file that Robot Framework writes during the execution (the robot --debugfile option), relative to outputDirectory unless absolute. Not written unless set. | String | |
camel.component.robotframework.document | The documentation of the top-level test suite (the robot --doc option). If the value is the path of an existing file, Robot Framework reads the documentation from that file. | String | |
camel.component.robotframework.dryrun | Whether to run in dry run mode (the robot --dryrun option): Robot Framework verifies the test data and runs the test cases without executing the keywords of test libraries. Useful to validate the syntax of the test data. | false | Boolean |
camel.component.robotframework.enabled | Whether to enable auto configuration of the robotframework component. This is enabled by default. | Boolean | |
camel.component.robotframework.excludes | Selects the test cases not to run by tag (the robot --exclude option). These test cases are not run even if they match includes. Separate several tags with comma. | String | |
camel.component.robotframework.exit-on-failure | Whether to stop the test execution as soon as a test case fails (the robot --exitonfailure option). The remaining test cases are marked as failed without running. | false | Boolean |
camel.component.robotframework.includes | Selects the test cases to run by tag (the robot --include option). A tag can be a pattern, and tags can be combined with AND, OR and NOT, such as fooANDbar. Separate several tags with comma. | String | |
camel.component.robotframework.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.robotframework.listener | A single listener that gets notified of the test execution (the robot --listener option), as a class name or the path of a listener file, with arguments after the name separated with colon. Use listeners for several. | String | |
camel.component.robotframework.listeners | Listeners that get notified of the test execution, such as when test cases start and end (the robot --listener option). A listener is a class name or the path of a listener file, and arguments can be given after the name separated with colon, such as MyListener:arg1:arg2. Separate several listeners with comma. | String | |
camel.component.robotframework.log | The path of the HTML log file (the robot --log option), relative to outputDirectory unless absolute. Robot Framework uses log.html by default; NONE disables it. | String | |
camel.component.robotframework.log-level | The threshold level for logging (the robot --loglevel option): TRACE, DEBUG, INFO (the default of Robot Framework), WARN or NONE. Use LEVEL:DEFAULT, such as DEBUG:INFO, to also set the log level that the log file shows by default. | String | |
camel.component.robotframework.log-title | The title of the HTML log file (the robot --logtitle option). By default the suite name followed by Test Log. | String | |
camel.component.robotframework.metadata | Metadata of the top-level test suite, in the format name:value (the robot --metadata option). Separate several entries with comma. | String | |
camel.component.robotframework.monitor-colors | ANSI color use in the console output (the robot --consolecolors option): auto (the default, colors on Unix and when output is redirected to a terminal, but not on Windows), on (always on Unix), ansi (like on but with ANSI codes on Windows too), or off (never). | String | |
camel.component.robotframework.name | The name of the top-level test suite (the robot --name option). By default Robot Framework derives it from the name of the test suite file or directory. | String | |
camel.component.robotframework.no-status-return-code | Whether the return code in the CamelRobotReturnCode header is 0 even if test cases fail (the robot --nostatusrc option). Error codes, such as for invalid test data, are returned as usual. | false | Boolean |
camel.component.robotframework.non-critical-tags | Deprecated since Robot Framework 4.0 (the robot --noncritical option, an alias of --skiponfailure): a test case that has one of these tags is marked as skipped instead of failed when it fails. Separate several tags with comma. | String | |
camel.component.robotframework.output | The path of the XML output file (the robot --output option), relative to outputDirectory unless absolute. Robot Framework uses output.xml by default; NONE disables it, which also disables the log file. | String | |
camel.component.robotframework.output-directory | The directory where Robot Framework writes the output files (the robot --outputdir option). The relative paths of output, log, report, xunitFile and debugFile are resolved against it. By default the current working directory. | String | |
camel.component.robotframework.randomize | Randomizes the execution order (the robot --randomize option): all (suites and test cases), suites, tests or none. Add :seed to use a given integer random seed, such as tests:1234. | String | |
camel.component.robotframework.report | The path of the HTML report file (the robot --report option), relative to outputDirectory unless absolute. Robot Framework uses report.html by default; NONE disables it. | String | |
camel.component.robotframework.report-background | The background colors of the HTML report file, in the order passed:failed:skipped, where skipped can be omitted (the robot --reportbackground option). Color names and codes both work, such as green:red:yellow. | String | |
camel.component.robotframework.report-title | The title of the HTML report file (the robot --reporttitle option). By default the suite name followed by Test Report. | String | |
camel.component.robotframework.run-empty-suite | Whether to run the test suite even if it has no test cases, for example when includes or excludes match none (the robot --runemptysuite option). Otherwise an empty test suite is an error. | false | Boolean |
camel.component.robotframework.run-failed | The path of the XML output file of an earlier run, to run again only the test cases that failed in it (the robot --rerunfailed option). | String | |
camel.component.robotframework.skip-teardown-on-exit | Whether to skip the teardowns when the test execution is stopped prematurely, such as with exitOnFailure (the robot --skipteardownonexit option). | false | Boolean |
camel.component.robotframework.suite-stat-level | How many suite levels to show in the Statistics by Suite table of the log and report files (the robot --suitestatlevel option). By default all levels are shown. | String | |
camel.component.robotframework.suites | Selects the test suites to run by name (the robot --suite option). The name can be a pattern and contain the parent suite name, such as Parent.Suite. Separate several names with comma. | String | |
camel.component.robotframework.tag-docs | Adds documentation to the tags matching a pattern, in the format pattern:doc (the robot --tagdoc option). Separate several entries with comma. | String | |
camel.component.robotframework.tag-stat-excludes | Excludes the matching tags from the Statistics by Tag table of the log and report files (the robot --tagstatexclude option). A tag can be a pattern. Separate several tags with comma. | String | |
camel.component.robotframework.tag-stat-includes | Includes only the matching tags in the Statistics by Tag table of the log and report files (the robot --tagstatinclude option). A tag can be a pattern. Separate several tags with comma. | String | |
camel.component.robotframework.tag-stat-links | Adds external links to the Statistics by Tag table, in the format pattern:link:title (the robot --tagstatlink option). Separate several entries with comma. | String | |
camel.component.robotframework.tags | Tags that are set to all executed test cases (the robot --settag option). Separate several tags with comma. | String | |
camel.component.robotframework.tests | Selects the test cases to run by name or long name, such as Parent.Test (the robot --test option). The name is case and space insensitive, and can be a pattern with * and ? wildcards. Separate several names with comma. | String | |
camel.component.robotframework.timestamp-outputs | Whether to add a timestamp in the format YYYYMMDD-hhmmss to the names of all output files, between the base name and the extension (the robot --timestampoutputs option). | false | Boolean |
camel.component.robotframework.variable-files | Variable files to read variables from (the robot --variablefile option). Arguments to a variable file can be given after its path, separated with colon, such as vars.py:arg1. Separate several files with comma. | String | |
camel.component.robotframework.variables | Variables in the format name:value to pass to Robot Framework (the robot --variable option). Separate several variables with comma. When a variable is also set by the exchange message (body, headers or exchange variables), the message value takes precedence over the endpoint variable on the same name. | String | |
camel.component.robotframework.xunit-file | The path of the xUnit compatible XML result file (the robot --xunit option), relative to outputDirectory unless absolute. If not set, the component uses TEST-{resourceUri}.xml (the path of the test suite with its blanks replaced by underscores), so the file is always written. | String | |
camel.component.robotframework.monitor-width | Deprecated: the robot --monitorwidth option was removed in Robot Framework 3.0. This option is ignored. | String | |
camel.component.robotframework.run-mode | Deprecated: the robot --runmode option was removed in Robot Framework 2.8. Use dryrun, exitOnFailure, skipTeardownOnExit and randomize instead. This option is ignored. | String | |
camel.component.robotframework.split-outputs | Deprecated: the robot --splitoutputs option was removed in Robot Framework 3.0. This option is ignored. | String | |
camel.component.robotframework.summary-title | Deprecated: the robot --summarytitle option was removed in Robot Framework 3.0. This option is ignored. | String | |
camel.component.robotframework.warn-on-skipped-files | Deprecated: the robot --warnonskippedfiles option was removed in Robot Framework 3.0. This option is ignored. | false | Boolean |