Api Testing with RestSharp and Karate
4 Days
restsoapc#bdd
Intermediate
In this program, participants learn RestSharp & 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 Nunit as well. RestSharp & Karate are free and open source rest api client library for .net. With extensive configuration, auth support, serilaization, and first-class features, they allow to rapidly create and execute automated rest api testing when combined with Nunit, very capable unit testing library. Participants learn how to use RestSharp & Karate to deal with rest api requests and responses for various usecases including authentition. Program allows participants to use RestSharp with Nunit & 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 RestSharp. Program includes demos and hands-on.
Audience
Program is primarily for participants who must be software savvy testers and developers who aspire to use RestSharp with Nunit & Karate to efficiently conduct .net api testing.
Prerequisites
Participant must be able to code in C# with .Net standard library.
Topics
Fundamentals
- History
- Setup
- Capabalities
- What is API?
- Testing
- Restsharp 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
Nunit
- What is Testing?
- Test automation
- Challenges
- Test types
- Why Nunit?
- History
- Installation
- Hello, Nunit!
- Writing Tests
- Running Tests
- Running Tests in Console
- Test Runners
- Nunit test lifecycle and AAAC
- Describing Tests
- Assertions
- RegEx
- Fluent assertions
- Important attributes
- Data-driven Testing
- Using files in the test
- Intro to extending Nunit
Api
- SOA and Micro-Services
- MACH Architecture
- Microservices
- API first
- Cloud native
- Headless
- REST
- Methods
- URL, URN, URI
- Parameters
- Rest & OpenApi
- SOAP & WSDL
- Rest Vs Http
- Rest Vs Soap
- Benefits
- Hateos
- Restsharp as HTTP Client
- Mocking Api
RestSharp
- 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 Restsharp
Exclusions
SDLC, BDD as Process, TDD, Scrum, Load & Performance testing, Advanced Protocol Details
Anything not mentioned in Topics
Software Requirements
Latest Visual Studio Community Edition
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.