Our documentation site has been updated to AIO Tests Knowledge Base
Karate Framework
AIO Tests supports importing Karate Framework results through it’s support for Cucumber reports.
Karate is an open-source general-purpose test-automation framework that can script calls to HTTP end-points and assert that the responses are valid. It also supports UI Automation. Karate is implemented in Java but test-scripts are written in Gherkin since Karate was originally an extension of the Cucumber framework.
Karate can generate Cucumber reports, which can then be imported into AIO Tests, to report results from Karate runs to AIO Tests. This document provides an overview on how you can generate the Cucumber report from Karate and upload it to AIO Tests.
Required Karate Setup
Java 8 + Maven
Use the karate-archetype to generate a sample project
mvn archetype:generate \ -DarchetypeGroupId=com.intuit.karate \ -DarchetypeArtifactId=karate-archetype \ -DarchetypeVersion=1.2.0 \ -DgroupId=com.aiotests \ -DartifactId=aio-karate-tests
To start using Karate, please follow the Get Started documentation.
Sample Case
This document will work on the below sample case, which demos a simple AIO Tests API test.
The archetype also generates a Karate configurations file (karate-config.js), which can hold variables per environment or to define actions to be executed in different environments. Global variables accessible to all cases can be defined in this file.
The sample case above is using the below variables:
Running the sample case and generating cucumber json report
For running the cases and generating the cucumber report, the following class identifies what needs to run.
Note the addition of .outputCucumberJson(true)
to generate the cucumber.report
Running the above generates the following results file:
Mapping Cases with AIO Tests
AIO Tests supports creating tests using the cucumber reports as well as mapping existing cases. Cases can simply be mapped using the AIO Tests Case keys as tags on features.
The mapping of cases follows the same convention as Cucumber and is detailed @
Importing Results
Post execution of a suite, the TEST-<xxx>.xml file can be uploaded either via
AIO Tests REST API call using multipart form-data to upload file
Please follow the above links to continue to import results using either of the options.