devcon08 web servicetesting
TRANSCRIPT
-
7/30/2019 DEVCON08 Web ServiceTesting
1/25
Performance Testing and Optimization in
Web-Service Based Applications
Mesfin Mulugeta
Sr. Software Performance Engineer
-
7/30/2019 DEVCON08 Web ServiceTesting
2/25
Goals of the Presentation Brief introduction to software performance
engineering and performance testing
Web service performance metrics
Web Service Performance testing and optimizationtools
Load Generation & Profiling Tools
Non Goals
Compare the performance of web services to otherdistribution technologies
-
7/30/2019 DEVCON08 Web ServiceTesting
3/25
Presentation Outcomes
At the end of the session, participants will be able todo the following:
Get acquainted with the important steps in a softwareperformance engineering methodology
Apply load generation and profiling tools in the
performance testing and optimization of web serviceinterfaces
-
7/30/2019 DEVCON08 Web ServiceTesting
4/25
Software Performance Engineering (SPE)
A systematic, quantitative approach to constructing softwaresystems that meet performance objectives (POs).
As part of SPE, we focus on:
Identifying Critical Use Cases (e.g. opening a grade center)
Assessing Performance Risk
Establish POs
POs are usually specified in: response time, Throughput,Resource Utilization, workload
Integrate performance engineering into software developmentprocess
-
7/30/2019 DEVCON08 Web ServiceTesting
5/25
Performance Engineering in BlackboardTM SDLC
Requirement
Development
Design
Development
Testing
Deployment(GeneralAvailability)
Maintenance
- Assess Performance Risk- Mitigate Performance Risk-Identify critical se cases for Analysis- Establish performance objectives
- Review Technical DesignDocument- Warn unacceptable anti-patterns- Model/Prototype
-Profile the critical scenarios to identifyinefficient executions- Code Review- Identify scalability issues in time- Develop Performance Data Model
- Performance Verification Testing- Regression Testing
- Focused Testing- Benchmarking & Certification- Platform and AdvancedConfigurations
- Sizing & Capacity Guidance
- Get Performance Problems- Diagnose Problems
-
7/30/2019 DEVCON08 Web ServiceTesting
6/25
Software Performance Testing (SPT)
SPT is performed to determine how fast some aspectof a system performs under a particular workload
Purpose Used to demonstrate that the system meets
performance criteria
Helps identify how each scenario performs How is SPT related to:
Load Testing,
Stress Testing, and Performance Tuning?
-
7/30/2019 DEVCON08 Web ServiceTesting
7/25
Performance Testing Tools
Load Generators, Monitors & Frameworks
LoadRunner
JMeter
Rational Performance Studio
soapUI
Profilers JProbe
Eclipse TPTP
jmap, jhat, jstat, jconsole SAP Memory Analyzer
-
7/30/2019 DEVCON08 Web ServiceTesting
8/25
Performance Testing & Optimization Process
Identify PerformanceScenario
Define PerformanceObjectives
Specify & ImplementData Model
Run the test by usingappropriate tools
Gather data &analyze
Is PerformanceOK?
Use Profiler fordiagnosing the problem
Problem could be atapplication, database,operating system, or
network level.
Report Result!
Specify Workload
Used to mimicthe real world
scenario
Refactor orPerformance Tune
Ensure somerandomness
No
Yes
-
7/30/2019 DEVCON08 Web ServiceTesting
9/25
Web Services
a software system designed to support interoperablemachine to machine interaction over a network.
Uses open standards like XML, SOAP, WSDL
Web-service based applicationsare applications built
by using web services provided by third-parties.
-
7/30/2019 DEVCON08 Web ServiceTesting
10/25
Blackboard Web Services
-
7/30/2019 DEVCON08 Web ServiceTesting
11/25
A Web-Service Based Application Scenario
ContentWS(Bb Web Service)
Library
UniversityPortal
Web Service
loadContent
saveContent
loadContent
-
7/30/2019 DEVCON08 Web ServiceTesting
12/25
Why we need to measure web service performance?
Clients need to know the response time, throughput ofthe APIs
Multiple service providers offering same or similarservice take advantage
SPs need to know the resource demands of the APIs
at different workloads
-
7/30/2019 DEVCON08 Web ServiceTesting
13/25
Web Service Performance Metrics
Server Side: can be gathered by stress testing on the serverend. Important parameters are:
Server throughput (measured as the number of requests persecond)
Latency (time taken between the service request arriving and therequest being serviced.)
Client Side: client side monitoring or distributed load testing canbe used to gather data. Important parameters are:
Latency (WS processing time + network latency). This is the timetaken for a service call to return the earliest response bytes
Throughput (the average byte flows per unit of time, includinglatency)
Error rate (identifies the dependability of the service)
-
7/30/2019 DEVCON08 Web ServiceTesting
14/25
JMeter (1)
Apache Jakarta Project
Used as a unit test for database connections, web
services, FTP, LDAP, JMS, etc. Configuring JMeter for a web service test plan
Thread Group
No. of users to simulate Ramp-up period
Samplers: define input from thread groups
Web Service (SOAP) Request
Listeners visualize test runs
Graph Results
-
7/30/2019 DEVCON08 Web ServiceTesting
15/25
JMeter (2)
-
7/30/2019 DEVCON08 Web ServiceTesting
16/25
JMeter (3)
-
7/30/2019 DEVCON08 Web ServiceTesting
17/25
soapUI
A java-based web service testing tool
Used for inspecting, invoking, developing, simulating, mocking,
and load-testing web services
-
7/30/2019 DEVCON08 Web ServiceTesting
18/25
JMeter and soapUI
JMeter
A general purpose load-testing tool.
Used to load and performance test HTTP, JDBC, JMS,Web Service (SOAP), etc.
Supports distributed load testing (important whensimulating very high number of users)
soapUI Specific to web services
Has a more user friendly IDE
Doesnt support distributed load testing Plug-in support for most IDEs including Eclipse
Automation support (Groovy scripting)
-
7/30/2019 DEVCON08 Web ServiceTesting
19/25
Profilers
There are a number of open source and commercialprofilers
Profiling helps in finding:- Performance bottlenecks- Excessive memory consumption- Memory leaks
Profiling Web Services
Web services might be available in different ways.
Developed from scratch Java classes, business components (e.g. EJB) are turned into
web services
-
7/30/2019 DEVCON08 Web ServiceTesting
20/25
Eclipse TPTP
TPTP - Test & Performance Tools Platform
Can be used to profile local Java applications,
complex applications running on multiple hosts, andEclipse plug-ins
Installations & Configuration
Easier with the Eclipse Europa Version
Pros: a free plug-in for Eclipse
Cons: tightly integrated with the Eclipse Project
-
7/30/2019 DEVCON08 Web ServiceTesting
21/25
Using Eclipse TPTP
-
7/30/2019 DEVCON08 Web ServiceTesting
22/25
JProbe
Offers memory analysis, performance analysis, andcode coverage
Can profile J2EE and J2SE based applications Can profile JUnitPerf tests
Can be integrated with Eclipse
-
7/30/2019 DEVCON08 Web ServiceTesting
23/25
JProbe Method List View Snapshot (an example from
Blackboard data generator tool)
Method
CumulativeTime
No. of Calls
MethodTime
Cumulative
Objects
Package Method
Objects
-
7/30/2019 DEVCON08 Web ServiceTesting
24/25
Summary
SPE integrates performance engineering into thesoftware development process
Clients and Service providers need to know theperformance of web services for a number of reasons.
Web service performance metrics are classified as
client-side and server-side. Important parameters are:latency, throughput, and error rate.
Load generators are used together with profiling toolsto measure and optimize the performance of webservice based applications.
-
7/30/2019 DEVCON08 Web ServiceTesting
25/25
References
http://jakarta.apache.org/jmeter/
http://www.soapui.org/