18
@SmartBear | #APIDataDrive Data-Driven API Testing: Best Practices for Real-World Testing Scenarios

Data Driven API Testing: Best Practices for Real-World Testing Scenarios

Embed Size (px)

Citation preview

Page 1: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@SmartBear | #APIDataDrive

Data-Driven API Testing: Best Practices for Real-World Testing Scenarios

Page 2: 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

Page 3: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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

Page 4: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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

Page 5: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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

Page 6: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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

Page 7: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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

Page 8: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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

Page 9: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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

Page 10: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@SmartBear | #APIDataDrive

Data-Driven API Testing

in Action!

10

CLICK HERE TO VIEW THE DEMONSTRATION

Page 11: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@SmartBear | #APIDataDrive

Car rental company Web (SOAP) service

Checks vehicle availability at airport locations

REST API Provides details about car rental office

Background

Page 12: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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

Page 13: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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)

Page 14: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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

Page 15: Data Driven API Testing: Best Practices for Real-World Testing 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

Page 16: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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

Page 17: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@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

Page 18: Data Driven API Testing: Best Practices for Real-World Testing Scenarios

@SmartBear | #APIDataDrive

Q & A Become a Data-Driven Testing Pro

FREE TRIAL PRO TRAINING