Top Banner
Introduction to Performance Testing Part 1 (V1.1) Author: Vjacheslav Lukashevich Edited by: Eugene Muran
44

Introduction to Performance Testing Part 1

Feb 15, 2017

Download

Documents

ctco
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to Performance Testing Part 1

Introduction toPerformance TestingPart 1(V1.1)

Author:Vjacheslav LukashevichEdited by:Eugene Muran

Page 2: Introduction to Performance Testing Part 1

Part 2

Part 1•Test types•Measurements and scenarios•Testing team•Test tools•Planning and Implementing tests

•Tool Configuration•Test Run•Result analysis•Facts about development

Page 3: Introduction to Performance Testing Part 1

Fact is that -…

Page 4: Introduction to Performance Testing Part 1

No one cares about software

performance at beginning

Fact is that -…

Page 5: Introduction to Performance Testing Part 1

And at the end we get something like this …

Page 6: Introduction to Performance Testing Part 1

Or even worse…

Page 7: Introduction to Performance Testing Part 1

SMALL REMARK:

ALL OF ABOVE MENTIONED

IS ALREADY IN THE PAST

Page 8: Introduction to Performance Testing Part 1

Our days

Page 9: Introduction to Performance Testing Part 1

When performance testing is a “must”

We expect large data volumesWe expect high loadInexperienced programmersCustomer requests it

Page 10: Introduction to Performance Testing Part 1

Question!

What types of performance testing exist?

Page 11: Introduction to Performance Testing Part 1

Test typesPerformance TestingLoad Testing

Stress TestingEndurance testingScalability testingRecoverability testing

How we name it - depends on test target!

Page 12: Introduction to Performance Testing Part 1

Question!

What we will measure by the performance testing?

Page 13: Introduction to Performance Testing Part 1

Application “speed” performance characteristics

Throughput – number of actions per time moment.

Response Time – time taken by action to complete

Page 14: Introduction to Performance Testing Part 1

Application hardware characteristics

Primary resources:CPU (%)

Total CPU usage on hostCPU usage by target process

Memory UsageUsed Memory (on host or by process)Available Memory

NetworkNumber of bytes sent/received per second through network interface

Page 15: Introduction to Performance Testing Part 1

Bottleneck

“Bottleneck” is the place where performance degradation occurs

Page 16: Introduction to Performance Testing Part 1

Scalability

Ability to handle additional workload when:Adding hardware (memory, CPU, storage)Adding additional hosts (machines)

Page 17: Introduction to Performance Testing Part 1

Performance test targets

Common targets:Get performance statistics (application speed)Find bugs (software stability issues)Find out bottleneck’sFind out capacityEstablish baselines

Other targetsScalability checkCrash testRecovery test

Each test is a scenario or a set of scenarios

Page 18: Introduction to Performance Testing Part 1

Question!

Who is participating in performance testing?

Page 19: Introduction to Performance Testing Part 1

Relationship Between Performance Testing and Tuning

Performance Tests

Performance Characteristics

Performance Tuning

Tuning process is done when:performance testing reveals system or application characteristics unacceptable to reduce the amount of resources being used

Page 20: Introduction to Performance Testing Part 1

Performance tuning

Cooperative effortProduct vendors Architects Developers Testers Database administrators System administrators Network administrators

Page 21: Introduction to Performance Testing Part 1

Performance testing activities

1. Identify the test environment

2. Plan and Design tests3. Configure the Test

Environment4. Implement the Test Design5. Execute the Test6. Analyze Results, Report,

and Retest

Page 22: Introduction to Performance Testing Part 1

Identifying test environment:Hardware

In ideal case test environment must be as close to production environment as possible

Page 23: Introduction to Performance Testing Part 1

Identifying test environment:Software –key components

Operation System(MS Windows, Linux,…)

Application Server(IBM Websphere, BEA Weblogic, Tomcat, …)

Database Server(IBM DB2,Oracle,MS SQL Server, …)

Page 24: Introduction to Performance Testing Part 1

Identifying test environment:Software

For performance tests key software components in environment must be as close as possible to production environment –can impact overall system performance

VERSION#

->Patch VERSION#

(Build #)

Configuration

<Settings>

<<Java version>>

Page 25: Introduction to Performance Testing Part 1

Performance testing scenarios

Scenario:Sequence of steps in applicationRepresents a use case

Page 26: Introduction to Performance Testing Part 1

Question!

What scenarios we need to test?

Page 27: Introduction to Performance Testing Part 1

Plan and Design tests:Determining Test Scenarios

Key Usage scenarios to include:most common, frequentbusiness-criticalperformance-intensivetechnical concern high-visibility, obviouscontractually obligatedstakeholder concern

Page 28: Introduction to Performance Testing Part 1

Applying usage pattern for test design

Daytime user activity

0

500

1000

1500

2000

2500

3000

3500

4000

4500

Use

r Act

ions

per

hou

r

Options:1) Emulate exact usage pattern2) Run under maximum load (peak

load)3) Run under average load

Peak load

Page 29: Introduction to Performance Testing Part 1

Most important - performance scenario must be Repeatable (!)

Plan and Design tests:Determining Test Scenarios

Page 30: Introduction to Performance Testing Part 1

Repeatable test scenario

Dataprerequisitescleanup

Tests sequenceEnvironment state

Page 31: Introduction to Performance Testing Part 1

Performance Test Plan

Test Plan contentTest environment Test dataTest scenariosPerformance Measurements

PERFORMANCE TEST PLAN

Page 32: Introduction to Performance Testing Part 1

Test Plan: Test Data and Test Scenarios

Test prerequisites:DatabaseUsers Files (documents, images …)

Test ParametersScenarios listThink timeLoad SchemeDuration

Page 33: Introduction to Performance Testing Part 1

TEST IMPLEMENTATION

Page 34: Introduction to Performance Testing Part 1

Environment setup

Application deploymentDatabase setup Users/ Access RightsSystem clock synchronizationPerformance Monitoring services configuration

Page 35: Introduction to Performance Testing Part 1

Stable version

For performance testing it is preferable to select stable, well tested using functional testing application version

To avoid the surprises for the performance testing it is preferable

to select stable, well tested by functional testing application version

Plan it and target for it!

Page 36: Introduction to Performance Testing Part 1

Perform the smoke testing!

Before beginning the scripting, verify that the scenarios you are going to implement in your test script are working at all!

Page 37: Introduction to Performance Testing Part 1

TESTING TOOLS

Page 38: Introduction to Performance Testing Part 1

2 Main Purposes of test tools

Load Generation

Measurements/Statistics gathering

Best thing, if the tool can do this both tasks in parallel

Page 39: Introduction to Performance Testing Part 1

2 ways to emulate web application

“Play” with browserLinks/Button clicksForm filling

Send POST/GET request to server

Page 40: Introduction to Performance Testing Part 1

What tools we have for such testing?

LoadRunner(different protocols: POST/GET, web browser emulation/GWT/Mobile/SAP)

Jmeter (POST/GET)

Grinder(POST/GET)

*this is only some of available tooling

Page 41: Introduction to Performance Testing Part 1

Capture/Replay

Pluses (+)Fast and easy test creation

Minuses (-)Unstable scriptsApplication change sensitivityUnnecessary requests in scriptsOverhead on server side for replayed scripts

Page 42: Introduction to Performance Testing Part 1

Tests debug

Like any computer program, performance tests also must be tested

Possible checksView returned pages during replay in test tool (in LR - visual test results)Test tool logsServer logs

Page 43: Introduction to Performance Testing Part 1

Content check

Check content, that is only available, when system operates correctly

Page 44: Introduction to Performance Testing Part 1

Books

Performance Testing Guidance for Web Applications

http://perftestingguide.codeplex.com/downloads/get/17955

Web load for dummies