2. Current state
• Tests only at presentation layer
• No tests at Business layer/API layer ->
• Potential Defects missed
• DB Vulnerable
• Downstream systems affected
3.5 Hours to complete testing
3. Why API testing?
Fast and
reliable
Integrated
with every
dev
commit
Catch the
defects
early
Helps us
in No-Fear
releases
5. Karate Framework
I want to test web services and
currently use Java
I want to test web services but don’t
know Java/any programming
I develop web services
I am part of a team that
develops/maintains web services
Karate is easier and efficient than
Java
Karate scripts are in plain text
Karate can be used for TDD
Karate increases your velocity and
integrates existing QA and CI/CD
8. API testing made simple
Plain text,calling another feature file,JSON payload and order doesn’t matter, Data driven test, Easy
assertions via JSON path
9. API testing made simple
JSON Array Support
Reading JSON files and manipulating
10. API testing made simple
Multipart and file uploading
Full JSON response validation in one line
Partial JSON response validation in one line
12. Karate vs Rest-assured and Cucumber
Rest-assured Karate
Plain text No Yes
Parallel execution Partial Yes
Data driven testing Not built in Built in
Cucumber enhancements
Cucumber Karate
Built in step definitions No Yes
Re use feature files No Yes
Parallel execution No Yes
Run background only once No Yes
15. Karate vs Rest Assured
Less code = Less maintenance and more efficient
16. API Testing Values
Pipeline integration
• Can run full
regression with
every code commit
in less than 15 mins
• Enable no fear
release
Improve test
development
efficiency
• Can develop tests
way much faster
compared to UI tests
• Very minimal to 0
maintenance
Can identify API risks
• Identifies defects at
API level which
may not be visible in
GUI
• Prevents DB from
invalid entires
18. Reporting
Cucumber Report
Since Karate’s REST test tool is built on
top of Cucumber JVM, you can run your
tests, view reports and leverage any other
Cucumber functionality just as with any
standard java project
19. Karate key features
Open source
Multi-threaded Parallel
execution support
Integration with Pipeline
jobs
Cucumber based ,
Gherkin Syntax
Re-usable functions and
feature files
Less code = More
efficiency and Less
maintenance
Syntax 'natively'
supports JSON and XML
No CERTS and no
POJO’s required
Easy Assertion; Re-
usable scripts for
complex payloads and
responses
Embedded JavaScript
engine
Integration with Junit &
TestNG
Built-in JSON Schema
Validation support