repurposing selenium scripts for load and performance testing
DESCRIPTION
TRANSCRIPT
Repurposing Selenium Scripts For Load And Performance Testing
May 1, 2013
Wednesday, May 1, 13
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
Wednesday, May 1, 13
Your Team
•Ian Fleming, Sales [email protected]
•Frank Cohen, [email protected]
•Tina Shakour, VP Marketing
Wednesday, May 1, 13
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
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
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
How Do You Want To Selenium In Appvance?
Wednesday, May 1, 13
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
Mix and Match Demonstration
Wednesday, May 1, 13
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
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
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
Repurpose To Performance Test
Wednesday, May 1, 13
The Most Valuable Analysis
Wednesday, May 1, 13
Calibration Testing Methodology
First Time We Get Predictable Throughput
Wednesday, May 1, 13
How Many Virtual Users/Transactions?
Wednesday, May 1, 13
Time Is Always A Factor
Wednesday, May 1, 13
Calibration Methodology Saves Time
Wednesday, May 1, 13
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
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
•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
Results Analysis Engine
•Built-in Business Analytics Engine
•100 Charts
•Results Repository Schema For Integration With Your BI
Wednesday, May 1, 13
Results Analysis Engine
•Built-in Business Analytics Engine
•100 Charts
•Results Repository Schema For Integration With Your BI
Wednesday, May 1, 13
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
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