General karate framework @ Nextens - NextensArelB/SwaggerGenerationTool GitHub Wiki

Introduction This page explains on Karate framework for both UI and API with examples from the framework that is being used in Nextens.

Main file structure: image.png

API and UI folder share almost the same structure: image.png

Notice the split between Features and Tests. The features should be setup dynamically and reusable to allow a great amount of testcases to put into Tests. Tests folder only executes created features. It is a collection of flows and their configurations. Test cases are giving arguments to the features in the Features folder. If an argument is not given, the feature will resolve to its default data provided by the InputData folder: image.png Notice the optional Paths folder. We can use such a folder to easily manage paths needed for a feature. For the UI version it is called Locators and is for UI mandatory.

Full structure for API and UI folders: image.pngimage.png

As an example; a structure for UI tests where we have tests on 'archiving clients' and using the 'search filter': image.png

Locators holds key value combinations where the value is your locator used to identify your html element: image.png

Configuration holds retry configurations and environment specific values like environment urls: image.png

Shared contains default login script and places for json and custom javascript code: image.png

Constants.json contains default strings to be used for either assertions or configurations: image.png

Last we have the rootfolder including karate configs, the jar and powershell scripts for the pipelines: image.png

Full example structure image.png

⚠️ **GitHub.com Fallback** ⚠️