Book Image

Writing API Tests with Karate

By : Benjamin Bischoff
Book Image

Writing API Tests with Karate

By: Benjamin Bischoff

Overview of this book

Software in recent years is moving away from centralized systems and monoliths to smaller, scalable components that communicate with each other through APIs. Testing these communication interfaces is becoming increasingly important to ensure the security, performance, and extensibility of the software. A powerful tool to achieve safe and robust applications is Karate, an easy-to-use, and powerful software testing framework. In this book, you’ll work with different modules of karate to get tailored solutions for modern test challenges. You’ll be exploring interface testing, UI testing as well as performance testing. By the end of this book, you’ll be able to use the Karate framework in your software development lifecycle to make your APIs and applications robust and trustworthy.
Table of Contents (15 chapters)
1
Part 1:Karate Basics
7
Part 2:Advanced Karate Functionalities

Running Karate tests in a Docker container

Often, build servers don’t have all the technology necessary to run every software and every testing framework without any further configuration. Unfortunately, you don’t always have complete administrator access to simply add missing components or even make complete configuration changes.

To recap, our Karate tests have some requirements they need to run properly: Java and Maven. There might be even more needed dependencies, depending on your test scope, which would require even more effort to provide.

This is where Docker comes in.

Understanding Docker

Docker is a solution that can run on many platforms. It uses a concept called OS-level virtualization. That means that we can have multiple isolated containers on an OS, including all kinds of custom tools and settings. For programs that run inside such a container, it feels like a self-contained system. The great thing about it is that we can have ready-made containers...