InditexTech Karate Tools

Quickstart

Scaffold and run your first Karate module in minutes.

In this quickstart, you scaffold a new Karate module from the archetype and run its first test. Before you begin, make sure you meet the prerequisites.

Step by step

To set up a Karate project for testing a REST artifact, follow these steps:

  1. Ensure the prerequisites are met.

  2. Run the archetype to set up the initial Karate project.

  3. Follow the configuration steps.

  4. Generate tests, data sets and mocks from Open API definitions with the Open API generator.

  5. Integrate Karate clients in the tests for test data preparation and test validation.

  6. Follow the execution instructions: running, reporting, starting a local application and other utilities (KarateCache, …​).

Examples in this repository

The Karate Tools repository includes working examples for each of the areas above, under e2e/karate/src/test/resources:

e2e/karate/src/test/resources
└── com
    └── inditextech
        └── karate
            ├── auth
            ├── base
            ├── clients
            │   ├── db
            │   │   ├── JDBCClient-MariaDB.feature
            │   │   ├── JDBCClient-PostgreSQL.feature
            │   ├── jms
            │   │   └── JMSClient-ActiveMQ.feature
            │   ├── kafka
            │   │   └── KafkaClients.feature
            │   └── mongodb
            │       └── MongoDBClient.feature
            └── karatetools-openapi-test
                └── xxx-api-rest-stable
                    ├── functional
                    │   └── e2e
                    │       ├── e2e.feature
                    │       └── test-data
                    └── smoke
                        └── BasicApi
                            ├── createItems
                            │   ├── createItems.feature
                            │   └── test-data
                            ├── listItems
                            │   ├── listItems.feature
                            │   └── test-data
                            └── showItemById
                                ├── showItemById.feature
                                └── test-data

Next steps

  • Guides — Open API generation, clients and execution in depth.

  • Reference — configuration properties, exact and complete.