repurposing selenium scripts for load and performance testing

25
Repurposing Selenium Scripts For Load And Performance Testing May 1, 2013 Wednesday, May 1, 13

Upload: appvance-inc

Post on 22-Nov-2014

4.760 views

Category:

Technology


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Repurposing Selenium scripts for load and performance testing

Repurposing Selenium Scripts For Load And Performance Testing

May 1, 2013

Wednesday, May 1, 13

Page 2: Repurposing Selenium scripts for load and performance testing

Appvance WebinarMay 1, 2013www.appvance.com

Selenium goes a long way for the developers and testers to build functional tests for smoke testing, regression testing, and integration testing. In this Webinar Ian Fleming and Frank Cohen of Appvance show how to repurpose Selenium tests to be functional tests and predictive performance monitors.

- Repurposing To Performance Tests- Calibration Testing- What do the results mean?- Running In The Cloud and Grid

[email protected]

Wednesday, May 1, 13

Page 3: Repurposing Selenium scripts for load and performance testing

Your Team

•Ian Fleming, Sales [email protected]

•Frank Cohen, [email protected]

•Tina Shakour, VP Marketing

Wednesday, May 1, 13

Page 4: Repurposing Selenium scripts for load and performance testing

Appvance Enterprise

•Industry Experts: 10 Years Understanding Functional,Load And Performance Testing

•You Are Not Alone: Excellent Service And Support

•Test 100% Of The End User Experience

or …”Why are we the ones talking to you today?”

Wednesday, May 1, 13

Page 5: Repurposing Selenium scripts for load and performance testing

Why Selenium For Performance Testing?

•Great DSL For Web App Automation

•Great For Developers Building Test Framework

•How Do You Want To Selenium?

• Language Support: Python, Java, JUnit, C#, Ruby, Groovy, PHP

• Record/Playback Support

•W3C WebDriver Working Draft 12

• Http://www.w3.org/TR/2013/WD-webdriver-20130312/

Wednesday, May 1, 13

Page 6: Repurposing Selenium scripts for load and performance testing

Selenium Misses

•Running Too Long: 12 Hours Per Test Suite, No Parallelization

•No Mix-and-Match To Use SOAP And REST

•No Repurpose To Performance Tests

•And, Yet, I Don't Want To Throw Anything Away

Solutions Available: Appvance Enterprise, Page Objects, Best Practices

Wednesday, May 1, 13

Page 7: Repurposing Selenium scripts for load and performance testing

How Do You Want To Selenium In Appvance?

Wednesday, May 1, 13

Page 8: Repurposing Selenium scripts for load and performance testing

Mix and Match

•Using Selenium For Functional Testing

•Mix and Match SOAP and REST

•Passing Variables between scripts

• The Locker

• Data Production Library (DPL)

Wednesday, May 1, 13

Page 9: Repurposing Selenium scripts for load and performance testing

Mix and Match Demonstration

Wednesday, May 1, 13

Page 10: Repurposing Selenium scripts for load and performance testing

Object Oriented Approaches To Selenium

•WebDriver APIs, OO, PageObjects

•http://tinyurl.com/cqk989b

s.open("/login")s.type("username", "fcohen") s.type("password", "letmein")s.click("login")s.wait_for_page_to_load("30000")

def login(s, username, password): s.type("username", username) s.type("password", password)  s.click("login") s.wait_for_page_to_load("30000") s.open("/login")s.login(s, "fcohen", "letmein")

Wednesday, May 1, 13

Page 11: Repurposing Selenium scripts for load and performance testing

Fixtures Pattern

public class Jack extends Pulse20 {

public void doTest() throws Exception { try { open(); whatIsNow(); topTrending(); whatIsNow(); onTheVerge(); } finally { close(); } }

public class Pulse20 {

protected static String dnsName; protected SeleniumHtmlunit selenium;

public Pulse20() { selenium = new SeleniumHtmlunit(); }

public void open() throws Exception { selenium.setUseUnsecureSSL("true"); PTTStepListener.startStep("Open"); selenium.setBaseUrl("http://akamai.pepsi.com"); selenium.open("/"); }

Test Suite Fixtures

Wednesday, May 1, 13

Page 12: Repurposing Selenium scripts for load and performance testing

Repurposing To Performance Tests

•Approach and Scale

•Scalability Index

•Calibration Testing

•What do the results mean?

•Running In The Cloud/Grid

Wednesday, May 1, 13

Page 13: Repurposing Selenium scripts for load and performance testing

Repurpose To Performance Test

Wednesday, May 1, 13

Page 14: Repurposing Selenium scripts for load and performance testing

The Most Valuable Analysis

Wednesday, May 1, 13

Page 15: Repurposing Selenium scripts for load and performance testing

Calibration Testing Methodology

First Time We Get Predictable Throughput

Wednesday, May 1, 13

Page 16: Repurposing Selenium scripts for load and performance testing

How Many Virtual Users/Transactions?

Wednesday, May 1, 13

Page 17: Repurposing Selenium scripts for load and performance testing

Time Is Always A Factor

Wednesday, May 1, 13

Page 18: Repurposing Selenium scripts for load and performance testing

Calibration Methodology Saves Time

Wednesday, May 1, 13

Page 19: Repurposing Selenium scripts for load and performance testing

Appvance Enterprise Architecture

•Plug-and-Play for Your Environment

Rackspace

ControllerMap Story to TestsDeploy to Cloud

Log Results

Test RepositoryGIT

Continuous Integration

JenkinsDevelopers

Test ManagementRally, Agile Story

Cloud Instance 2

Test InjectorScript Runner, Monitor, DPL

BrowserChrome, IE

soapUISOAP, REST

Cloud Instance 1

Test InjectorScript Runner, Monitor, DPL

BrowserChrome, IE

App Under Test

Service Under Test

DPL RepositoryMySQL

soapUISOAP, REST

Wednesday, May 1, 13

Page 20: Repurposing Selenium scripts for load and performance testing

Actionable Knowledge from Selenium/Appvance

•Dashboards and Notifications

Rackspace

Aric New User SLA WarningAverage perf: 32 Seconds

Business,DevOps

Cloud Instance 2

Test InjectorScript Runner, Monitor, DPL

BrowserChrome, IE

soapUISOAP, REST

Cloud Instance 1

Test InjectorScript Runner, Monitor, DPL

BrowserChrome, IE

App Under Test

Service Under Test

Scalability Index

Dashboard Results RepositoryMySQL

soapUISOAP, REST

Wednesday, May 1, 13

Page 21: Repurposing Selenium scripts for load and performance testing

•Agile Delivers More Projects Faster

•Requires Repurposing Between Teams

•Treats Tests As Business Asset (Version Control, Sharing, Reuse)

Agile, Repurposing, Performance

DevTest

Biz

IT

Business Requirements to LaunchIntegration Test and SLA Compliance

Functional Tests Repurposed AsLoad and Performance Tests

Wednesday, May 1, 13

Page 22: Repurposing Selenium scripts for load and performance testing

Results Analysis Engine

•Built-in Business Analytics Engine

•100 Charts

•Results Repository Schema For Integration With Your BI

Wednesday, May 1, 13

Page 23: Repurposing Selenium scripts for load and performance testing

Results Analysis Engine

•Built-in Business Analytics Engine

•100 Charts

•Results Repository Schema For Integration With Your BI

Wednesday, May 1, 13

Page 24: Repurposing Selenium scripts for load and performance testing

Summary

•Selenium Good For App Browser Automation

•Extensions Promising For Mobile

•On Its Way To Be A W3C Standard

•Selenium Has Challenges Appvance Solves

•Performance Testing In Cloud/Grid Works Great

•Scalability Index, Calibration Methodology

•Results Analysis For Root Cause Analysis

Wednesday, May 1, 13

Page 25: Repurposing Selenium scripts for load and performance testing

Are You Ready?

•Take Your Current Test Environment

•Leverage Your Selenium Tests

•Repurpose Them To Run In Parallel And As Performance Tests

•Mix And Match With SOAP, REST, Java

•If It Does Not, Call Us At (855) 254-1164 Or Email Us [email protected]

And We Will Show You How

Wednesday, May 1, 13