REST API Testing with Karate Framework

End to End API Automation with Karate Framework. API Automation Made Simple.

Karate is an open-source general-purpose test-automation framework that can script calls to HTTP end-points and assert that the JSON or XML responses are as expected. Karate is implemented in Java but test-scripts are written in Gherkin since Karate was originally an extension of the Cucumber framework.

What you’ll learn

  • How to design Automation Framework for API automation.
  • Different type of Authentication Mechanism used with API.
  • Karate framework and its usage for API Testing.
  • Continuous Integration and Continuous Deployment.
  • Source Code Management via GitHub.

Course Content

  • Introduction –> 2 lectures • 2min.
  • Environment Setup –> 5 lectures • 12min.
  • RestAPI Introduction –> 5 lectures • 9min.
  • Introduction – Apache Maven –> 3 lectures • 10min.
  • Behavior-driven development –> 1 lecture • 4min.
  • Get Request –> 5 lectures • 22min.
  • Assertions | Matchers | Fuzzy Matchers –> 5 lectures • 40min.
  • Variables | External files –> 2 lectures • 16min.
  • Post Request –> 3 lectures • 17min.
  • Schema Validation | Embedded Expression –> 5 lectures • 33min.

REST API Testing with Karate Framework

Requirements

  • Basic understanding of JAVA language and OOPS concept such as Class, Object, Interface etc..
  • Basic understanding of Eclipse IDE.
  • Basic understanding of Post Man Client.
  • Basic understanding of Windows OS.
  • Basic understanding of Java Script will be an additional advantage.

Karate is an open-source general-purpose test-automation framework that can script calls to HTTP end-points and assert that the JSON or XML responses are as expected. Karate is implemented in Java but test-scripts are written in Gherkin since Karate was originally an extension of the Cucumber framework.

Karate is built on top of Cucumber, another BDD testing framework, and shares some of the same concepts. One of these is the use of a Gherkin file, which describes the tested feature. However, unlike Cucumber, tests aren’t written in Java and are fully described in the Gherkin file.

From this course, you will learn the following concepts.

Web Service Introduction

  • What is the REST service?
  • What are Requests and Responses?
  • CRUD operations
  • Request and Response format
  • Live example of API calls 

Karate Framework

  • GET/POST/PUT/PATCH/DELETE Request
  • Data-Driven with Scenario Outline
  • Dynamic Scenario Outline
  • Creating Parallel runner 

Assertions

  • Using match
  • JSON Array matching
  • Schema validation
  • Fussy matcher
  • JSON Path 

Tagging

  • Tags and Run with tags
  • How to ignore a scenario
  • Getting a tag and feature file from the system property 

Report Generation

  • Cucumber Report Generation
  • Karate Report Generation 

Authentication

  • HardCoded credentials & Token based
  • Using the Java Script file 

CI/CD – Jenkins

  • Jenkins Pipeline Concept
  • Jenkins Multibranch pipeline