East Baton Rouge Parish Library

Writing API tests with Karate, enhance your API testing for improved security and performance, Benjamin Bischoff ; foreword by Peter Thomas

Label
Writing API tests with Karate, enhance your API testing for improved security and performance, Benjamin Bischoff ; foreword by Peter Thomas
Language
eng
Illustrations
illustrations
Index
index present
Literary Form
non fiction
Main title
Writing API tests with Karate
Nature of contents
dictionaries
Oclc number
11379845335
Responsibility statement
Benjamin Bischoff ; foreword by Peter Thomas
Sub title
enhance your API testing for improved security and performance
Summary
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
Cover -- Title Page -- Copyright and Credits -- Foreword -- Contributors -- About the reviewer -- Table of Contents -- Preface -- Part 1:Karate Basics -- Chapter 1: Introducing Karate's Core Concepts -- Technical requirements -- What makes Karate stand out? -- Discovering Karate's strong points -- Core features -- BDD versus Karate -- What is BDD? -- Glue code -- The Karate way -- Supported data types in Karate -- JSON -- GraphQL -- XML -- YAML -- CSV -- Other text-based formats -- Binary formats -- The JavaScript engine -- Java interoperability -- SummaryChapter 2: Setting up Your Karate Project -- Technical requirements -- Installing Java -- Setting the JAVA_HOME environment variable -- Getting to know Karate standalone -- Preparing the IDE -- Setting up Visual Studio Code -- Setting up IntelliJ IDEA -- Importing the example project -- Setting up Karate projects with Maven -- What is Maven? -- Installing Maven -- Adding Maven to the PATH variable -- Setting up a Karate project with the Maven archetype -- The roles of the different Karate project files -- Summary -- Chapter 3: Writing Basic Karate Tests -- Technical requirementsExploring the API under test -- The JSONPlaceholder API -- Creating a new Karate project -- Adding a new feature file -- Configuring test runs -- Adding a scenario -- Calling endpoints and setting parameters -- Setting a URL -- Specifying the HTTP method -- Separating the base URL from the path -- Setting query parameters -- Matching status codes and responses -- Matching the status code and type -- Making the test fail -- Using assertions and matchers on the response -- Exploring the response variable -- Handling nested JSON elements -- Asserting the number of elements with the length propertyUsing matchers -- Making requests with payloads -- Using variables and data tables -- Using variables -- Using data tables -- Using a set -- Summary -- Chapter 4: Running Karate Tests -- Technical requirements -- Running and debugging Karate tests through the IDE -- Running via CodeLens and the Karate CLI -- Debugging via CodeLens and Karate standalone -- Using the debug server -- Running tests with Maven -- Understanding Karate runners -- Running tests against different environments -- Using a custom property in a feature file -- Using Karate's environment property -- Setting up karate-config.jsRunning specific tests -- Running specific runner class methods -- Running specific scenarios -- Filtering tests by tags -- Summary -- Chapter 5: Reporting and Logging -- Technical requirements -- Configuring log options -- Understanding log levels -- Changing the log level -- Suppressing print -- Using Karate's built-in reports -- The different report pages -- Preserving old reports -- Deciding what to report -- Configuring third-party report libraries -- Setting the appropriate Karate options -- Using Cluecumber as a Maven plugin -- Technical requirements
resource.variantTitle
Writing application program interfaces with Karate