SlideShare una empresa de Scribd logo
1 de 52
Testing Automation
From Start to Finish
       Liang Gao
Testing Automation Attribute:




        贵  expensive



                  2    This material is for training purpose only.
                       No duplication without consent of Sigma-RT is permitted.
Testing Automation Attribute:




   冰山      iceberg



                     3   This material is for training purpose only.
                         No duplication without consent of Sigma-RT is permitted.
Agenda


∗   Realize when you need automation
∗   Always remember the goal
∗   Find the way to control your product
∗   API design
∗   Define the development process
∗   Script Quality
∗   Do I need an automation framework?
∗   Define the execution process
∗   Team management
∗   Equipment management
                               4           This material is for training purpose only.
                                           No duplication without consent of Sigma-RT is permitted.
Automation is useful for….


∗ Frequently functionality regression testing
∗ Sample based performance testing
∗ Repetitive work for system and solution testing




                           5         This material is for training purpose only.
                                     No duplication without consent of Sigma-RT is permitted.
Frequently functionality regression
             testing


∗ Faster turnaround
∗ Reduce human errors
∗ Cost saving




                        6   This material is for training purpose only.
                            No duplication without consent of Sigma-RT is permitted.
Sample based performance testing




               7     This material is for training purpose only.
                     No duplication without consent of Sigma-RT is permitted.
system and solution testing


∗   Semi-automation
∗   Configure 1000 VPN tunnels
∗   Create 10000 routing table entries
∗   …..




                             8           This material is for training purpose only.
                                         No duplication without consent of Sigma-RT is permitted.
Agenda


∗   Realize when you need automation
∗   Always remember the goal
∗   Find the way to control your product
∗   API design
∗   Define the development process
∗   Script Quality
∗   Do I need an automation framework?
∗   Define the execution process
∗   Team management
∗   Equipment management
                               9           This material is for training purpose only.
                                           No duplication without consent of Sigma-RT is permitted.
The Goal


∗ No matter manual or auto



                         Accurate
                         Testing Report

                         10     This material is for training purpose only.
                                No duplication without consent of Sigma-RT is permitted.
Agenda


∗   Realize when you need automation
∗   Always remember the goal
∗   Find the way to control your product
∗   API design
∗   Define the development process
∗   Script Quality
∗   Do I need an automation framework?
∗   Define the execution process
∗   Team management
∗   Equipment management
                               11          This material is for training purpose only.
                                           No duplication without consent of Sigma-RT is permitted.
Remote Control Your Products
 Personal
 Computer                                                                          Web Browser
                                           Truck

                Tablet                     Video
 Printer
                                           Camera

                Telecommuter
                House with
                                                                                    Web Server
                Router                     Video
 Refrigerator                              Phone


                Television                                                          Woman -
                                                                                    End User

 Scanner
                Television -
                Closed-circuit
                                           Weather
                                           Station                                  Woman -
  Set Top Box                                                                       Sitting
  (STB)
                             12   Tunnel   This material is for training purpose only.
                                           No duplication without consent of Sigma-RT is permitted.
Remote Control Your Testing


∗ 2 ways of software manual testing (or Device Control)
  ∗ Mouse and Eye (expectation)
  ∗ Keyboard and Eye (expectation)
∗ Automation is to repeat
  ∗ Mouse and Eye – GUI automation
  ∗ Keyboard and Eye – CLI automation



                            13          This material is for training purpose only.
                                        No duplication without consent of Sigma-RT is permitted.
GUI Automation


∗ Windows based GUI automation
  ∗ AutoIT
∗ Browser based GUI automation
  ∗   QTP
  ∗   WinRunner
  ∗   Silktest
  ∗   AutoIT
  ∗   Selenium

                        14       This material is for training purpose only.
                                 No duplication without consent of Sigma-RT is permitted.
CLI Automation


∗ Expect
  ∗ TCL Expect
  ∗ Perl Expect
  ∗ Python Expect




                    15   This material is for training purpose only.
                         No duplication without consent of Sigma-RT is permitted.
Embedded devices State of the
            Union


∗ Most network devices (network equipment)
  ∗ Management interface: Browser or console
∗ Mobile devices
  ∗ Keyboard simulation
  ∗ Serial port, USB port or Bluetooth




                             16          This material is for training purpose only.
                                         No duplication without consent of Sigma-RT is permitted.
A Sigma Approach (in progress)
       Keyboard simulation,
     predefined key sequence
     (XML), render engine and
         Screen capture



        Result Verification
        (manual, only once)



    Replay keyboard simulation,
    Screen capture and Image
            comparison



                        17        This material is for training purpose only.
                                  No duplication without consent of Sigma-RT is permitted.
Pick the Tool is just beginning
万里长征第一步



               18    This material is for training purpose only.
                     No duplication without consent of Sigma-RT is permitted.
Agenda


∗   Realize when you need automation
∗   Always remember the goal
∗   Find the way to control your product
∗   API design
∗   Define the development process
∗   Script Quality
∗   Do I need an automation framework?
∗   Define the execution process
∗   Team management
∗   Equipment management
                               19          This material is for training purpose only.
                                           No duplication without consent of Sigma-RT is permitted.
API Design


∗ Lessons learned: API (Library) design is key for
  ∗   Productivity
  ∗   Modularity
  ∗   Maintainability
  ∗   Expansion
∗ Don’t start with programming, start with API design
∗ 磨刀不误砍柴工 – It is true…


                            20         This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
API Design


∗ Design pattern or other OO technique apply
∗ Need senior software architect blessing
∗ More design brain storming sessions, more reviews,
  the better.
∗ Spend more time on the API design, it will pay off in
  the long run



                            21         This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
API Principle
       Scripts




        API




   Control Library




        22           This material is for training purpose only.
                     No duplication without consent of Sigma-RT is permitted.
API Design - Principle

•Connect to Device         Device_id = connect_to_device();
      ∗ Script only contains testing actions, no software
•Issue XXX command to send Status = Send_SMS(device_id, $string);
         independent info
SMS messages
                           Assert($status);
•Verify messages have been
                           Status = Get_SMS(sent, $string)
sent successfully
                           Assert($status)
•Verify messages saved in
the SMS sent folder        Status = delete_SMS(sent,$string);
•Delete message            Assert($status)
•Verify message has been
deleted

                                  23         This material is for training purpose only.
                                             No duplication without consent of Sigma-RT is permitted.
API User Manual

∗ Most important document for script development

API 名称

描述

输入参数           参数 1
               参数 2
               参数 3
返回值

使用举例


                                        This material is for training purpose only.
                                        No duplication without consent of Sigma-RT is permitted.
                                                                                                   24
Agenda


∗   Realize when you need automation
∗   Always remember the goal
∗   Find the way to control your product
∗   API design
∗   Define the development process
∗   Script Quality
∗   Do I need an automation framework?
∗   Define the execution process
∗   Team management
∗   Equipment management
                               25          This material is for training purpose only.
                                           No duplication without consent of Sigma-RT is permitted.
Script Development Process



      ×Ô¶¯»¯½Å±¾¿ª·¢Á÷
            ³Ì²Î¿¼




             26     This material is for training purpose only.
                    No duplication without consent of Sigma-RT is permitted.
Define Script Quality


∗ All common development coding standard applies
  ∗   Version control
  ∗   Standard template
  ∗   Standard header
  ∗   20% of the code is comments
  ∗   Well indented
  ∗   Use API and functions
  ∗   Enough error checking

                              27    This material is for training purpose only.
                                    No duplication without consent of Sigma-RT is permitted.
Agenda


∗   Realize when you need automation
∗   Always remember the goal
∗   Find the way to control your product
∗   API design
∗   Define the development process
∗   Script Quality
∗   Do I need an automation framework?
∗   Define the execution process
∗   Team management           28       This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
Define Script Quality


∗ Testing script has it own quality too
  ∗ Exactly match the manual testing steps
  ∗ Just by reading logs, we know exactly what scripts are
    trying to do
  ∗ Device and hardware/software environment independent
  ∗ Enough debugging message when test case failed
  ∗ Clean out environment before exit or before execution



                            29            This material is for training purpose only.
                                          No duplication without consent of Sigma-RT is permitted.
Script Quality Checklist


Sigma Script Quality         Others Script
                            Quality Checklist
        Checklist




                       30    This material is for training purpose only.
                             No duplication without consent of Sigma-RT is permitted.
Agenda


∗   Realize when you need automation
∗   Always remember the goal
∗   Find the way to control your product
∗   API design
∗   Define the development process
∗   Script Quality
∗   Do I need an automation framework?
∗   Define the execution process
∗   Team management           31       This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
Automation Framework ?


∗ Always remember our goal
∗ You need at least an execution engine for
  ∗ Error resuming batch run
  ∗ Report generation




                               32    This material is for training purpose only.
                                     No duplication without consent of Sigma-RT is permitted.
Automation Framework


∗ Want to design and implement an Automation
  Framework?
∗ Checkout

 <<Automation Framework: Design and
 Implementation>>




                         33       This material is for training purpose only.
                                  No duplication without consent of Sigma-RT is permitted.
Agenda


∗   Realize when you need automation
∗   Always remember the goal
∗   Find the way to control your product
∗   API design
∗   Define the development process
∗   Script Quality
∗   Do I need an automation framework?
∗   Define the execution process
∗   Team management           34       This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
Execution Process

Always remember the goal




             35   This material is for training purpose only.
                  No duplication without consent of Sigma-RT is permitted.
Execution Process


∗   Image upgrade process
∗   Parallel execution
∗   Total run time
∗   Debugging time
∗   Report collection and generation




                            36         This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
Image upgrade process


∗ Where to get the image
∗ Can you automatically get the image and upgrade to
  your product
∗ Call this a “clean” procedure




                          37        This material is for training purpose only.
                                    No duplication without consent of Sigma-RT is permitted.
Parallel execution


∗ To save total run time – sometimes even automation
  is too long
∗ This is where the script need to be environment
  independent
∗ Be aware on the equipment cost issue
∗ How many parallel scripts can an engineer run and
  manage (also equipments)


                          38        This material is for training purpose only.
                                    No duplication without consent of Sigma-RT is permitted.
Run Time


∗ Total run time per engineer
∗ Total Debugging time per engineer
∗ Total reporting time per engineer




                          39          This material is for training purpose only.
                                      No duplication without consent of Sigma-RT is permitted.
Report collection and generation


 ∗ If it is parallel, need a process to parallel report
   collection and generation
 ∗ Testing Information Database?
 ∗ Web Interface?




                               40          This material is for training purpose only.
                                           No duplication without consent of Sigma-RT is permitted.
Agenda


∗   Realize when you need automation
∗   Always remember the goal
∗   Find the way to control your product
∗   API design
∗   Define the development process
∗   Script Quality
∗   Do I need an automation framework?
∗   Define the execution process
∗   Team management           41       This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
Team Management


∗   Who write the scripts?
∗   Who write the framework
∗   Who execute the scripts
∗   Are they happy




                          42   This material is for training purpose only.
                               No duplication without consent of Sigma-RT is permitted.
Who Write Scripts


∗ Whoever write the test plan, write the test scripts
  ∗ Knows test case the best
  ∗ Not professional coder
  ∗ Hard for project management
∗ Professional scripter
  ∗ Need to understand the test case first
  ∗ High productivity
  ∗ Good Quality
                            43         This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
Who Write Framework


∗ Or any other testing related tools
∗ If a tester develop a great testing tool, who maintains
  it?
∗ Who to coordinate the common share library
  development
∗ Who to develop testing tools if there is a request
∗ Most of the time developer does this.
∗ If have resources, think about a Tools Team
                            44         This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
Who Execute the Scripts


∗ Whoever write the scripts, execute the scripts
  ∗ Low productivity
  ∗ Bad script portability
  ∗ Unpredictable schedule (bad for scheduled release)
∗ Dedicated resources (professional executer)
  ∗ Streamline resources
  ∗ High productivity
  ∗ Fixed total run time
  ∗ Most modern companies do it this way
                          45           This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
Interaction process


∗ Test cases writer and professional scripter
∗ Scripter and executer




                            46         This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
Case Writer and Scripter


∗ Repeatable test cases




                          47   This material is for training purpose only.
                               No duplication without consent of Sigma-RT is permitted.
Scripter and Runner


∗ Script integration process
  ∗ Newly develop scripts submit to runner
  ∗ Use “State” to manage
∗ Script maintenance process
  ∗ New image change
  ∗ Use “State” to manage



                            48         This material is for training purpose only.
                                       No duplication without consent of Sigma-RT is permitted.
Team Building


∗   Manual tester, scripter are doing creative things
∗   Script runner may be board
∗   Role rotation
∗   Clear role for a clear career path




                              49         This material is for training purpose only.
                                         No duplication without consent of Sigma-RT is permitted.
Streamlining the team


脚本开发   脚本开发        脚本开发                       脚本开发
       脚本执行        脚本执行                       脚本执行




              50     This material is for training purpose only.
                     No duplication without consent of Sigma-RT is permitted.
The Goal


∗ No matter manual or auto
                  Accurate
                  Testing Report




                         51   This material is for training purpose only.
                              No duplication without consent of Sigma-RT is permitted.
Automation   from start to finish

Más contenido relacionado

Similar a Automation from start to finish

Advanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsAdvanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsRogue Wave Software
 
Getting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® GraphicsGetting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® GraphicsIntel® Software
 
Programmable infrastructure with FlyScript
Programmable infrastructure with FlyScriptProgrammable infrastructure with FlyScript
Programmable infrastructure with FlyScriptRiverbed Technology
 
iSYSTEM Company and Product Overview v12.02
iSYSTEM Company and Product Overview v12.02iSYSTEM Company and Product Overview v12.02
iSYSTEM Company and Product Overview v12.02iSYSTEM AG
 
Diff between win runner vs and qtp
Diff between win runner vs and qtpDiff between win runner vs and qtp
Diff between win runner vs and qtpRamu Palanki
 
Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++Lars Thorup
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграцииSQALab
 
Movable Type 5.2 Overview at MTDDC 2012
Movable Type 5.2 Overview at MTDDC 2012Movable Type 5.2 Overview at MTDDC 2012
Movable Type 5.2 Overview at MTDDC 2012Yuji Takayama
 
LAS16-201: ART JIT in Android N
LAS16-201: ART JIT in Android NLAS16-201: ART JIT in Android N
LAS16-201: ART JIT in Android NLinaro
 
LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...
LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...
LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...LF_DPDK
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Martin Spier
 
Architecture for Massively Parallel HDL Simulations
Architecture for Massively Parallel HDL Simulations Architecture for Massively Parallel HDL Simulations
Architecture for Massively Parallel HDL Simulations DVClub
 
Hands-On: Deploy Remote Graphics Desktops for Content Production (CMP422) - A...
Hands-On: Deploy Remote Graphics Desktops for Content Production (CMP422) - A...Hands-On: Deploy Remote Graphics Desktops for Content Production (CMP422) - A...
Hands-On: Deploy Remote Graphics Desktops for Content Production (CMP422) - A...Amazon Web Services
 
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"LogeekNightUkraine
 
Performance Test Automation With Gatling
Performance Test Automation  With GatlingPerformance Test Automation  With Gatling
Performance Test Automation With GatlingKnoldus Inc.
 

Similar a Automation from start to finish (20)

Advanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsAdvanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applications
 
Getting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® GraphicsGetting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® Graphics
 
Programmable infrastructure with FlyScript
Programmable infrastructure with FlyScriptProgrammable infrastructure with FlyScript
Programmable infrastructure with FlyScript
 
iSYSTEM Company and Product Overview v12.02
iSYSTEM Company and Product Overview v12.02iSYSTEM Company and Product Overview v12.02
iSYSTEM Company and Product Overview v12.02
 
Diff between win runner vs and qtp
Diff between win runner vs and qtpDiff between win runner vs and qtp
Diff between win runner vs and qtp
 
1.qtp basics
1.qtp basics1.qtp basics
1.qtp basics
 
Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграции
 
Movable Type 5.2 Overview at MTDDC 2012
Movable Type 5.2 Overview at MTDDC 2012Movable Type 5.2 Overview at MTDDC 2012
Movable Type 5.2 Overview at MTDDC 2012
 
Qtp basic
Qtp basicQtp basic
Qtp basic
 
LAS16-201: ART JIT in Android N
LAS16-201: ART JIT in Android NLAS16-201: ART JIT in Android N
LAS16-201: ART JIT in Android N
 
LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...
LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...
LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...
 
Pcp
PcpPcp
Pcp
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
 
Architecture for Massively Parallel HDL Simulations
Architecture for Massively Parallel HDL Simulations Architecture for Massively Parallel HDL Simulations
Architecture for Massively Parallel HDL Simulations
 
Hands-On: Deploy Remote Graphics Desktops for Content Production (CMP422) - A...
Hands-On: Deploy Remote Graphics Desktops for Content Production (CMP422) - A...Hands-On: Deploy Remote Graphics Desktops for Content Production (CMP422) - A...
Hands-On: Deploy Remote Graphics Desktops for Content Production (CMP422) - A...
 
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
 
Gatling
Gatling Gatling
Gatling
 
Performance Test Automation With Gatling
Performance Test Automation  With GatlingPerformance Test Automation  With Gatling
Performance Test Automation With Gatling
 

Más de gaoliang641

Why we didn't catch that
Why we didn't catch thatWhy we didn't catch that
Why we didn't catch thatgaoliang641
 
Why we didn't catch that application bugs
Why we didn't catch that   application bugsWhy we didn't catch that   application bugs
Why we didn't catch that application bugsgaoliang641
 
Understand release engineering
Understand release engineeringUnderstand release engineering
Understand release engineeringgaoliang641
 
Understand regression testing
Understand regression testingUnderstand regression testing
Understand regression testinggaoliang641
 
The art of system and solution testing
The art of system and solution testingThe art of system and solution testing
The art of system and solution testinggaoliang641
 
Tester performance evaluation
Tester performance evaluationTester performance evaluation
Tester performance evaluationgaoliang641
 
Tester developer interaction
Tester developer interactionTester developer interaction
Tester developer interactiongaoliang641
 
Tester career path
Tester career pathTester career path
Tester career pathgaoliang641
 
Agile testing for large projects
Agile testing for large projectsAgile testing for large projects
Agile testing for large projectsgaoliang641
 
Project management for qa manager
Project management for qa managerProject management for qa manager
Project management for qa managergaoliang641
 
Make good use of explortary testing
Make good use of explortary testingMake good use of explortary testing
Make good use of explortary testinggaoliang641
 
Bug best practice
Bug best practiceBug best practice
Bug best practicegaoliang641
 
Lessons learned on localization testing
Lessons learned on localization testingLessons learned on localization testing
Lessons learned on localization testinggaoliang641
 
Lessons learned on software testing automation
Lessons learned on software testing automationLessons learned on software testing automation
Lessons learned on software testing automationgaoliang641
 
How to become a testing expert
How to become a testing expertHow to become a testing expert
How to become a testing expertgaoliang641
 
Functionality testing techniqu
Functionality testing techniquFunctionality testing techniqu
Functionality testing techniqugaoliang641
 
Protocol Security Testing best practice
Protocol Security Testing best practiceProtocol Security Testing best practice
Protocol Security Testing best practicegaoliang641
 
Backward thinking design qa system for quality goals
Backward thinking   design qa system for quality goalsBackward thinking   design qa system for quality goals
Backward thinking design qa system for quality goalsgaoliang641
 
Agile testing for large projects
Agile testing for large projectsAgile testing for large projects
Agile testing for large projectsgaoliang641
 

Más de gaoliang641 (19)

Why we didn't catch that
Why we didn't catch thatWhy we didn't catch that
Why we didn't catch that
 
Why we didn't catch that application bugs
Why we didn't catch that   application bugsWhy we didn't catch that   application bugs
Why we didn't catch that application bugs
 
Understand release engineering
Understand release engineeringUnderstand release engineering
Understand release engineering
 
Understand regression testing
Understand regression testingUnderstand regression testing
Understand regression testing
 
The art of system and solution testing
The art of system and solution testingThe art of system and solution testing
The art of system and solution testing
 
Tester performance evaluation
Tester performance evaluationTester performance evaluation
Tester performance evaluation
 
Tester developer interaction
Tester developer interactionTester developer interaction
Tester developer interaction
 
Tester career path
Tester career pathTester career path
Tester career path
 
Agile testing for large projects
Agile testing for large projectsAgile testing for large projects
Agile testing for large projects
 
Project management for qa manager
Project management for qa managerProject management for qa manager
Project management for qa manager
 
Make good use of explortary testing
Make good use of explortary testingMake good use of explortary testing
Make good use of explortary testing
 
Bug best practice
Bug best practiceBug best practice
Bug best practice
 
Lessons learned on localization testing
Lessons learned on localization testingLessons learned on localization testing
Lessons learned on localization testing
 
Lessons learned on software testing automation
Lessons learned on software testing automationLessons learned on software testing automation
Lessons learned on software testing automation
 
How to become a testing expert
How to become a testing expertHow to become a testing expert
How to become a testing expert
 
Functionality testing techniqu
Functionality testing techniquFunctionality testing techniqu
Functionality testing techniqu
 
Protocol Security Testing best practice
Protocol Security Testing best practiceProtocol Security Testing best practice
Protocol Security Testing best practice
 
Backward thinking design qa system for quality goals
Backward thinking   design qa system for quality goalsBackward thinking   design qa system for quality goals
Backward thinking design qa system for quality goals
 
Agile testing for large projects
Agile testing for large projectsAgile testing for large projects
Agile testing for large projects
 

Automation from start to finish

  • 1. Testing Automation From Start to Finish Liang Gao
  • 2. Testing Automation Attribute: 贵 expensive 2 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 3. Testing Automation Attribute: 冰山 iceberg 3 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 4. Agenda ∗ Realize when you need automation ∗ Always remember the goal ∗ Find the way to control your product ∗ API design ∗ Define the development process ∗ Script Quality ∗ Do I need an automation framework? ∗ Define the execution process ∗ Team management ∗ Equipment management 4 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 5. Automation is useful for…. ∗ Frequently functionality regression testing ∗ Sample based performance testing ∗ Repetitive work for system and solution testing 5 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 6. Frequently functionality regression testing ∗ Faster turnaround ∗ Reduce human errors ∗ Cost saving 6 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 7. Sample based performance testing 7 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 8. system and solution testing ∗ Semi-automation ∗ Configure 1000 VPN tunnels ∗ Create 10000 routing table entries ∗ ….. 8 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 9. Agenda ∗ Realize when you need automation ∗ Always remember the goal ∗ Find the way to control your product ∗ API design ∗ Define the development process ∗ Script Quality ∗ Do I need an automation framework? ∗ Define the execution process ∗ Team management ∗ Equipment management 9 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 10. The Goal ∗ No matter manual or auto Accurate Testing Report 10 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 11. Agenda ∗ Realize when you need automation ∗ Always remember the goal ∗ Find the way to control your product ∗ API design ∗ Define the development process ∗ Script Quality ∗ Do I need an automation framework? ∗ Define the execution process ∗ Team management ∗ Equipment management 11 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 12. Remote Control Your Products Personal Computer Web Browser Truck Tablet Video Printer Camera Telecommuter House with Web Server Router Video Refrigerator Phone Television Woman - End User Scanner Television - Closed-circuit Weather Station Woman - Set Top Box Sitting (STB) 12 Tunnel This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 13. Remote Control Your Testing ∗ 2 ways of software manual testing (or Device Control) ∗ Mouse and Eye (expectation) ∗ Keyboard and Eye (expectation) ∗ Automation is to repeat ∗ Mouse and Eye – GUI automation ∗ Keyboard and Eye – CLI automation 13 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 14. GUI Automation ∗ Windows based GUI automation ∗ AutoIT ∗ Browser based GUI automation ∗ QTP ∗ WinRunner ∗ Silktest ∗ AutoIT ∗ Selenium 14 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 15. CLI Automation ∗ Expect ∗ TCL Expect ∗ Perl Expect ∗ Python Expect 15 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 16. Embedded devices State of the Union ∗ Most network devices (network equipment) ∗ Management interface: Browser or console ∗ Mobile devices ∗ Keyboard simulation ∗ Serial port, USB port or Bluetooth 16 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 17. A Sigma Approach (in progress) Keyboard simulation, predefined key sequence (XML), render engine and Screen capture Result Verification (manual, only once) Replay keyboard simulation, Screen capture and Image comparison 17 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 18. Pick the Tool is just beginning 万里长征第一步 18 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 19. Agenda ∗ Realize when you need automation ∗ Always remember the goal ∗ Find the way to control your product ∗ API design ∗ Define the development process ∗ Script Quality ∗ Do I need an automation framework? ∗ Define the execution process ∗ Team management ∗ Equipment management 19 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 20. API Design ∗ Lessons learned: API (Library) design is key for ∗ Productivity ∗ Modularity ∗ Maintainability ∗ Expansion ∗ Don’t start with programming, start with API design ∗ 磨刀不误砍柴工 – It is true… 20 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 21. API Design ∗ Design pattern or other OO technique apply ∗ Need senior software architect blessing ∗ More design brain storming sessions, more reviews, the better. ∗ Spend more time on the API design, it will pay off in the long run 21 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 22. API Principle Scripts API Control Library 22 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 23. API Design - Principle •Connect to Device Device_id = connect_to_device(); ∗ Script only contains testing actions, no software •Issue XXX command to send Status = Send_SMS(device_id, $string); independent info SMS messages Assert($status); •Verify messages have been Status = Get_SMS(sent, $string) sent successfully Assert($status) •Verify messages saved in the SMS sent folder Status = delete_SMS(sent,$string); •Delete message Assert($status) •Verify message has been deleted 23 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 24. API User Manual ∗ Most important document for script development API 名称 描述 输入参数 参数 1 参数 2 参数 3 返回值 使用举例 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted. 24
  • 25. Agenda ∗ Realize when you need automation ∗ Always remember the goal ∗ Find the way to control your product ∗ API design ∗ Define the development process ∗ Script Quality ∗ Do I need an automation framework? ∗ Define the execution process ∗ Team management ∗ Equipment management 25 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 26. Script Development Process ×Ô¶¯»¯½Å±¾¿ª·¢Á÷ ³Ì²Î¿¼ 26 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 27. Define Script Quality ∗ All common development coding standard applies ∗ Version control ∗ Standard template ∗ Standard header ∗ 20% of the code is comments ∗ Well indented ∗ Use API and functions ∗ Enough error checking 27 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 28. Agenda ∗ Realize when you need automation ∗ Always remember the goal ∗ Find the way to control your product ∗ API design ∗ Define the development process ∗ Script Quality ∗ Do I need an automation framework? ∗ Define the execution process ∗ Team management 28 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 29. Define Script Quality ∗ Testing script has it own quality too ∗ Exactly match the manual testing steps ∗ Just by reading logs, we know exactly what scripts are trying to do ∗ Device and hardware/software environment independent ∗ Enough debugging message when test case failed ∗ Clean out environment before exit or before execution 29 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 30. Script Quality Checklist Sigma Script Quality Others Script Quality Checklist Checklist 30 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 31. Agenda ∗ Realize when you need automation ∗ Always remember the goal ∗ Find the way to control your product ∗ API design ∗ Define the development process ∗ Script Quality ∗ Do I need an automation framework? ∗ Define the execution process ∗ Team management 31 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 32. Automation Framework ? ∗ Always remember our goal ∗ You need at least an execution engine for ∗ Error resuming batch run ∗ Report generation 32 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 33. Automation Framework ∗ Want to design and implement an Automation Framework? ∗ Checkout <<Automation Framework: Design and Implementation>> 33 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 34. Agenda ∗ Realize when you need automation ∗ Always remember the goal ∗ Find the way to control your product ∗ API design ∗ Define the development process ∗ Script Quality ∗ Do I need an automation framework? ∗ Define the execution process ∗ Team management 34 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 35. Execution Process Always remember the goal 35 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 36. Execution Process ∗ Image upgrade process ∗ Parallel execution ∗ Total run time ∗ Debugging time ∗ Report collection and generation 36 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 37. Image upgrade process ∗ Where to get the image ∗ Can you automatically get the image and upgrade to your product ∗ Call this a “clean” procedure 37 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 38. Parallel execution ∗ To save total run time – sometimes even automation is too long ∗ This is where the script need to be environment independent ∗ Be aware on the equipment cost issue ∗ How many parallel scripts can an engineer run and manage (also equipments) 38 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 39. Run Time ∗ Total run time per engineer ∗ Total Debugging time per engineer ∗ Total reporting time per engineer 39 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 40. Report collection and generation ∗ If it is parallel, need a process to parallel report collection and generation ∗ Testing Information Database? ∗ Web Interface? 40 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 41. Agenda ∗ Realize when you need automation ∗ Always remember the goal ∗ Find the way to control your product ∗ API design ∗ Define the development process ∗ Script Quality ∗ Do I need an automation framework? ∗ Define the execution process ∗ Team management 41 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 42. Team Management ∗ Who write the scripts? ∗ Who write the framework ∗ Who execute the scripts ∗ Are they happy 42 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 43. Who Write Scripts ∗ Whoever write the test plan, write the test scripts ∗ Knows test case the best ∗ Not professional coder ∗ Hard for project management ∗ Professional scripter ∗ Need to understand the test case first ∗ High productivity ∗ Good Quality 43 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 44. Who Write Framework ∗ Or any other testing related tools ∗ If a tester develop a great testing tool, who maintains it? ∗ Who to coordinate the common share library development ∗ Who to develop testing tools if there is a request ∗ Most of the time developer does this. ∗ If have resources, think about a Tools Team 44 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 45. Who Execute the Scripts ∗ Whoever write the scripts, execute the scripts ∗ Low productivity ∗ Bad script portability ∗ Unpredictable schedule (bad for scheduled release) ∗ Dedicated resources (professional executer) ∗ Streamline resources ∗ High productivity ∗ Fixed total run time ∗ Most modern companies do it this way 45 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 46. Interaction process ∗ Test cases writer and professional scripter ∗ Scripter and executer 46 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 47. Case Writer and Scripter ∗ Repeatable test cases 47 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 48. Scripter and Runner ∗ Script integration process ∗ Newly develop scripts submit to runner ∗ Use “State” to manage ∗ Script maintenance process ∗ New image change ∗ Use “State” to manage 48 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 49. Team Building ∗ Manual tester, scripter are doing creative things ∗ Script runner may be board ∗ Role rotation ∗ Clear role for a clear career path 49 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 50. Streamlining the team 脚本开发 脚本开发 脚本开发 脚本开发 脚本执行 脚本执行 脚本执行 50 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.
  • 51. The Goal ∗ No matter manual or auto Accurate Testing Report 51 This material is for training purpose only. No duplication without consent of Sigma-RT is permitted.

Notas del editor

  1. Use Huawei high level wrapper (10 times productivity increase) as example
  2. Use Huawei high level wrapper (10 times productivity increase) as example
  3. Use Huawei high level wrapper (10 times productivity increase) as example
  4. Use Huawei high level wrapper (10 times productivity increase) as example