
Explore the karate framework for API automation and performance testing, powered by AI concepts, with hands-on script generation and practical examples for QA engineers.
Learn the prerequisites for the karate framework, including installing Java, configuring environment variables, and setting up Eclipse with Cucumber plugin, Maven, and Postman via the official website.
Learn to configure the karate framework with maven and JUnit 5, set up a sample feature and test runner, run a get request, and validate expected status codes.
Configure karate in IntelliJ by installing the community edition, creating a java project, adding karate arch type 1.4.1, installing cucumber for java, and running a simple get users scenario.
Explore the karate framework for API testing by understanding API basics, common request methods (GET, POST, PUT, DELETE), required inputs such as URL, headers, and JSON body, and response codes.
Learn json basics, including objects, arrays, and nested structures, and use karate assertions to retrieve data from an api response, such as the second car or second pet breed.
Explore using the get method with a Karate JUnit five runner class to call a rest API, verify 200 status, and run a get request scenario from a feature file.
Feature: validate variables concept
Background:
Given def company_name = "Lebyy.com"
Scenario: verify varaible data type
Given def employee_name = "surendra"
When def employee_id = 456
Then print employee_id
Then print employee_name
Then print "Employee ID value is", employee_id
Then print "Employee name is" ,employee_name
Then print "Company name is", company_name
Scenario: reuse of variable
Then print "Employee name is" ,employee_name
Then print "Company name is", company_name
Background:
Given url 'https://dummy.restapiexample.com'
Scenario: To get all employees information in JSON format
And path '/api/v1/employees'
And header Accept = 'application/json'
When method get
Then status 200
Scenario: To get specific employee details
And path '/api/v1/employee/1'
And header Accept = 'application/json'
When method get
Then status 200
Scenario: To get specific employee details
And path '/api/v1/employee/1'
And header Accept = 'application/json'
When method get
Then status 200
And print response.data.employee_salary
And print response.data.employee_name
And print response.data.id
And print response.data.employee_age
And print response.status
Explore how Karate framework generates an execution report after running a get scenario, including tag-based selection, a Karate summary HTML report, and details on status codes and failures.
Add assertions in Karate tests to verify status codes and validate response bodies using match contains, including checks for string or number types with dollar dot syntax.
Feature: Title of your feature
Background:
Given url 'https://dummy.restapiexample.com'
Scenario: To get all employees information in JSON format
And path '/api/v1/employees'
And header Accept = 'application/json'
When method get
Then status 200
And match header Content-Type == 'application/json'
And match response contains deep {"data":[{"id":1}]}
And match response contains deep {"data":[{"employee_name":"Caesar Vance"}]}
And match response.data == "#[24]"
#And match each response.data[*].employee_name contains "surendra"
And match response.data[*].employee_name == ["Garrett Winters","Tiger Nixon","Ashton Cox","Cedric Kelly","Airi Satou","Brielle Williamson","Herrod Chandler","Rhona Davidson","Colleen Hurst","Sonya Frost","Jena Gaines","Quinn Flynn","Charde Marshall","Haley Kennedy","Tatyana Fitzpatrick","Michael Silva","Paul Byrd","Gloria Little","Bradley Greer","Dai Rios","Jenette Caldwell","Yuri Berry","Caesar Vance","Doris Wilder"]
#Scenario: To get specific employee details
#And path '/api/v1/employee/1'
#And header Accept = 'application/json'
#When method get
#Then status 200
#And match response.data.employee_salary == 320800
#And match response.data.employee_name == "Surendra Jaganadam"
Convert a get request into a cucumber scenario outline with URL examples for data-driven testing. Store the response with def and print it to the console.
Learn to call one karate framework feature file from another, reuse scenarios, and pass API responses by storing the description in a variable for cross-file usage.
Feature: Validate embedded expressions
Scenario: To POST an entry using expressions
Given url 'https://reqres.in/api/users'
And header Accept = 'application/json'
Then def empName = "surendra jaganadam"
Then request { "name": '#(empName)',"job": "mobile automation tester" }
When method post
Then status 201
Scenario: To get all employees information in JSON format
Given url 'https://thetestrequest.com/authors/1.xml'
And header Accept = 'application/xml'
Then def authorName = "Surendra Lebyy"
When method get
Then status 200
And match response.hash.name == '#(authorName)'
Feature: validations with examples
#Scenario: To get all employees information in JSON format
#And url 'https://jsonplaceholder.typicode.com/posts/1'
#When method get
#Then status 200
#And def schemaVal = {"userId": '#number', "id": '#number', "title": '#string', "body": '#string'}
#Then match response ==
#"""
#'#(schemaVal)'
#"""
Scenario: To get all employees information in JSON format
And url 'https://jsonplaceholder.typicode.com/posts/1/comments'
When method get
Then status 200
And def schemaVal = {"postId": '#number',"id": '#number', "name": '#string',"email": '#string',"body": '#string'}
Then match response ==
"""
'#[] #(schemaVal)'
"""
@wilson1
Scenario: Title of your scenario
Given url 'https://gorest.co.in/public/v2/users'
When method get
Then def outputData = []
#Then print response[0]
And eval for(var i=0; i<response.length; i++) if(response[i].name.endsWith("Butt")) outputData.push(response[i].email)
Then print outputData
Explore conditional statements using if and a for loop in karate framework to filter a JSON array from a get response, capture targeted user data (email, gender), and print results.
Learn to read data from a Java class and use it in a Karate feature file by creating a Java reader with methods that return lists or maps.
#Feature: Execute Java Script Function
#Scenario: validate js code 1
#Then def getValue = function() { return "surendra"; }
#Then print "function outpiut is ", getValue()
#Scenario: Function to add 2 numbers
#Then def sumValue = function(a,b) { return a+b; }
#Then def sumValue = function(a,b) { return a-b; }
#Then print "sum value os " , sumValue(100,150)
#Then print "sum value os " , sumValue(100,10)
#Scenario: Random Number
#Then def random = function() { return Math.random(); }
#Then print "random no is ", random()
convert a post test to a scenario outline in Karate framework, using examples to supply name, salary, and age for a data-driven post request that inserts a record.
Learn how to read data from a csv file in Karate framework, convert it to json, and print retrieved data from a project csv.
Feature: Demo
Scenario: To get specific employee details
Given url 'https://dummy.restapiexample.com'
And path '/api/v1/employee/1'
And header Accept = 'application/json'
When method get
Then status 200
Given def expected_Response_Data = read("/ApplicationResponse.json")
#Then print expected_Response_Data
Then match response == expected_Response_Data
Scenario: To get all employees information in JSON format
Given url 'https://thetestrequest.com/authors.xml'
And header Accept = 'application/xml'
When method get
Then status 200
Given def expected_Response_Data = read("/ResponseData.xml")
#Then print expected_Response_Data
Then match response == expected_Response_Data
Scenario: To POST an entry
Given url 'https://reqres.in/api/users'
And header Accept = 'application/json'
Then def input_json_body = read("/inputData.json")
Then request input_json_body
When method post
Then status 201
Explore using the Jira API for authentication and user data with API tokens and account IDs, and convert curl to Postman for the Karate framework automation.
Apply basic authentication in the Karate framework to retrieve user details with a get request, using a basic auth script and header authorization, and validate a 200 response.
Feature: Validate File uploading flows
#Scenario: To POST an entry using expressions
#Given url 'https://chinnapavanm.atlassian.net/rest/api/3/issue/SCRUM-4/attachments'
#And header X-Atlassian-Token = 'no-check'
#Then header Authorization = call read('basic-auth.js') { username: 'chinnapavanm@gmail.com', password: 'ATATT3xFfGF0YQhLo-aH0Trjmg9kKyOBRMtVm-XXjuvVbTRJKBnElzEK-Piy15ISv0eUKbLyzh-tGdM9IxTCVgw8db0TmyANCbLviW6nPVH1jBUlvUXD-Taz_reudDCRwksq-EbwDWm-7d-Geab3DyW0_iY3xqFI_s6KUuzBQD3ZEHvYzZ7F08w=CE46325B' }
#Then multipart file file = { read: 'ApplicationResponse.json', filename: 'ApplicationResponse.json', Content-Type: 'multipart/form-data' }
#When method post
#Then status 200
Scenario: To POST an entry using expressions
Given url 'https://chinnapavanm.atlassian.net/rest/api/3/issue/SCRUM-4/attachments'
And header X-Atlassian-Token = 'no-check'
Then def fileLocation = '/data/README2.txt'
Then header Authorization = call read('basic-auth.js') { username: 'chinnapavanm@gmail.com', password: 'ATATT3xFfGF0YQhLo-aH0Trjmg9kKyOBRMtVm-XXjuvVbTRJKBnElzEK-Piy15ISv0eUKbLyzh-tGdM9IxTCVgw8db0TmyANCbLviW6nPVH1jBUlvUXD-Taz_reudDCRwksq-EbwDWm-7d-Geab3DyW0_iY3xqFI_s6KUuzBQD3ZEHvYzZ7F08w=CE46325B' }
Then multipart file file = { read: '#(fileLocation)', filename: 'README2.txt', Content-Type: 'multipart/form-data' }
When method post
Then status 200
Define and use a karate config file to supply environment-specific values like app base URL, app id, and app secrets, enabling runtime data substitution in feature tests.
Scenario: validate jsonpath
And url 'https://jsonplaceholder.typicode.com/posts/1/comments'
When method get
Then status 200
Then print karate.jsonPath(response,"$.[0].email")
Then print karate.jsonPath(response,"$.[?(@.id==1)].name")
Refer below link which has examples what we discussed in the session:
https://github.com/json-path/JsonPath
Integrate cucumber reports into the karate framework by adding the cucumber reporting dependency (latest 5.7.0) and updating pom.xml, then generate and view detailed cucumber html reports of test execution.
Learn to run karate framework test scripts from Jenkins, configure a freestyle job with a custom workspace, and execute mvn test -D runner on Mac or Windows.
Learn to use hooks in the karate framework, employing background for before scenario content and after scenario and after feature hooks to manage preconditions, postconditions, and after execution steps.
Scenario: To get all author information in xml format
Given url 'https://thetestrequest.com/authors.xml'
And header Accept = 'application/xml'
When method get
Then status 200
#And match response/objects/object[1]/email == 'viva@keebler.biz'
And match /objects/object[1]/email == 'viva@keebler.biz'
Scenario: To get author information in xml format
Given url 'https://thetestrequest.com/authors/1.xml'
And header Accept = 'application/xml'
When method get
Then status 200
And match response/hash/name == 'Karl Zboncak'
Learn how to configure Karate Gatling for performance testing: create a performance folder, update the Gatling plugin to 4.2.1, and set up config and data folders, troubleshooting missing simulations.
Explore the karate name resolver, an optional feature that returns null by default but can generate a customized name when you add a header named karate name.
Learn the karate protocol pauseFor() feature with a get request delay example, configuring per-url delays in milliseconds and observing 10s, 20s, and 30s total delays across three scenarios.
Explore how think time in karate gatling simulates user pauses between http requests with karate dot pass, avoiding thread.sleep and revealing delay effects on request-per-second metrics.
Explore using GitHub Copilot to extract Gatling session data in Karate feature files, printing and inspecting user id, token, and role from the Gatling session during a smoke test.
Use Karate Gatling feeders to load CSV data into a scenario, retrieve the Gatling session details, and print email and username during API automation.
Explore injection open model example 3 and ramp up load from 5 to 10 users per second over five seconds with Gatling, and analyze requests per second.
Create a dashboard using the karate framework for api automation, configuring a post request with a json payload, and validating with postman and curl.
Update a dashboard with a put request using curl or postman, providing the dashboard id and a payload with name, description, and type, then verify by refreshing dashboards.
Feature: Verifying end points as per the request
#Scenario: Verify country codes
#Given url 'https://restcountries.com/v3.1/alpha/GB'
#When method get
#Then status 200
#Then print response[0].capital[0]
#And match response[0].capital[0] == 'London'
Scenario Outline: Verify country codes
Given url 'https://restcountries.com/v3.1/alpha/<code>'
When method get
Then status 200
#Then print response[0].capital[0]
And match response[0].capital[0] == '<country>'
Examples:
|code|country|
|GB |London |
|FR |Paris |
|JP |Tokyo |
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-junit5</artifactId>
<version>1.4.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.intuit.karate/karate-core -->
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-core</artifactId>
<version>1.3.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.intuit.karate/karate-apache -->
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-apache</artifactId>
<version>0.9.6</version>
<scope>test</scope>
</dependency>
Explore how AI augments human work with a human-in-the-loop approach, boosting testing and development efficiency, including postman versus soap UI and AI-generated manual and automated test cases.
Explore the human in the loop concept, why ai should seek human approval for critical decisions, and how guardrails and prompt engineering prevent hallucination and protect information.
Learn why context matters for language models and LMS performance; providing precise information helps models follow rules and produce more accurate, engaging outputs.
Explore prompt engineering and how clear, contextual prompts shape AI responses, reduce hallucinations, and enable turning input into actionable plans.
Explain how to define a manual context file to guide ChatGPT in executing login flow tests, including positive and negative cases, and the role of prompts for automation.
Compare ChatGPT, GitHub Copilot, and Cursor for coding and automation testing; learn how Copilot and Cursor integrate with editors to adapt to existing frameworks and boost development precision.
Explore how n8n enables workflow automation by creating ai agent and building nodes and workflows to automate tasks like onboarding emails and data retrieval without code during a 14-day trial.
Learn to generate an OpenAI API key from the quick start, securely copy and store it, and use it to connect AI agents for automation tasks.
Create a simple n8n workflow that connects Gmail and Google Drive, reads a test data sheet, and uses an AI agent with GPT-4.1 mini to email Sam’s row.
Build a dynamic n8n workflow that checks a sheet for a jam user, lets the AI agent determine the recipient at runtime, and emails the matched recipient.
Create a Jira cloud account, generate an API token, and set up a project with Zephyr Squad to read inputs from Excel and create test cases or defects in Jira.
Explore building an n8n workflow to pull new defects from a data sheet and create Jira issues, including configuring credentials, domain, and project, while debugging connection issues.
Learn how to configure an n8n workflow to create Jira bugs from sheet data, including credentials, URL handling, connection testing, and automating defect creation for new issues in a project.
Create a public chat in an n8n workflow and publish a URL, enabling interactive ai assistant responses, while automating defect creation and issue tracking from a google sheet.
Discover that tokens are the fundamental units of words and punctuation in OpenAI prompts—four characters per token—driving processing time and cost. Learn to manage tokens for budgets and rate limits.
Develop an OTP shield mobile app that monitors text messages, phone calls, WhatsApp messages, and WhatsApp calls, warns against sharing OTP, blocks APK files, and offers a dismiss option.
Demonstrates generating a karate api test case using cursor editor within eclipse, creating a get user email feature, and troubleshooting a 400 error while using ai as a helper.
Provide an update on upcoming AI videos, expanding the AI series with 12 plus videos, updating content, generating test scripts, and building a framework within one week.
** Updated with Karate Gatling performance testing & AI-driven implementation **
Learn Karate Framework for API automation and performance testing — Karate DSL, REST API testing, Gatling performance, project practice, and AI-assisted Karate workflows.
This Karate API testing course is built for manual testers, beginners, and QA engineers who want practical API and performance automation skills without heavy coding overhead.
What you will learn in this course:
- Karate Framework setup and Karate DSL fundamentals
- REST API automation with GET, POST, PUT, DELETE
- Assertions, JSON handling, and data-driven testing
- Reusable scenarios and maintainable Karate test design
- Performance testing with Karate and Gatling
- Mini project practice (JIRA API workflows)
- AI-driven implementation concepts for Karate automation
- Interview and real-project problem solving topics
Keywords covered in this course:
Karate Framework, Karate DSL, Karate API testing, REST API automation, Karate performance testing, Gatling with Karate, API automation testing, Karate from scratch, data driven API testing, AI for QA, Karate Gatling.
This course focuses on hands-on Karate implementation so you can confidently automate APIs and run performance tests for projects and interviews.
If you are searching for Karate Framework, Karate DSL, Karate API automation, or Karate Gatling performance testing training, this course is for you.
Course is updated on 8-December-2025 with below concepts::
Overview on AI
Overview on LLM
Overview on RAG
Overview on Generative AI
Overview on Memory
Overview on AI Agent
Overview on LangChain & LangGraph
Overview on MCP Server
Overview on Human In the loop , Hallucination & Guardrails
Overview on Fine-Tuning
Overview on Context
Overview on Prompts
ChatGPT vs CoPilot vs CURSOR
Overview on OpenAI
Overview on AI Models
Overview on n8n workflow
Generate API Key in OpenAI
Create workflow in n8n
Create Public Chat in n8n workflow
Overview on OpenAI Tokens
CURSOR - Create a Chrome Extension for Record & Playback
CURSOR - Create an OTP Shield Mobile APP
Generate Karate API Test case using CoPilot in Eclipse Editor
Generate Karate API Test case using CoPilot in VSCode Editor
Generate Karate API Test case using Cursor Editor
Course is updated on 24-August-2025 with below concepts::
Performance Testing using Gatling
Introduction to Karate-Gatling
Karate-Gatling configuration
Overview on Karate Protocol
Overview on Name Resolver
Pause For & Think time with examples
Karate feature - Tag Selector & Ignore Tags
Overview on Feeders - Reading data from csv & json
Overview on Open model injection with examples
Course updated on 27-March-2025:
Configure IntelliJ Editor for karate Framework
Course updated on 29-January-2025:
. Karate UI - How to compare images
Course updated on 21-November-2024:
How to handle Error: Could not find or load main class cucumber.api.cli.Main ???
Course updated on 06-August-2024:
XML Response Validations
Course updated on 30-July-2024:
Configuring Karate Framework with example -> Couple of students asked to update the content hence created this video
API Automation Made Simple using Karate framework
Karate Framework for beginners
API Automation with Karate Framework.
API Automation using Karate Framework
Karate Framework
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.
Karate configuration
Overview on API with examples
Overview on JSON with examples
Live example of API calls
Karate Framework
GET/POST Request
Data-Driven with Scenario Outline
Creating Parallel runner
Assertions
Using match
JSON Array matching
Schema validation
Fussy matcher: #string, #number
calling another feature
Tags and Run with tags
karate runner configuration and karate options
Report Generation
Cucumber Report Generation
Karate Report Generation
Karate framework HOOKS
How to Handle SSL Handshake error
How to resolve initialization error in karate framework after configuration