Karate DSL: API Automation and Performance from Zero to Hero
- Descrição
- Currículo
- FAQ
- Revisões
Karate DSL – a framework for API automation testing, Performance, and Load testing. This framework is running on Java and using Apache HTTP client to perform Http connections. For the performance testing, Karate DSL has a very nice integration with the Gatling framework.
Karate has its own scripting language (DSL – Domain Specific Language), which is pretty simple and can be picked up by people who don’t have coding experience. It looks like the Cucumber framework, but it only looks like that. The framework has a predefined set of scripting commands for any operation you might need during interaction with APIs. Also, the framework has native support of JAVA and JavaScript programming languages, so you can create any custom methods and use it in Karate if you need it.
The key advantages of the framework:
-
Own easy scripting language. You don’t need to have coding skills to start writing tests
-
Native JavaScript support and JSON objects (forget about parsers)
-
Very powerful assertions and JSON schema validation
-
Parallel execution (it’s very fast)
-
Integration with Gatling for Performance testing
What you will learn:
-
Basics: what is API and JSON objects. You ll have a clear understanding of the concept of how API works and how to work with JSON objects
-
How to set up and configure Karate framework from scratch
-
How to perform GET, POST, PUT, DELETE requests
-
How to make powerful assertions for API responses, traverse through JSON objects, fuzzy matching assertions, and JSON schema validation
-
How to chain API calls, re-use API response to form new API request
-
How to generate random test data, use this test data in API requests
-
How to handle authorization headers, access tokens
-
Before/After hooks, parallel test execution, conditional testing, data-driven testing
-
How to use Karate scripts for Performance and Load Testing with Gatling framework
Karate DSL is a really great framework for API Automation and my Number 1 choice.
-
3What is JSONVídeo Aula
Explanation of what is JSON and how to read, add and update data in JSON objects using JSON path
-
4What is APIVídeo Aula
What is API. Type of REST requests. Definition of status codes. Basic concept of why do we need to make API automation and how Karate plays its role in it.
-
5Environment SetupVídeo Aula
Preparation of development environment. Installation of all needed dependencies to our system to be able to work with this class
-
6Test Project OverviewVídeo Aula
Cloning and installation of the Test Project for this class. Alternatively, you can use the "Deployed project" which is already up and running. Check the URL attached to this lesson.
-
7Karate Framework SetupVídeo Aula
How to set up a Karate project from scratch.
-
8Karate Framework OverviewVídeo Aula
Overview of Karate framework components and structure
-
9First GET RequestVídeo Aula
Writing the first simple test in Karate with GET request
-
10Url and PathVídeo Aula
Difference between "Url" and "Path" commands in Karate when defining end-points
-
11Simple AssertionsVídeo Aula
First introduction to assertions in Karate
-
12First POST RequestVídeo Aula
Simple POST request in Karate. Rules and syntax.
-
13Runner Configuration and TagsVídeo Aula
Definition of Karate Runner. Configuration of Tags to be able to run or ignore certain Features/Scenarios
-
14DELETE RequestVídeo Aula
Example of the DELETE request. Verification of successful deletion operation.
-
15Calling Other FeatureVídeo Aula
How to re-use the code by calling other Karate feature files.
-
16Environment VariablesVídeo Aula
Configuration of environment variables in karate-config.js and how to use these variables in feature files
-
17Embedded and Multi-Line ExpressionsVídeo Aula
Explanation of embedded and multi-line expressions when working with JSON objects in feature files
-
18AssertionsVídeo Aula
How to make assertions of the response object. Working with JSON path. Exact match and partial match.
-
19Fuzzy MatchingVídeo Aula
How to make an assertion based on response value type or JSON object structure
-
20Schema ValidationVídeo Aula
How to make a validation of the response JSON schema
-
21Test-Data GeneratorVídeo Aula
Creating of JAVA class and using a Faker library to generate random test data values. Then read this JAVA class in the feature files and use random test data in API requests
-
22Data Driven ScenarioVídeo Aula
How to re-use test scenario with a different set of test data and assert a result based on this data
-
23Reading Other FilesVídeo Aula
How to read other files (json, js, csv etc..) and use the result in test feature files
-
24Mistakes and DebuggingVídeo Aula
Review of typical errors and mistakes in Karate and how to debug your code if you face errors during test execution.
-
25HomeworkVídeo Aula
Description of the homework by the end of API Automation section
-
26Before and After HooksVídeo Aula
Configuration of Before and After hooks in Karate. How to set up Before All test, Before Feature and Before Scenario logic. How to set up After Feature and After Scenario logic
-
27Parallel ExecutionVídeo Aula
Parallel execution configuration
-
28Cucumber ReporterVídeo Aula
Importing alternative Cucumber HTML report to the framework
-
29Conditional LogicVídeo Aula
How to implement conditional logic in feature files. IF -> ELSE logic.
-
30Retry and SleepVídeo Aula
How to make your test to retry a call if a condition is not satisfied. How to implement sleep (wait) in Karate.
-
31JSON TransformsVídeo Aula
Different ways of JSON object transformation using Karate
-
32Type ConversionVídeo Aula
How to convert String to Number and Number to String
-
33Connect to SQL DatabaseVídeo Aula
How to connect to SQL Database and perform INSERT query and SELECT query from the database
-
34Karate in Docker ContainerVídeo Aula
How to run karate tests in Docker Container
-
35Gatling SetupVídeo Aula
Installation of Gatling dependencies for Karate and configuration
-
36First SimulationVídeo Aula
Setting up a simulation Scala class and running first smoke performance test
-
37Karate ProtocolVídeo Aula
Definition of Karate Protocol and configuration of reporting
-
38User Think TimeVídeo Aula
How correctly configure "User Think Time" in Karate. Simulation of user wait time between actions
-
39Simulation SetupVídeo Aula
How to set up and configure the simulation flow, how to scale and inject virtual users over time to simulate load increasing to the application. How to read test results.
-
40Feeder From FileVídeo Aula
Inject test data from CSV file into virtual user session using Gatling feeder
-
41Custom FeederVídeo Aula
Creating a custom JAVA class to call the Create Token feature to generate access tokens and then use these tokens in the Gatling feeder. As a result, virtual users will have their own authorization tokens.
-
42Name ResolverVídeo Aula
How to modify reporting using Name Resolver to provide better description to end points
-
43Dispatcher ConfigurationVídeo Aula
Overriding of default values for akka dispatchers to resolve possible issues when new users are not injected into simulation
