@SmartBear | #APIDataDrive Data-Driven API Testing: Best Practices for Real-World Testing Scenarios
Apr 16, 2017
@SmartBear | #APIDataDrive
Data-Driven API Testing: Best Practices for Real-World Testing Scenarios
@SmartBear | #APIDataDrive
APIs and the Modern Enterprise1.
2.
3.
4.
5.
6.
7.
What we’ll cover today
2
API Testing isn’t keeping up
Transforming API Testing using data
Optimal Data-Driven API Testing strategies
Data-Driven API Testing in action
Performance Testing, Virtualization & DataTakeaways and Q&A
@SmartBear | #APIDataDrive
Webinar Attendee Statistics
2%
47%51%
How important is Data-Driven Testing to your
organization? Not important at all
Growing impor-tance
Very important
11%
65%
24%
How much Data-Driven API testing do you do today?
None Some
Extensive
51% of attendees for this webinar responded that Data-Driven API testing is “very important,” and yet only 24%
are doing extensive data-driven testing
@SmartBear | #APIDataDrive
APIs are critical business assets They service users inside and
outside the organization They offer competitive differentiation Quality is non-negotiable
APIs and the Modern Enterprise
@SmartBear | #APIDataDrive
Not enough time Minimal communication Hard-coded, narrow
test data Only positive outcomes
are evaluated Results aren’t tracked
API Testing Isn’t Keeping Up
@SmartBear | #APIDataDrive
Business users aren’t engaged Valuable time is wasted Application logic isn’t exercised Latency isn’t accurately measured
Risks of Not Testing with Data
@SmartBear | #APIDataDrive
There’s no longer a good reason not to use data
Modern tools and techniques make data-driven testing easier than ever
This is a critical ingredient for higher quality APIs
Transforming Testing with Data
@SmartBear | #APIDataDrive
The foundation for automated testing
Smooth tie-in with agile methodologies
Better business logic measurement
More realistic performance results
Benefits of Data-Driven Testing
@SmartBear | #APIDataDrive
Use lots of realistic information Test both positive and negative outcomes Employ dynamic assertions Repurpose functional tests for performance Drive virtual APIs with meaningful data
Optimal Data-Driven Testing
@SmartBear | #APIDataDrive
Data-Driven API Testing
in Action!
10
CLICK HERE TO VIEW THE DEMONSTRATION
@SmartBear | #APIDataDrive
Car rental company Web (SOAP) service
Checks vehicle availability at airport locations
REST API Provides details about car rental office
Background
@SmartBear | #APIDataDrive
Parameters for Web Service
LocationBeijing (PEK)Chicago (ORD)Dubai (DXB)London (LHR)Los Angeles (LAX)Mumbai (BOM)New York (JFK)San Francisco (SFO)
VehiclesSubcompactCompactIntermediateFull-sizeSUVVanLuxury
Duration1 day…30 days
@SmartBear | #APIDataDrive
Parameter for REST API
LocationBeijing (PEK)Chicago (ORD)Dubai (DXB)London (LHR)Los Angeles (LAX)Mumbai (BOM)New York (JFK)San Francisco (SFO)
@SmartBear | #APIDataDrive
Typical Manual interaction with service/API
Basic Use in-line, generated data
Intermediate Apply site-specific knowledge to data
Advanced Conduct intelligent, round-trip testing
Four Scenarios
@SmartBear | #APIDataDrive
Static data is dangerous when measuring performance
Databases, app servers, and Web servers all cache responses
The only way to get realistic metricsis to request varied outcomes
Performance Testing & Data
@SmartBear | #APIDataDrive
APIs aren’t always available for testing
Testing often requires minimum viable response data just to get started
API virtualization gives you control over simulations (logic + data)
Virtualization & Data
@SmartBear | #APIDataDrive
Key Takeaways
17
Create APIs with Confidence
Strategic APIs require extensive testing
Automation is essential
Data-driven testing is a foundation for
automation
Automation liberates testers from rote tasks
@SmartBear | #APIDataDrive
Q & A Become a Data-Driven Testing Pro
FREE TRIAL PRO TRAINING