Api Testing with RestAssured and Karate
4 Days
restsoapjavabdd
Intermediate
In this program, participants learn RestAssured & Karate and their use cases. Assuming little knowledge on participants-side, program starts with basics of Http and Api. It covers lot of ground for Junit as well. RestAssured & Karate are free and open source rest api client library for java. With extensive configuration, auth support, serilaization, and first-class features, they allow to rapidly create and execute automated rest api testing when combined with Junit, very capable unit testing library. Participants learn how to use RestAssured & Karate to deal with rest api requests and responses for various usecases including authentition. Program allows participants to use RestAssured with Junit & Karate to test any rest api with data driven testing. Sometimes, BDD is preferred for Api Testing. Karate helps completely to apply BDD. Program includes introduction to BDD with Karate and RestAssured. Program includes demos and hands-on.
Audience
Program is primarily for participants who must be software savvy testers and developers who aspire to use RestAssured with Junit & Karate to efficiently conduct java api testing.
Prerequisites
Participant must be able to code in core java with standard library.
Topics
Fundamentals
- History
- Setup
- Capabalities
- What is API?
- Testing
- Rest Assured Vs Karate
- Web, HTML, CSS, JS
- HTTP
- Clients and Servers
- URL
- Subdomain, Domain, port
- Path, parameters
- Request
- Response
- Status
- Methods
- Headers
- Known headers
- Body
- Cookies
- Serialization
- Jsonpath, Xpath, Regex
- Schema and Validation
- Using Browser Dev Tools
- Using UI Tools
- VSCode extensions
- Postman
- Studying real web-sites
Junit
- What is Testing?
- Test automation
- Challenges
- Test types
- History
- Why Junit?
- Installation
- Hello, Junit!
- Writing Tests
- Running Tests
- Running Tests in Console
- Test Runners
- Describing Tests
- Assertions
- RegEx
- Fluent assertions
- Important annotations
- Junit test lifecycle
- AAAC
- Exceptions
- Data-driven Testing
- Using files in the test
- Intro to extending Junit
Api
- SOA and Micro-Services
- MACH Architecture
- Microservices
- API first
- Cloud native
- Headless
- REST
- Methods
- URL, URN, URI
- Parameters
- WADL
- SOAP
- WSDL
- OpenApi and Swagger
RestAssured
- Hello, World!
- Handling and asserting
- Methods
- Url
- Code and Body
- Query parameters
- Path parameters
- Data
- Status
- Headers
- Cookies
- Form Data
- Files
- Body
- Defaults
- More about test structure
- Mesauring time
- Authentication
- Basic
- Form based
- OAuth
- CSRF
- Data driven tests
- Serialization
- Object mapping
- Logging
- Filtering
- SSL
- Cofiguration
- Example of Live Api
- Run via command
- ExtentReports Community
- Managing Tests
Karate
- Installation
- Simple usage
- Running Tests
- Reports
- Types
- Gherkin like DSL Syntax
- Variables
- Actions
- Http
- Request
- Response
- Assert
- Reuse
- Polling
- Conditional Logic
- Hooks
- Transforms
- Loops
- Authentication
- Mocking
- Compare with RestAssured
Exclusions
SDLC, BDD as Process, TDD, Scrum, Load & Performance testing, Advanced Protocol Details
Anything not mentioned in Topics
Software Requirements
Latest Eclipse for Java (Or any other IDE)
Latest Visual Code
Internet Requirements
Good unrestricted internet connection is required.
Hardware Requirements
Laptop capable to run MS Office
Classroom Requirements
Projector with HDMI, White Board, Markers with Eraser
Online Requirements
Appropriate meeting software e.g. Zoom, MS Teams Please make sure that camera, speaker and mic are working
If you have any query, please contact now.