SlideShare uma empresa Scribd logo
1 de 42
CHAPTER 10
    An Introduction to
Automated Software Testing
CHAPTER 10
                                              OUTLINE
•    What is Test Automation?
•    The Benefits and Pitfalls of Test Automation
•    When to Use Test Automation
•    Test Automation Production Process
•    The Evolution of Test Automation
CHAPTER 10
                                  OBJECTIVES
• Present an overview of test automation engineering
• Understand the pros and cons of test automation
• Test automation strategies, tactics and implementation
An Introduction to
 CHAPTER 10.1                 Automated Testing
10.1 What is Test Automation?
10.2 The Benefits and Pitfalls of Test Automation
10.3 When to Use Test Automation
10.4 Test Automation Production Process
10.5 The Evolution of Test Automation
What is Test Automation?
 CHAPTER 10.1

• Using computer time to execute of tests.
• Commonly, test automation involves automating existing and
  sometimes, new tests that otherwise, will be executed by a
  human tester
Why Automate Testing?




• People might say, “Automation will help us release a
  higher quality product on time.”
   – What does that mean?
• What’s the goal of instituting an Automation
  program?
   – What problem are we trying to solve?
Why Automate Testing?



– Not enough test time in schedule for repetitive tasks
– Very repetitive tasks
– Too many releases to test
– Better use of qualified in-house testing resources
– Reduce cost of testers
– Can’t test manually
– Optimize tester time because there is not enough time for
  mundane tests
– Human tester can focus on testing that requires complex analysis
– Save money
– Save time
Why Automate Testing?




– If I automate testing, what manual testing will I lose? How
  many bugs might I lose and when?

  Remember: Bugs are more expensive to fix later.
Why Automate Testing?



– Often, if the manual test team also does automation, it is the best
  or most technically talented testers who script.
   – The early part of application testing is when the most talented testers are
     needed.
• This is particularly true with script maintenance. Some talented
  person on the main product team is often in charge of maintaining
  the automation project.
   – Will we lose finding good early bugs because of this?
– Testing cannot be an “on the side” job. You can’t write good
  scripts while you wait to get a build or have spare time!
Goal of Automation

Sometimes, the goal of a test automation program can be
Good-Enough Automation. Just like with the products we sell,
quality is a combination of reliability, features and timeliness.
If your goal of automation is tightening the testing cycle. AND
you can also improve the test battery, you have done a good
job.
Manual vs.
CHAPTER 10.1                      Automation Testing

  Manual Testing              Automation Testing

  Test execution time     Test execution time 
  Regression test coverage Regression test coverage 
  
  Responsive and flexible     Relatively inflexible

  Human variation             Machine consistency

  No maintenance needed       High maintenance needed

  Immediate dividend paid     Long-term dividend

  Not cost effective for high Not cost effective for low
  volume regression           volume regression
An Introduction to
 CHAPTER 10.2                Automated Testing
10.1 What is Test Automation?
10.2 The Benefits and Pitfalls of Test Automation
10.3 When to Use Test Automation
10.4 Test Automation Production Process
10.5 The Evolution of Test Automation
Test Automation
CHAPTER 10.2                                 Benefits
•   Run automated tests unattended (overnight)
•   Reliable, consistent repetitive testing
•   Increased speed in test execution
•   Improves quality, increased test coverage
•   Reduces costs and time for regression testing
•   Optimize the use of test resources to focus on bug findings
•   Reusable and scalable if architected effectively
•   Execution of tests that can’t be done manually
•   Performance testing to assess software stability, concurrency,
    scalability….
Test Automation
 CHAPTER 10.2                                 Pitfalls
• Uncertainty and lack of control.
• Poor scalability and maintainability.
   – Too sensitive to changes
   – Poor reusability
• Low test automation coverage
   – Too much programming
• Poor methods and disappointing quality of tests
   – Focus of tools instead production volume
   – Focus of making the tests run instead of quality of the tests
• Technology vs. people issues
   – Gaps in platform technology support
   – Gaps in human resource equipped with test automation skills
An Introduction to
 CHAPTER 10.3                 Automated Testing
10.1 What is Test Automation?
10.2 The Benefits and Pitfalls of Test Automation
10.3 When to Use Test Automation
10.4 Test Automation Production Process
10.5 The Evolution of Test Automation
Which Test Cases
CHAPTER 10.3                  Can’t be Automated?
•   Usability testing
    "How easy is the application to use?“
•   One-time testing
•   “ASAP” testing
    “We need to test NOW!”
•   Ad hoc/random testing
    Based on intuition and knowledge of application
•   Tests without predictable results
The Criteria to
CHAPTER 10.3                   Apply Test Automation
• Customer requests
• Application should be stable
• Tests that need to be run for every build of the application (sanity
  check, regression test)
• Tests that use multiple data values for the same actions (data driven
  tests)
• Tests that require detailed information from application internals
  (memory, CPU)
• Tests that require considerable amount of time to perform
  manually
• Stress, load or performance testing
An Introduction to
 CHAPTER 10.3                 Automated Testing
10.1 What is Test Automation?
10.2 The Benefits and Pitfalls of Test Automation
10.3 When to Use Test Automation
10.4 Test Automation Production Process
10.5 The Evolution of Test Automation
Test Automation
CHAPTER 10.4                          Production Process

                                                        Repeat steps
                 Wait for
Input user                           Check AUT          until all to-be-
                 processing to
actions                              function outputs   executed tests
                 complete
                                                        are completed
             1                   2                  3                      4

Manual

                 Synchronize
Generate         script playback
                                                        Run tests or
automated        to application      Add checks
                                                        suites of tests
scripts          output from
             1   each step       2                  3                      4

Automated
An Introduction to
 CHAPTER 10.5                 Automated Testing
10.1 What is Test Automation?
10.2 The Benefits and Pitfalls of Test Automation
10.3 When to Use Test Automation
10.4 Test Automation Production Process
10.5 The Evolution of Test Automation
A Brief History
CHAPTER 10.5                    of Test Automation

Software Test Automation has evolved through several generations,
with many improvements along the way:
           1st Generation: Record and Playback
           2nd Generation: Scripting
           3rd Generation: Data-driven
           4th Generation: Keyword-driven
Record & Playback
CHAPTER 10.6


 The automation tool records the steps of the user executing a
  test, and the tester configures some checks.
 The automation tool generates a script based on the recorded
  actions.
 The automation tool performs a playback of the recorded test.
 Even small changes to the application under test require manual
  re-recording of the test.
  → This first generation is neither efficient nor scalable.
Record/Playback
                                 Recorded test             • Actions
                                                           • Checks
                                    scripts

• One time recording of                               Playback
  actions and checks
• Multiple time playback
                                   Test Tool                           Log
                                  (Invisible to the
                                   target system)


                      Record                          Playback     • Actions
                                                                   • Checks
                                                                   • Results



          Test data entered by          Target
          testers or users           System/AUT
EXAMPLE
                                         A Recorded Script
select window "Logon"
enter text "username", "administrator"
enter text "password", "testonly"
push button "Ok"
select window "Main"
push button "New Customer"
expect window "Customer Information"
select field "Name"
type "Jones"
select field "First Name"
type "John"
select field "Address"
type "54321 Space Drive"
  .
  .
  .
EXAMPLE
                                       A Recorded Script
CHAPTER 10.6

•    Dependent on screen coordinates



    # Analog Recording
       move_locator_track (1);              mouse movement
       mtype ("<T55> <kLeft>-<kLeft>+");    mouse click
       type ("<t3>output14" );
       move_locator_track (2);
       mtype ("<T35><kLeft>-<kLeft>+");


                                            output14
      enter text    pause before
      from          mouse click
      keyboard
R/P Pros and Cons
• Pros
  – A useful way to learn about the testing tool and
    automation
• Cons
  – High maintenance cost dealing with changes in the target
    system of AUT
  – Poor accessibility to test cases
  – Greatly affected by the working system or environment
  – Only suitable for GUI systems
Scripting Approach
•   Automation is regarded as a programming activity
•   Parameterize hard-coded values
•   Separate data from code by moving variables to include files
•   Create utility functions to be shared
•   Produce and maintain like any other software
•   Train black-box test engineers to run the scripts
Scripting Approach
• Pros
  – Reusability of scripts for common tasks
  – Improved maintainability
• Cons
  – Poor accessibility to test cases because tests are
    programmed or scripted
  – Greatly affected by a working system or environment
  – Test implementation must be done by programmers
  – Translation of test cases—3000 tests mean 3000
    automated scripts
  – Manageability is still an issue due lack of visibility
EXAMPLE
Function EnterCustomerJones
     Logon
     Press "New Customer"
     Enter Field "Name", "Jones"
     Enter Field "First Name", "John"
     Enter Field "Address", "54321 Space Drive"
     ...
     Logoff
End Function

Function OrderProduct
     Logon
     Press "New Order"
     Enter Field "Product", “OurProduct 1.0"
     Enter Field "Amount", "35"
     Enter Field "Delivery", "asap"
     ...
     LogOff
End Function

...
Scripting –
                    Example Script
CHAPTER 10.6


Silk Test Script:
(Scripting) Data-Driven
                                   Approach
• Take advantage of tester’s familiarity with test case design and
  creation using tables and matrices
• Accommodate localization projects
• Recognize the importance of patterns in test cases
• Enable testers to catalog test cases with spreadsheets in
  software such as Excel
• Enable testers to specify expected results in spreadsheets
EXAMPLE

      GOODMORNING




                    goodmorning




                                  GoodMorning
Input Data
EXAMPLE
 • File with test data:             • Text file used in the test:
nr case whole   pattern   matches
                                     goodmorning
 1 off   off GOODMORNING     4
 2 off   on GOODMORNING      3
                                     GOODMORNING
 3 on    off GOODMORNING     1       GoodMorning
 4 on    on GOODMORNING      1       GoodMorningVietnam
 5 off   off  goodmorning    4
 6 off   on   goodmorning    3      • Data driven script:
 7 on    off  goodmorning    1        for each line in the file do
 8 on    on   goodmorning    1          open the find dialog
 9 off   off  GoodMorning    4          read a line from the file
10 off   on   GoodMorning    3          use the values to fill dialog
11 on    off  GoodMorning    2          press find button
12 on    on   GoodMorning    1          check amount of matches
                                        close the dialog
(Scripting) Data-Driven
                                    Approach
• Pros
  – Separation of action and data enables tests to receive
    combinations of test data
  – Test data can be stored in a separate file or spreadsheet for better
    maintainability
  – Improved reusability and maintainability
• Cons
  – Actions containing business logic are in automated scripts
  – Maintainability of changes in business logics as well as interface is
    still poor
  – Poor visibility because accessibility to the tests is still poor
  – Not scalable (e.g., reaching 95% of automation)
Test Automation
                                          Challenges

•   Too much programming
•   Response to rate of changes (software)
•   Low reusability/scalability
•   Too many platforms/technologies
•   Too expensive if the returned value is low
Keyword-driven
CHAPTER 10.6


 Tests are broken down into a series of actions representing the
  business processes of the SUT, such as ‘enter client’, ‘transfer’, and
  ‘check balance’.
 Individual actions are automated, not the tests.
 The tests are stored externally from the test scripts, typically in a
  spreadsheet.
 Keyword-based test automation’s elegant, structured approach
  simplifies the work even further, reducing the time and expense of test
  design, automation, and execution by allowing team members to focus
  on their areas of individual expertise.
 Non-technical testers and business analysts can develop executable
  test automation from keywords representing recognizable end-user
  actions.
How Does ABT
                                      (Action-keyword) Work?

      Test Cases are written or described through a series of Test Lines using
       parameterized and reusable Action keywords
                                                   Action’s Parameters

Action keyword                            Number                         Name     Description
Test Line            add product          12345678                       Hammer   For pounding nails



      Actions are created and communicate with target systems and software
       applications including the application under test (AUT) through one or more
       supported Interfaces to carry out intended tasks
                 Note:
                 For now, think of an Action as a verb or something that you do
      Information about Interfaces such as Windows, Web or Java graphical user
       interface (GUI) or command-line interface (CLM) are later defined to enable
       actions to send inputs to and receive outputs from the target system and/or
       AUT
Overcome Challenges w/ Action Based Testing




•   Separation of action, interface, logic and data
•   Test data can go in a separate file or spreadsheet
•   Test logic can go in a separate file or spreadsheet
•   Interface can go in a separate file or spreadsheet
•   Action can also go in a separate file or spreadsheet
•   Action can be reused
Automation Approach
                                 Comparison
CHAPTER 10.6

                                    Workload Allocation
    Approach                                            Test Data
                     Automation       Test Case
                                                       Construction /
                     Engineering      Production
                                                         Selection
    Record &
                          N/A         Test Engineer            N/A
    Playback
                       Automation      Automation
     Scripting          Engineer        Engineer
                                                               N/A

                       Automation      Automation
   Data-driven          Engineer        Engineer
                                                        Test Engineer

                       Automation
 Keyword-driven         Engineer
                                      Test Engineer     Test Engineer

 Note: Programming skill is required for Automation Engineer
Examples of Test
 CHAPTER 10.6                                  Automation Tools
LogiGear is the producer of TestArchitect™, a functional automated testing tool
designed to help achieve the most efficiency out of action-keyword test
automation. Examples of other commercial tool vendors include:
 Automation                HP                  IBM                Others
    Tool
Functional          WinRunner         Functional Tester       SilkTest
                    QuickTestPro      Rational Robot          TestPartner
                                                              TestComplete
Performance         LoadRunner        Performance Tester      SilkPerformer
                    AstraLoad Test                            WebLoad
                                                              OpenSTA
Management          Test Director     Rational TestManager SilkCentral Test
                    Quality Center                         Manager
Memory                                Purify                  JProbe Profiler
CHAPTER 10
                                         SUMMARY
• Test Automation is a method that uses of software to control
  the execution of tests.
• Commonly, test automation involves automating a manual
  process currently in.
• Test Automation has benefits such as…However, it still has
  some pitfalls such as…
• A effective strategy of test automation includes several steps…
• There are many popular automation tools. Depend on the
  AUT, we choose the suitable automation testing tool.
CHAPTER 10
                                                  QUIZ
• What are the advantages and disadvantages of test
  automation?
• What are the advantages and disadvantages of test
  automation generations?

Mais conteúdo relacionado

Mais procurados

Testing using load runner performance testing
Testing using load runner  performance testingTesting using load runner  performance testing
Testing using load runner performance testing
SivaprasanthRentala1975
 
Automation Framework/QTP Framework
Automation Framework/QTP FrameworkAutomation Framework/QTP Framework
Automation Framework/QTP Framework
HeyDay Software Solutions
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
Quontra Solutions
 

Mais procurados (20)

Automated vs manual testing
Automated vs manual testingAutomated vs manual testing
Automated vs manual testing
 
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
 
Automation Concepts
Automation ConceptsAutomation Concepts
Automation Concepts
 
Agile testing - Principles and best practices
Agile testing  - Principles and best practicesAgile testing  - Principles and best practices
Agile testing - Principles and best practices
 
Test automation engineer
Test automation engineerTest automation engineer
Test automation engineer
 
ALM Summit 3 - Setting up a Continuous Delivery Deployment Pipeline with TFS
ALM Summit 3 - Setting up a Continuous Delivery Deployment Pipeline with TFSALM Summit 3 - Setting up a Continuous Delivery Deployment Pipeline with TFS
ALM Summit 3 - Setting up a Continuous Delivery Deployment Pipeline with TFS
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Automation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabadAutomation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabad
 
Learning's from mobile testing
Learning's from mobile testingLearning's from mobile testing
Learning's from mobile testing
 
Automation Testing Project and Framework Details
Automation Testing Project and Framework DetailsAutomation Testing Project and Framework Details
Automation Testing Project and Framework Details
 
Demo1ghjkl
Demo1ghjklDemo1ghjkl
Demo1ghjkl
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automation
 
Testing Tools
Testing ToolsTesting Tools
Testing Tools
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
Testing using load runner performance testing
Testing using load runner  performance testingTesting using load runner  performance testing
Testing using load runner performance testing
 
Automation Framework/QTP Framework
Automation Framework/QTP FrameworkAutomation Framework/QTP Framework
Automation Framework/QTP Framework
 
Selenium RC, Selenium WebDriver and HP LoadRunner
Selenium RC, Selenium WebDriver and HP LoadRunnerSelenium RC, Selenium WebDriver and HP LoadRunner
Selenium RC, Selenium WebDriver and HP LoadRunner
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
 

Destaque

How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy
Impetus Technologies
 

Destaque (9)

10 Benefits of Automated Testing
10 Benefits of Automated Testing10 Benefits of Automated Testing
10 Benefits of Automated Testing
 
How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy
 
Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.com
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test Automation
 
Introduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and ToolsIntroduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and Tools
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated Testing
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 
Automated Testing
Automated TestingAutomated Testing
Automated Testing
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework Designs
 

Semelhante a Chapter 10

Qtp training session I
Qtp training session IQtp training session I
Qtp training session I
Aisha Mazhar
 
Automation Testing with Test Complete
Automation Testing with Test CompleteAutomation Testing with Test Complete
Automation Testing with Test Complete
Vartika Saxena
 
Automated testing
Automated testingAutomated testing
Automated testing
s0194975
 

Semelhante a Chapter 10 (20)

Module 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbs
Module 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbsModule 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbs
Module 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbs
 
Qtp training session I
Qtp training session IQtp training session I
Qtp training session I
 
How to make Automation an asset for Organization
How to make Automation an asset for OrganizationHow to make Automation an asset for Organization
How to make Automation an asset for Organization
 
What Do We Automate First
What Do We Automate FirstWhat Do We Automate First
What Do We Automate First
 
Automation Testing with Test Complete
Automation Testing with Test CompleteAutomation Testing with Test Complete
Automation Testing with Test Complete
 
Automated testing
Automated testingAutomated testing
Automated testing
 
E2 e test with testcafe
E2 e test with testcafeE2 e test with testcafe
E2 e test with testcafe
 
When is software test automation worth it?
When is software test automation worth it?When is software test automation worth it?
When is software test automation worth it?
 
Test automation
Test automationTest automation
Test automation
 
Automation testing interview pdf org
Automation testing interview pdf orgAutomation testing interview pdf org
Automation testing interview pdf org
 
How to Optimise Continuous Testing
How to Optimise Continuous TestingHow to Optimise Continuous Testing
How to Optimise Continuous Testing
 
Diving into the World of Test Automation The Approach and the Technologies
Diving into the World of Test Automation The Approach and the TechnologiesDiving into the World of Test Automation The Approach and the Technologies
Diving into the World of Test Automation The Approach and the Technologies
 
manual & automation testing
manual & automation testingmanual & automation testing
manual & automation testing
 
Use Jenkins For Continuous Load Testing And Mobile Test Automation
Use Jenkins For Continuous Load Testing And Mobile Test AutomationUse Jenkins For Continuous Load Testing And Mobile Test Automation
Use Jenkins For Continuous Load Testing And Mobile Test Automation
 
Automation qa
Automation qaAutomation qa
Automation qa
 
Atagg 2015 Test automation and effective continuous integration
Atagg 2015 Test automation and effective continuous integrationAtagg 2015 Test automation and effective continuous integration
Atagg 2015 Test automation and effective continuous integration
 
[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam Carmi
[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam Carmi[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam Carmi
[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam Carmi
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
An Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnitAn Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnit
 
7 steps to Software test automation success
7 steps to Software test automation success7 steps to Software test automation success
7 steps to Software test automation success
 

Último

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 

Chapter 10

  • 1. CHAPTER 10 An Introduction to Automated Software Testing
  • 2. CHAPTER 10 OUTLINE • What is Test Automation? • The Benefits and Pitfalls of Test Automation • When to Use Test Automation • Test Automation Production Process • The Evolution of Test Automation
  • 3. CHAPTER 10 OBJECTIVES • Present an overview of test automation engineering • Understand the pros and cons of test automation • Test automation strategies, tactics and implementation
  • 4. An Introduction to CHAPTER 10.1 Automated Testing 10.1 What is Test Automation? 10.2 The Benefits and Pitfalls of Test Automation 10.3 When to Use Test Automation 10.4 Test Automation Production Process 10.5 The Evolution of Test Automation
  • 5. What is Test Automation? CHAPTER 10.1 • Using computer time to execute of tests. • Commonly, test automation involves automating existing and sometimes, new tests that otherwise, will be executed by a human tester
  • 6. Why Automate Testing? • People might say, “Automation will help us release a higher quality product on time.” – What does that mean? • What’s the goal of instituting an Automation program? – What problem are we trying to solve?
  • 7. Why Automate Testing? – Not enough test time in schedule for repetitive tasks – Very repetitive tasks – Too many releases to test – Better use of qualified in-house testing resources – Reduce cost of testers – Can’t test manually – Optimize tester time because there is not enough time for mundane tests – Human tester can focus on testing that requires complex analysis – Save money – Save time
  • 8. Why Automate Testing? – If I automate testing, what manual testing will I lose? How many bugs might I lose and when? Remember: Bugs are more expensive to fix later.
  • 9. Why Automate Testing? – Often, if the manual test team also does automation, it is the best or most technically talented testers who script. – The early part of application testing is when the most talented testers are needed. • This is particularly true with script maintenance. Some talented person on the main product team is often in charge of maintaining the automation project. – Will we lose finding good early bugs because of this? – Testing cannot be an “on the side” job. You can’t write good scripts while you wait to get a build or have spare time!
  • 10. Goal of Automation Sometimes, the goal of a test automation program can be Good-Enough Automation. Just like with the products we sell, quality is a combination of reliability, features and timeliness. If your goal of automation is tightening the testing cycle. AND you can also improve the test battery, you have done a good job.
  • 11. Manual vs. CHAPTER 10.1 Automation Testing Manual Testing Automation Testing Test execution time  Test execution time  Regression test coverage Regression test coverage   Responsive and flexible Relatively inflexible Human variation Machine consistency No maintenance needed High maintenance needed Immediate dividend paid Long-term dividend Not cost effective for high Not cost effective for low volume regression volume regression
  • 12. An Introduction to CHAPTER 10.2 Automated Testing 10.1 What is Test Automation? 10.2 The Benefits and Pitfalls of Test Automation 10.3 When to Use Test Automation 10.4 Test Automation Production Process 10.5 The Evolution of Test Automation
  • 13. Test Automation CHAPTER 10.2 Benefits • Run automated tests unattended (overnight) • Reliable, consistent repetitive testing • Increased speed in test execution • Improves quality, increased test coverage • Reduces costs and time for regression testing • Optimize the use of test resources to focus on bug findings • Reusable and scalable if architected effectively • Execution of tests that can’t be done manually • Performance testing to assess software stability, concurrency, scalability….
  • 14. Test Automation CHAPTER 10.2 Pitfalls • Uncertainty and lack of control. • Poor scalability and maintainability. – Too sensitive to changes – Poor reusability • Low test automation coverage – Too much programming • Poor methods and disappointing quality of tests – Focus of tools instead production volume – Focus of making the tests run instead of quality of the tests • Technology vs. people issues – Gaps in platform technology support – Gaps in human resource equipped with test automation skills
  • 15. An Introduction to CHAPTER 10.3 Automated Testing 10.1 What is Test Automation? 10.2 The Benefits and Pitfalls of Test Automation 10.3 When to Use Test Automation 10.4 Test Automation Production Process 10.5 The Evolution of Test Automation
  • 16. Which Test Cases CHAPTER 10.3 Can’t be Automated? • Usability testing "How easy is the application to use?“ • One-time testing • “ASAP” testing “We need to test NOW!” • Ad hoc/random testing Based on intuition and knowledge of application • Tests without predictable results
  • 17. The Criteria to CHAPTER 10.3 Apply Test Automation • Customer requests • Application should be stable • Tests that need to be run for every build of the application (sanity check, regression test) • Tests that use multiple data values for the same actions (data driven tests) • Tests that require detailed information from application internals (memory, CPU) • Tests that require considerable amount of time to perform manually • Stress, load or performance testing
  • 18. An Introduction to CHAPTER 10.3 Automated Testing 10.1 What is Test Automation? 10.2 The Benefits and Pitfalls of Test Automation 10.3 When to Use Test Automation 10.4 Test Automation Production Process 10.5 The Evolution of Test Automation
  • 19. Test Automation CHAPTER 10.4 Production Process Repeat steps Wait for Input user Check AUT until all to-be- processing to actions function outputs executed tests complete are completed 1 2 3 4 Manual Synchronize Generate script playback Run tests or automated to application Add checks suites of tests scripts output from 1 each step 2 3 4 Automated
  • 20. An Introduction to CHAPTER 10.5 Automated Testing 10.1 What is Test Automation? 10.2 The Benefits and Pitfalls of Test Automation 10.3 When to Use Test Automation 10.4 Test Automation Production Process 10.5 The Evolution of Test Automation
  • 21. A Brief History CHAPTER 10.5 of Test Automation Software Test Automation has evolved through several generations, with many improvements along the way: 1st Generation: Record and Playback 2nd Generation: Scripting 3rd Generation: Data-driven 4th Generation: Keyword-driven
  • 22. Record & Playback CHAPTER 10.6  The automation tool records the steps of the user executing a test, and the tester configures some checks.  The automation tool generates a script based on the recorded actions.  The automation tool performs a playback of the recorded test.  Even small changes to the application under test require manual re-recording of the test. → This first generation is neither efficient nor scalable.
  • 23. Record/Playback Recorded test • Actions • Checks scripts • One time recording of Playback actions and checks • Multiple time playback Test Tool Log (Invisible to the target system) Record Playback • Actions • Checks • Results Test data entered by Target testers or users System/AUT
  • 24. EXAMPLE A Recorded Script select window "Logon" enter text "username", "administrator" enter text "password", "testonly" push button "Ok" select window "Main" push button "New Customer" expect window "Customer Information" select field "Name" type "Jones" select field "First Name" type "John" select field "Address" type "54321 Space Drive" . . .
  • 25. EXAMPLE A Recorded Script CHAPTER 10.6 • Dependent on screen coordinates # Analog Recording move_locator_track (1); mouse movement mtype ("<T55> <kLeft>-<kLeft>+"); mouse click type ("<t3>output14" ); move_locator_track (2); mtype ("<T35><kLeft>-<kLeft>+"); output14 enter text pause before from mouse click keyboard
  • 26. R/P Pros and Cons • Pros – A useful way to learn about the testing tool and automation • Cons – High maintenance cost dealing with changes in the target system of AUT – Poor accessibility to test cases – Greatly affected by the working system or environment – Only suitable for GUI systems
  • 27. Scripting Approach • Automation is regarded as a programming activity • Parameterize hard-coded values • Separate data from code by moving variables to include files • Create utility functions to be shared • Produce and maintain like any other software • Train black-box test engineers to run the scripts
  • 28. Scripting Approach • Pros – Reusability of scripts for common tasks – Improved maintainability • Cons – Poor accessibility to test cases because tests are programmed or scripted – Greatly affected by a working system or environment – Test implementation must be done by programmers – Translation of test cases—3000 tests mean 3000 automated scripts – Manageability is still an issue due lack of visibility
  • 29. EXAMPLE Function EnterCustomerJones Logon Press "New Customer" Enter Field "Name", "Jones" Enter Field "First Name", "John" Enter Field "Address", "54321 Space Drive" ... Logoff End Function Function OrderProduct Logon Press "New Order" Enter Field "Product", “OurProduct 1.0" Enter Field "Amount", "35" Enter Field "Delivery", "asap" ... LogOff End Function ...
  • 30. Scripting – Example Script CHAPTER 10.6 Silk Test Script:
  • 31. (Scripting) Data-Driven Approach • Take advantage of tester’s familiarity with test case design and creation using tables and matrices • Accommodate localization projects • Recognize the importance of patterns in test cases • Enable testers to catalog test cases with spreadsheets in software such as Excel • Enable testers to specify expected results in spreadsheets
  • 32. EXAMPLE GOODMORNING goodmorning GoodMorning Input Data
  • 33. EXAMPLE • File with test data: • Text file used in the test: nr case whole pattern matches goodmorning 1 off off GOODMORNING 4 2 off on GOODMORNING 3 GOODMORNING 3 on off GOODMORNING 1 GoodMorning 4 on on GOODMORNING 1 GoodMorningVietnam 5 off off goodmorning 4 6 off on goodmorning 3 • Data driven script: 7 on off goodmorning 1 for each line in the file do 8 on on goodmorning 1 open the find dialog 9 off off GoodMorning 4 read a line from the file 10 off on GoodMorning 3 use the values to fill dialog 11 on off GoodMorning 2 press find button 12 on on GoodMorning 1 check amount of matches close the dialog
  • 34. (Scripting) Data-Driven Approach • Pros – Separation of action and data enables tests to receive combinations of test data – Test data can be stored in a separate file or spreadsheet for better maintainability – Improved reusability and maintainability • Cons – Actions containing business logic are in automated scripts – Maintainability of changes in business logics as well as interface is still poor – Poor visibility because accessibility to the tests is still poor – Not scalable (e.g., reaching 95% of automation)
  • 35. Test Automation Challenges • Too much programming • Response to rate of changes (software) • Low reusability/scalability • Too many platforms/technologies • Too expensive if the returned value is low
  • 36. Keyword-driven CHAPTER 10.6  Tests are broken down into a series of actions representing the business processes of the SUT, such as ‘enter client’, ‘transfer’, and ‘check balance’.  Individual actions are automated, not the tests.  The tests are stored externally from the test scripts, typically in a spreadsheet.  Keyword-based test automation’s elegant, structured approach simplifies the work even further, reducing the time and expense of test design, automation, and execution by allowing team members to focus on their areas of individual expertise.  Non-technical testers and business analysts can develop executable test automation from keywords representing recognizable end-user actions.
  • 37. How Does ABT (Action-keyword) Work?  Test Cases are written or described through a series of Test Lines using parameterized and reusable Action keywords Action’s Parameters Action keyword Number Name Description Test Line add product 12345678 Hammer For pounding nails  Actions are created and communicate with target systems and software applications including the application under test (AUT) through one or more supported Interfaces to carry out intended tasks Note: For now, think of an Action as a verb or something that you do  Information about Interfaces such as Windows, Web or Java graphical user interface (GUI) or command-line interface (CLM) are later defined to enable actions to send inputs to and receive outputs from the target system and/or AUT
  • 38. Overcome Challenges w/ Action Based Testing • Separation of action, interface, logic and data • Test data can go in a separate file or spreadsheet • Test logic can go in a separate file or spreadsheet • Interface can go in a separate file or spreadsheet • Action can also go in a separate file or spreadsheet • Action can be reused
  • 39. Automation Approach Comparison CHAPTER 10.6 Workload Allocation Approach Test Data Automation Test Case Construction / Engineering Production Selection Record & N/A Test Engineer N/A Playback Automation Automation Scripting Engineer Engineer N/A Automation Automation Data-driven Engineer Engineer Test Engineer Automation Keyword-driven Engineer Test Engineer Test Engineer Note: Programming skill is required for Automation Engineer
  • 40. Examples of Test CHAPTER 10.6 Automation Tools LogiGear is the producer of TestArchitect™, a functional automated testing tool designed to help achieve the most efficiency out of action-keyword test automation. Examples of other commercial tool vendors include: Automation HP IBM Others Tool Functional WinRunner Functional Tester SilkTest QuickTestPro Rational Robot TestPartner TestComplete Performance LoadRunner Performance Tester SilkPerformer AstraLoad Test WebLoad OpenSTA Management Test Director Rational TestManager SilkCentral Test Quality Center Manager Memory Purify JProbe Profiler
  • 41. CHAPTER 10 SUMMARY • Test Automation is a method that uses of software to control the execution of tests. • Commonly, test automation involves automating a manual process currently in. • Test Automation has benefits such as…However, it still has some pitfalls such as… • A effective strategy of test automation includes several steps… • There are many popular automation tools. Depend on the AUT, we choose the suitable automation testing tool.
  • 42. CHAPTER 10 QUIZ • What are the advantages and disadvantages of test automation? • What are the advantages and disadvantages of test automation generations?

Notas do Editor

  1. Theory of testing automation-
  2. Help to release higher quality product: because more exactly: automation is more exactly than manual way. faster: test coverage is higher than human do On time?? computer execute quickly and inconsistently Sure … but you need have good plan &amp; execution. Because when you start implementing your script, it means that you can face to solve many following automation problems goal of automation: + reduce cost when your AUT has new upgrade/version: just need to re-execute the script again to test + exact result- Problem which we try to solve in automation is how to implement your script become stable, reusable &amp; effective
  3. Better user of qualified in-house testing resourcesTedious happens at repetitive task and use most our resource so automation release tester for creative tasksCan’t test manuallyLoad test, performance test, stability testAutomation save time, money and release manual testing skillExplain reason- Load test, performance test,
  4. Smoke, user acceptance, functional test need to retestAutomate testing only do paths I indicate but tester can work around the paths to discover more bugsHow many bugs might I lose and when
  5. Follow the idea of slideThe talent tester do automation or maintenance scripts then there isn’t enough good person do the test =&gt; test productivity decreasesOn the side la song song hay congviecphu
  6. Follow the idea of slideNeed explain moreWhat is good-enough automationTightening the testing cycle
  7. Give explanation of this comparison
  8. Run Automatic totally1. Run unit test; 2. Build new version; 3. Check new build; 4. Download; 5. Remove old build, install new build6. Run smoke test and email result to everyone related; 7. Run another test typeReusable and scalable if architected effectivelyArchitected effectively: Module, Action , Interface, …Scalable: when logic change we just modify at one position
  9. This point can regard as the weak of automation, follow the idea of the slideUncertainty and lack of controlWhen program change much cause the application of automation difficultlyFocus on making the test run instead of quality of testWhat is quality of test?
  10. Follow the slide, give example for this.Some reasons can become from the client – customer, they want us to test application as soon as possible, so we didn’t have time to implement script… just focus on manual test to report bugs as much as possible- usability: nice, fast, …
  11. Follow the slideApplication should be stableis at phase system and user acceptanceTools for stress, load and performance testRobust script of IBMMS VS test team support unit, performance testBooksTesting computer software
  12. Automation delivery summary reportTest scopeWhat completedWhat we seeTest case amountComplete percentTotal run time of automation per computerRegression on function coverRun result on each environment
  13. Follow the slide &amp; give example via any automation tool (such as: TA)
  14. Explain the diagram, the way to work
  15. example
  16. Follow the slideRecord/playback bases on coordinate.You can give some questions to your class, also.
  17. This is the generation 2
  18. Follow the slide
  19. Win runner application
  20. Silk tool
  21. This is the generation 3- There is no explain on this slide
  22. Follow the slide- Not scalable: logic changed must be maintain script
  23. Challenge of data driven (generation 3)Response slowly to rate of software changesLow reusability/scalability: logic in programming
  24. Follow the slide ( try a demo via TA tool)
  25. Follow the slideTest engineers are black-box testersAutomation engineers are programmers
  26. Compare some testing tool. Can give question to learner: Have you ever used any testing tool in this list? Or have you ever heard about them?winRunner is previous one of QTPTest director is previous one of Quality Center
  27. Give summary to your class to close this chapter.Some questions you can give: - How many testing generation? 4 - Could you please list out the name of them? Record &amp; play back, scripting, data driven, action keyword - Which strong point / weak point of automation?…