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

Integrating Karate tests into GitHub workflows

In this part of the chapter, we will use the popular GitHub workflows to integrate Karate tests into a real build pipeline. We will do this both with and without Docker to see the differences.

Understanding GitHub workflows

If you do development or code reviews, chances are that you regularly use GitHub already. This Microsoft-owned Git-based code management platform is very popular among development teams. It offers pretty much all the required features that are needed within the software development life cycle.

Among many others, it includes version control, bug tracking, and – quite important for this chapter – CI and CD functionality. This is integrated into the platform by so-called GitHub actions that allow building such pipelines without third-party dependencies. These pipelines can be triggered manually or react to various events such as code commits, pull requests, branch creation, modification, deletion...