DFS JMeter Architecture Copyright 2008 EMC Corporation All

  • Slides: 13
Download presentation
DFS JMeter Architecture © Copyright 2008 EMC Corporation. All rights reserved. 1

DFS JMeter Architecture © Copyright 2008 EMC Corporation. All rights reserved. 1

Why Choose JMeter for Performance Testing? load and performance test many different server types:

Why Choose JMeter for Performance Testing? load and performance test many different server types: – – – Web - HTTP, HTTPS SOAP Database via JDBC LDAP JMS Mail - POP 3 Complete portability and 100% Java purity. Full multithreading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups. Caching and offline analysis/replaying of test results. Highly Extensible: – – – Pluggable Samplers allow unlimited testing capabilities. Several load statistics may be choosen with pluggable timers. Data analysis and visualization plugins allow great extendibility as well as personalization. Functions can be used to provide dynamic input to a test or provide data manipulation. Scriptable Samplers (Bean. Shell is fully supported; and there is a sampler which supports BSFcompatible languages) Active Community and Community Authored Extensions © Copyright 2008 EMC Corporation. All rights reserved. 2

JMeter Extensions Stats Agg Visualizer – Mashup JMeter and JFree. Chart for real time

JMeter Extensions Stats Agg Visualizer – Mashup JMeter and JFree. Chart for real time results visualization. JChav – Another JMeter/JFree. Chart mashup designed analyze and report on JMeter results in batch. © Copyright 2008 EMC Corporation. All rights reserved. 3

JMeter Test Plans – Stored as XML files with “. jmx” extensions. – Tightly

JMeter Test Plans – Stored as XML files with “. jmx” extensions. – Tightly coupled to Samplers – Highly configurable © Copyright 2008 EMC Corporation. All rights reserved. 4

JMeter Samplers are designed to configure and drive custom test code. JMeter ships with

JMeter Samplers are designed to configure and drive custom test code. JMeter ships with several samplers “out of the box” Extensible with user written samplers © Copyright 2008 EMC Corporation. All rights reserved. 5

Building the JMeter Project Checkout the Perforce project Install Ant 1. 7 Configure JDK

Building the JMeter Project Checkout the Perforce project Install Ant 1. 7 Configure JDK 1. 5. x Invoke the following targets with ant: ant setup install jmeter © Copyright 2008 EMC Corporation. All rights reserved. 6

DFS Performance Test Kit Code Layout Project Directory Layout DFSPerformance. Test. Kit – –

DFS Performance Test Kit Code Layout Project Directory Layout DFSPerformance. Test. Kit – – – DFSPerformance. Library emc-dfs-sdk-6. 5 JMeter. Sampler Test. Plans Third. Party. Tools Project Directory DFS Specific Code DFS SDK JMeter specific module Location to store JMeter test plans Base JMeter and JChav distributions. Checked into perforce at: – //Depot/Playground/Pleasanton/ottatm/DFSPerformanc/Test. Kit © Copyright 2008 EMC Corporation. All rights reserved. 7

DFSPerformance. Library Architecture Sampler Interface – Loosely inspired by JUnit – sample. Setup() is

DFSPerformance. Library Architecture Sampler Interface – Loosely inspired by JUnit – sample. Setup() is intended for self contained samplers – Context is intended to share DFS or DFC context between samplers public interface Sampler { public void sample. Setup() throws Service. Exception; public void sample() throws Service. Exception; public void release. Context() throws Service. Exception; public Sampler. Context get. Context() ; public Properties get. Default. Properties(); public interface Mutable. Properties { public Properties get. Properties(); public void set. Properties(Properties props); } © Copyright 2008 EMC Corporation. All rights reserved. 8

Operation, Transport, Sampler. Context Operation – “enum” that contains static information about each sampler

Operation, Transport, Sampler. Context Operation – “enum” that contains static information about each sampler type. Transport – “enum” that represents each of the 4 transport types implemented in the code base § § remote local DFC remote. UCF Sampler. Context – Base class that DFSSampler. Context and DFCsampler. Context are derrived from. – Getters for attributes passed into the constructor. § § § transport username password content. Size batch. Size – Batch size and content size are immutable for the life of the context. © Copyright 2008 EMC Corporation. All rights reserved. 9

Sampler Packaging Empty container with two static inner classes public class Checkin. Object {

Sampler Packaging Empty container with two static inner classes public class Checkin. Object { static class DFS extends Abstract. Sampler { public DFS(DFSSampler. Context context, Properties properties) { super(context, properties); } public void sample. Setup() throws Service. Exception { } public void sample() throws Service. Exception { } } static class DFC extends Abstract. Sampler { public DFS(DFCSampler. Context context, Properties properties) { super(context, properties); } public void sample. Setup() throws Service. Exception { } public void sample() throws Service. Exception { } } } © Copyright 2008 EMC Corporation. All rights reserved. 10

Builders Builder pattern used in place of constructors for Context and Sampler objects. –

Builders Builder pattern used in place of constructors for Context and Sampler objects. – Builders shield clients from the arcane type based differences at construction time. Context. Builder – Understands the differences based upon context type e. g. dfc, remote …. Sampler. Builder – Context (form Context Builder) is an argument – Dynamically loads and instantiates the class based upon the Operation type. – Tightly coupled with the Operation class. © Copyright 2008 EMC Corporation. All rights reserved. 11

Batch Testing JMeter can be run “dark” – Good pattern for test automation ©

Batch Testing JMeter can be run “dark” – Good pattern for test automation © Copyright 2008 EMC Corporation. All rights reserved. 12