wepa - webdriver enhanced platform for automation - wepatest

18
WEPA Webdriver Enhanced Platform for Automation @vgpmiami http://www.linkedin.com/in/fr eddyvega

Upload: freddy-vega

Post on 12-Feb-2017

300 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

WEPAWebdriver Enhanced Platform for Automation

@vgpmiami

http://www.linkedin.com/in/freddyvega

Page 2: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

SUMMARY

• FRAMEWORK? WHY?• WHAT TO INCLUDE• HOW IT WORKS• HOW TO SCALE IT

Page 3: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

WHY USE A FRAMEWORK

• STANDARD NOMENCLATURE• TEST ARTIFACTS (SCREENSHOTS, LOG FILES)• TEST SCRIPTS• TEST CLASSES

• REUSABILITY (SAME FRAMEWORK DIFF PROJECTS)• EASY TO MAINTAIN• EASY TO EXTEND• EASY TO UNDERSTAND

Page 4: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

SYSTEM COMPONENTS

1. TEST SCRIPTS (SELENIUM)2. AUT DRIVER (SELENIUM SERVER)3. PERL4. DATABASE

Page 5: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

SYSTEM DIAGRAM & WORKFLOW

Page 6: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

TEST SCRIPTS

• Coded in Perl• Cross platform• Use page objects• Based on a standard

template

Page 7: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

TEST SCRIPT TEMPLATE

• PLATFORM LOOP• BROWSER LOOP

• TEST DATA LOOP• SETUP TEST• RUN TEST• CLEANUP TEST

Page 8: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

THE GRID• Java (jar file)• Selenium Stand Alone Server• Can be launched in two modes / roles• Hub• Node

• Adds the capability to run tests in ParallelGRID1

Page 9: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

AUTOMATION DB• MySQL• Test Data• Form Field Data• HTML Element Object Map• Test Pages (URLs)• Keyword / Actions

• Test Artifacts• Test Runs• Results (pass/fail)• Screenshots

Page 10: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

SYSTEM COMPONENTS BLOCK DIAGRAM

Page 11: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

TEST EXECUTION LAYER

• FACES THE USER (SCRIPT PROGRAMMER)• COMMUNICATES WITH FUNCTIONAL LAYER

VIA EXPOSED METHODS (ACTIONS):• LOAD_TEST_DATA• LOGIN_AS• ADD_ITEM• EDIT_ITEM

• DETERMINES PASS / FAIL STATUS

• TEST.PL

Page 12: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

• Only layer that “speaks AUT” language

• Drives the AUT (by executing actions)

• All actions to be performed on AUT are defined here

• Utilizes System Layer as needed

• Returns 1 or 0 to Test Execution layer

1 = success0 = unsuccessful

• WepaApp.pm• ShoppingCart.pm• SettingsModule.pm

FUNCTIONAL LAYER

Page 13: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

• Interface with anything that is not AUT

• Provides Services for the other layers– DB access– Write and Parse Log Files– Test results processing

• WepaSubs.pm

SYSTEM LAYER

Page 14: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

TEST BREAKDOWN• ONE

WEPA<AREANAME>.PM FOR EACH APPLICATION FUNCTIONAL AREA

• INHERITS BASE ACTIONS FROM WEPAAPP.PM (THE FUNCTIONAL LAYER’S MAIN CLASS)

Page 15: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

TEST CONFIGURATION

• INI type configuration files• Test Browsers (FFX,

CHR, IE, SFR)• Test Platforms (Win7,

Win8, MAC)• Test Information• Test Data

• Configuration File is loaded when the test runs

Page 16: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

SYSTEM REQUIREMENTS

• WebDriver itself does not have any system requirements• Requirements will depend on numerous factors:

• Total number of tests• Number of physical machines (PC’s)• Complexity of the tests• Type of test (end-to-end, regression)

• 12 Browsers per WebDriver node (VM)• 2 GB RAM• ~1.5 – 2GHz Processor

General Guideline

Page 17: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

VIRTUALIZEDEXECUTION

ENVIRONMENT

• 6 VIRTUAL MACHINES

• 11 BROWSERS / VM

• CAPABILITY TO RUN 46CONCURRENT TESTS

x5

x5

x5

x5

x5

x5

x5

x5

x1

x1

x1

x1

x1

x1

20 20 6

Total BrowsersPer VM

11

11

11

11

1

1

46

Page 18: WEPA - Webdriver Enhanced Platform for Automation - WEPATest

MORE INFORMATION - Q&A

URL Description

http://perlmaven.com/perl-tutorial

excellent quick and dirty tutorial from one of Perl’s leading authorities

http://perldoc.perl.org the official Perl documentation

http://search.cpan.org the online repository of Perl modules – this is the reason Perl is known as the Internet’s Swiss Army knife

http://www.seleniumhq.org/docs

official Selenium documentation

http://blog.teamvgp.com My blog

Visit the below links for information about Perl, Selenium and Automation in general