Api Testing with Python Requests and Karate
4 Days
restsoappythonbdd
testingautomation
Intermediate
developertester

In this program, participants learn Requests & 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 Pytest as well. Requests & Karate are free and open source rest api client library for Python. With extensive configuration, auth support, serilaization, and first-class features, they allow to rapidly create and execute automated rest api testing when combined with Pytest, very capable unit testing library. Participants learn how to use Requests & Karate to deal with rest api requests and responses for various usecases including authentition. Program allows participants to use Requests with Pytest & 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 Requests. Program includes demos and hands-on.

Audience

Program is primarily for participants who must be software savvy testers and developers who aspire to use Requests with Pytest & Karate to efficiently conduct api testing using Python.

Prerequisites

Participant must be able to code in Python including standard library.

Topics

Fundamentals
  • History
  • Setup
  • Capabalities
  • What is API?
  • Testing
  • Requests 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
    • JSON
    • XML
    • Binary
  • Jsonpath, Xpath, Regex
  • Schema and Validation
  • Using Browser Dev Tools
  • Using UI Tools
    • VSCode extensions
    • Postman
  • Studying real web-sites
Pytest
  • What is Testing?
  • Test automation
  • Challenges
  • Test types
  • Why Pytest?
  • History
  • Installation
  • Hello, Nunit!
  • Writing Tests
  • Running Tests
  • Running Tests in Console
  • Test Runners
  • Pytest test lifecycle and AAAC
  • Pytest fixures
  • Describing Tests
  • Assertions
  • RegEx
  • Fluent assertions
  • Important attributes
  • Data-driven Testing
  • Using files in the test
  • Intro to extending Pytest
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
  • Requests as HTTP Client
  • Mocking Api
Requests
  • Hello, World!
  • Handling and asserting
    • Methods
      • GET, POST, PUT, DELETE
    • Url
    • Code and Body
    • Query parameters
    • Path parameters
    • Data
    • Status
    • Headers
    • Cookies
    • Form Data
    • Files
    • Body
      • Xml
      • Json
      • Text
      • Files
        • Json and other formats
  • 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
  • Reports
  • Managing Tests
Karate
  • Installation
  • Simple usage
  • Running Tests
  • Reports
  • Types
    • JSON
    • XML
  • Gherkin like DSL Syntax
    • Variables
    • Actions
    • Http
    • Request
    • Response
    • Assert
  • Reuse
  • Polling
  • Conditional Logic
  • Hooks
  • Transforms
  • Loops
  • Authentication
  • Mocking
  • Compare with Requests

Exclusions

SDLC, BDD as Process, TDD, Scrum, Load & Performance testing, Advanced Protocol Details

Anything not mentioned in Topics

Software Requirements

Any Python IDE Latest PyCharm 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.