TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
How to Cover All Your Backend Testing Needs with API and UI Tests
1. How to Cover all Your Backend
Testing Needs With API & UI Tests
Refael Botbol -
Performance Engineer
2. AGENDA
Who Are We?
Quick Overview of API & UI Testing
API & UI Tests: Which Should You Use and When?
How Testing Integrates Into Your Application Lifecycle
Live Demo: Let’s Get Hands-On
Q&A§
02
3. What is BlazeMeter?
The Performance Testing Platform for
Load, API, CI and Monitoring
Developer Friendly
Open Source Compatibility
Self Served
03
4. What Can You Do With BlazeMeter?
• Test any mobile app, website or API in under 10 minutes
• Simulate any number of users
• Run any open source Apache JMeter script
• Integrate automatically with your APM & CI tools
• Analyze results through comprehensive reporting
• Find and fix bottlenecks in your apps and website’s performance
04
5. Quick Overview of API & UI Testing
The practice of using APIs in order to loosen the
interdependencies between frontend
(browser & mobile) and backend
API test your actual backend
performance / functionality
Analyzing hits/s VS response times to identify
bottlenecks
Testing UIs to verify user scenario(s)
are working and responsive
Analyzing users VS response times
Using Selenium to improve understanding
of actual user experience during the
load test
Error monitoring: important in both cases but
crucial for API calls!
05
6. The application responds in the
same way throughout the test.
Response times are not affected by
the simulated load in any way.
The Perfect Load Test
0
10
20
30
40
50
60
70
0:00 0:10 0:20 0:30 0:40
Users Response Time
The Perfect Load Test
06
7. The application initially responds well.
But once it reaches a certain load,
the response time starts to increase accordingly.
However, when you stop adding more load, the
response time will also stabilize.
Sensitive to Load
0
10
20
30
40
50
60
70
0:00 0:10 0:20 0:30 0:40
Users Response Time
Sensitive to Load
07
8. We’re in a hell of a mess!
The application can’t sustain the load, and
response times keep rising even though we’ve
stopped increasing the load.
It’s clear that we’ve hit a significant bottleneck,
something has probably broken and unless we
solve it – the response time will only get worse!
Breaks Under Load
0
20
40
60
80
100
120
140
160
0:00 0:10 0:20 0:30 0:40
Users Response Time
Breaks Under Load
08
9. API & UI Tests: Which Should You Use and When?
1. Unit testing
2. As part of your CI builds
3. Staging performance
4. Before adding a new service
which will require more hits/s
5. Changes in the application
design (New DB, Upgrades..)
API – Testing your backend
functionality and performance
to understand how many hits/s
it can sustain
1. Before major events
(Black Friday, commercial
events, elections etc..)
2. Before releasing a new
frontend version
UI – Verifying the quality of your
user scenario and response
times
Both can be used as
monitoring scripts
09
10. Write your unit testing scripts to verify the code
works (simple JMX)
HOW TESTING
INTEGRATES
INTO YOUR APPLICATION
LIFECYCLE
Integrate unit testing into your CI tools (Jenkins,
CloudBees etc.) and run them after important
builds
Create a user scenario script and add it to your CI
builds to verify critical user scenarios are not
broken
Use these scripts with higher load on your staging
environment to verify your API and user scenarios
are working as planned
Add a JMeter Selenium Web Driver to measure
user experience during the load
Take the same scripts and load test in
production when needed
10
11. For more information about Performance Testing and JMeter:
BlazeMeter.com/blog/ support@blazemeter.com @BlazeMeter
Want to find out more?
Read our blog post on API & UI Testing:
http://bit.ly/UI-API
Watch the webcast:
http://bit.ly/apiuiwebcast
11