SlideShare a Scribd company logo
1 of 29
Patterns for Scripted
Acceptance Test-Driven
    Development
         Fang Liu
        Ider Zheng
        Pooja Gore




            1
Intent



 Patterns for acceptance test-driven development
  (ATDD) using scripts

 Approaches to cope with the challenges




                          2
Context


ATDD consists of

 Script Languages
  o Allows control of one or more application

 Business objects
  o manipulated by the program which make sense to the client
  o hidden to the client

 Non-Business Objects

                               3
Problem



 Client must understand and review the tests
  o Should be imbued with a testing culture
  o A learning curve is associated with the approach




                             4
Interrelated Patterns
Test Creation Patterns

Test Flow    Creator   Destroyer


 Limit      Command      Table
Breaker       Errors     Tester

Workflow    Template   Persistence
 Tester      Tester      Tester
Test Flow



 To verify if a given software property results as
  expected after a given action
Three Steps for Test Flow


 Step 1:
  o Build a scenario you want to test

 Step 2:
  o Operate the program with the desired action

 Step 3:
  o Check the new program’s state.
Creator & Destroyer



 To test if a business object has been successfully
  created or removed in the program

 Business object creation and destruction are common
  operations in test scripts
Steps for Construction

  Check
Object Not   •Otherwise, exception
              or do nothing

  Exist


               Create
               Object



                                       Check         •Otherwise, exception
                                                      or go back creation
                                     Object Exist     step




                                                    Validate the
                                                    property of
                                                      Object
Steps for Destruction

  Check        •Otherwise, do
                nothing
Object Exist



                Destroy
                Object


                                  Check       •Otherwise, exception
                                Object Not     or go back destroy
                                               step
                                  Exist

                                              Validate
                                               double
                                             Destruction
Limit Breaker



 To test a business object or program flow that has
  limits (ranges or sets of allowed values)
Limit Breaker

 Always precisely demarcate limits by giving examples of
  inner and outer bounds.

 Make sure values immediately out of the bounds throw
  errors, and limit inbound values don't.

 In general, tests for the immediate limits are enough to
  indicate to the developer that further values aren’t
  acceptable, even if the tests don’t explicitly list all of them.
Command Errors



 Created a new command to incorporate in the script
  language and will start writing tests with it
Command Errors

 Test coverage is difficult to attain if you don’t approach testing
  systematically

 When thinking on a new command to add to the script
  language, you often think about tests that will involve this
  command, including anomalous uses;

 A system should be able to identify a misuse of one of its
  operations and may even give clues about the problem cause
Table Tester



 To test extensive lists of features for multiple business objects
  of the same kind, or multiple examples to test formulas
  (calculations)

 To declare business rules in a formulaic manner
Table Tester
Workflow Tester

 Context
        Test a workflow

 Problem
  o Tables become too verbose
  o Such tables make script understanding and maintenance difficult

 Forces
        A workflow is sequential in nature

 Solution
        Use commands in sequence instead of tables
Template Tester

 Context
        Testing massive textual or non-textual content
 Problem
  o Massive textual content makes a script unintelligible
  o Non-textual content can only be included in a script through an IDE
 Forces
        Templates for test cases can be generated using software
 Solution
  o Divert the contents to be tested to outside the script
  o And use a template to compare it with

 Related Patterns
        Test Flow
Persistence Tester

 Context
        Test if data entered in the program is persistent
 Problem
        Lack of a systematic approach to testing persistence
 Forces
        Setting up a scenario for persistence can often be reused
 Solution
  o The first part, add data in a program
  o The second part , check if data is retained
 Related Patterns
        Test Flow
Test Organization Patterns


     Build     Only Business
  Summarizer     Objects



         Commentor
Build Summarizer

 Context
        Similar test used frequently in a script

 Problem
        Repetition of the same test sequence, making script verbose

 Forces
      Commonly used sequence can be summarized in an expressive
  command

 Solution
        Set commonly used tests a separate single test sequence
Only Business Objects

 Context
        Tests include Non-business objects

 Problem
        Tests for non-business objects are unintelligible for the client

 Forces
  o Client’s understanding of all Tests is important
  o Testing non-business objects is equally important

 Solution
  o Test only business objects in an acceptance test script
  o Test all Non-Business Objects with Unit Test
Commentor

 Context
        Developer fails to understand a designed test

 Problem
  o Development stalls
  o A bug or wrong requirement may be introduced
  o Inconsistent Test Comments

 Forces
        Communicator between Client and Developer

 Solution
  o Use Comments
  o Update Comments
Test Application Patterns




 Client        Template
Assertion     Generator
Client Assertion

 Context
  o Find a potential wrong test
 Problem
  o If bugs are changed by developers, feature creep will emerge
  o If bugs are not found, clients disappointed
 Forces
  o Clients must review tests
 Solutions
   No test should be modified without the client’s consent


                                27
Template Generator


 Context

 Problem
  o Becomes harder to find test cases

 Solution
   Exam the presented results


                            28
Testing tools


 Most widely known
  o FIT (Framework for Integrated Testing)


 Others
  o EasyAccept
  o Exactor
THANK YOU!

    30

More Related Content

What's hot

Unit Testing Guidelines
Unit Testing GuidelinesUnit Testing Guidelines
Unit Testing GuidelinesJoel Hooks
 
Software Testing
Software TestingSoftware Testing
Software TestingAdroitLogic
 
Software testing ... who’s responsible is it?
Software testing ... who’s responsible is it?Software testing ... who’s responsible is it?
Software testing ... who’s responsible is it?Manjula03809891
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)nedirtv
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010guest5639fa9
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDDDror Helper
 
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible MistakesRoy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible MistakesRoy Osherove
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And MockingJoe Wilson
 
Agile and ATDD the perfect couple
Agile and ATDD the perfect coupleAgile and ATDD the perfect couple
Agile and ATDD the perfect coupleStephen Tucker
 
Benefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real WorldBenefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real WorldDror Helper
 
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Zohirul Alam Tiemoon
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testingikhwanhayat
 

What's hot (18)

Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Unit Testing Guidelines
Unit Testing GuidelinesUnit Testing Guidelines
Unit Testing Guidelines
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Software testing ... who’s responsible is it?
Software testing ... who’s responsible is it?Software testing ... who’s responsible is it?
Software testing ... who’s responsible is it?
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDD
 
UNIT TESTING
UNIT TESTINGUNIT TESTING
UNIT TESTING
 
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible MistakesRoy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
Agile and ATDD the perfect couple
Agile and ATDD the perfect coupleAgile and ATDD the perfect couple
Agile and ATDD the perfect couple
 
Benefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real WorldBenefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real World
 
Unit testing
Unit testingUnit testing
Unit testing
 
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
 
Unit test
Unit testUnit test
Unit test
 

Similar to Patterns for Scripted Acceptance Test-Driven Development

Writing useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you buildWriting useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you buildAndrei Sebastian Cîmpean
 
Software testing ... who is responsible for it?
Software testing ... who is responsible for it?Software testing ... who is responsible for it?
Software testing ... who is responsible for it?Manjula Piyumal
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsMichael Palotas
 
Agile Testing 20021015
Agile Testing 20021015Agile Testing 20021015
Agile Testing 20021015Raghu Karnati
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsDominik Dary
 
Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.Deepak Singhvi
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven TestingMaveryx
 
Database Unit Testing Made Easy with VSTS
Database Unit Testing Made Easy with VSTSDatabase Unit Testing Made Easy with VSTS
Database Unit Testing Made Easy with VSTSSanil Mhatre
 
Tester Challenges in Agile ?
Tester Challenges in Agile ?Tester Challenges in Agile ?
Tester Challenges in Agile ?alind tiwari
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingCameron Presley
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Mohamed Taman
 
Agile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveAgile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveWee Witthawaskul
 

Similar to Patterns for Scripted Acceptance Test-Driven Development (20)

test
testtest
test
 
test
testtest
test
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Writing useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you buildWriting useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you build
 
Software testing ... who is responsible for it?
Software testing ... who is responsible for it?Software testing ... who is responsible for it?
Software testing ... who is responsible for it?
 
Unit Testing in Swift
Unit Testing in SwiftUnit Testing in Swift
Unit Testing in Swift
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
 
Agile Testing 20021015
Agile Testing 20021015Agile Testing 20021015
Agile Testing 20021015
 
Types of testing
Types of testingTypes of testing
Types of testing
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
 
Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven Testing
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
 
Database Unit Testing Made Easy with VSTS
Database Unit Testing Made Easy with VSTSDatabase Unit Testing Made Easy with VSTS
Database Unit Testing Made Easy with VSTS
 
Tester Challenges in Agile ?
Tester Challenges in Agile ?Tester Challenges in Agile ?
Tester Challenges in Agile ?
 
Agile process
Agile processAgile process
Agile process
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To Testing
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.
 
Agile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveAgile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer Perspective
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
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)Jisc
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
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...pradhanghanshyam7136
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
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.pdfAdmir Softic
 

Recently uploaded (20)

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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)
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
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...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
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
 

Patterns for Scripted Acceptance Test-Driven Development

  • 1. Patterns for Scripted Acceptance Test-Driven Development Fang Liu Ider Zheng Pooja Gore 1
  • 2. Intent  Patterns for acceptance test-driven development (ATDD) using scripts  Approaches to cope with the challenges 2
  • 3. Context ATDD consists of  Script Languages o Allows control of one or more application  Business objects o manipulated by the program which make sense to the client o hidden to the client  Non-Business Objects 3
  • 4. Problem  Client must understand and review the tests o Should be imbued with a testing culture o A learning curve is associated with the approach 4
  • 6. Test Creation Patterns Test Flow Creator Destroyer Limit Command Table Breaker Errors Tester Workflow Template Persistence Tester Tester Tester
  • 7. Test Flow  To verify if a given software property results as expected after a given action
  • 8. Three Steps for Test Flow  Step 1: o Build a scenario you want to test  Step 2: o Operate the program with the desired action  Step 3: o Check the new program’s state.
  • 9. Creator & Destroyer  To test if a business object has been successfully created or removed in the program  Business object creation and destruction are common operations in test scripts
  • 10. Steps for Construction Check Object Not •Otherwise, exception or do nothing Exist Create Object Check •Otherwise, exception or go back creation Object Exist step Validate the property of Object
  • 11. Steps for Destruction Check •Otherwise, do nothing Object Exist Destroy Object Check •Otherwise, exception Object Not or go back destroy step Exist Validate double Destruction
  • 12. Limit Breaker  To test a business object or program flow that has limits (ranges or sets of allowed values)
  • 13. Limit Breaker  Always precisely demarcate limits by giving examples of inner and outer bounds.  Make sure values immediately out of the bounds throw errors, and limit inbound values don't.  In general, tests for the immediate limits are enough to indicate to the developer that further values aren’t acceptable, even if the tests don’t explicitly list all of them.
  • 14. Command Errors  Created a new command to incorporate in the script language and will start writing tests with it
  • 15. Command Errors  Test coverage is difficult to attain if you don’t approach testing systematically  When thinking on a new command to add to the script language, you often think about tests that will involve this command, including anomalous uses;  A system should be able to identify a misuse of one of its operations and may even give clues about the problem cause
  • 16. Table Tester  To test extensive lists of features for multiple business objects of the same kind, or multiple examples to test formulas (calculations)  To declare business rules in a formulaic manner
  • 18. Workflow Tester  Context Test a workflow  Problem o Tables become too verbose o Such tables make script understanding and maintenance difficult  Forces A workflow is sequential in nature  Solution Use commands in sequence instead of tables
  • 19. Template Tester  Context Testing massive textual or non-textual content  Problem o Massive textual content makes a script unintelligible o Non-textual content can only be included in a script through an IDE  Forces Templates for test cases can be generated using software  Solution o Divert the contents to be tested to outside the script o And use a template to compare it with  Related Patterns Test Flow
  • 20. Persistence Tester  Context Test if data entered in the program is persistent  Problem Lack of a systematic approach to testing persistence  Forces Setting up a scenario for persistence can often be reused  Solution o The first part, add data in a program o The second part , check if data is retained  Related Patterns Test Flow
  • 21. Test Organization Patterns Build Only Business Summarizer Objects Commentor
  • 22. Build Summarizer  Context Similar test used frequently in a script  Problem Repetition of the same test sequence, making script verbose  Forces Commonly used sequence can be summarized in an expressive command  Solution Set commonly used tests a separate single test sequence
  • 23. Only Business Objects  Context Tests include Non-business objects  Problem Tests for non-business objects are unintelligible for the client  Forces o Client’s understanding of all Tests is important o Testing non-business objects is equally important  Solution o Test only business objects in an acceptance test script o Test all Non-Business Objects with Unit Test
  • 24. Commentor  Context Developer fails to understand a designed test  Problem o Development stalls o A bug or wrong requirement may be introduced o Inconsistent Test Comments  Forces Communicator between Client and Developer  Solution o Use Comments o Update Comments
  • 25. Test Application Patterns Client Template Assertion Generator
  • 26. Client Assertion  Context o Find a potential wrong test  Problem o If bugs are changed by developers, feature creep will emerge o If bugs are not found, clients disappointed  Forces o Clients must review tests  Solutions  No test should be modified without the client’s consent 27
  • 27. Template Generator  Context  Problem o Becomes harder to find test cases  Solution  Exam the presented results 28
  • 28. Testing tools  Most widely known o FIT (Framework for Integrated Testing)  Others o EasyAccept o Exactor

Editor's Notes

  1. Example:In a Monopoly game, you need to test if a player is thrown out of the game afterfalling on a series of tax places and taking a series of actions that decrease hismoney. If you use tables, you will need a separate table for every command you use.
  2. Example:generateReport output="report.txt"# equalFiles is a command in EasyAccept that tests if# two files have the exact same contentequalFiles templates\\reportTemplate.txt report.txt
  3. Example:# creating an employee - script1.txtclearEmployeeDatabaseexpecterror "employee doesn't exist" getEmployeeSalary \\employeeName="John Doe"createEmployeeemployeeName="John Doe" salary=1500expect 1500 getEmployeeSalaryemployeeName="John Doe"saveEverythingAndCloseProgram# restart is an EasyAccept commandrestart# checking persistenceexpect 1500 getEmployeeSalaryemployeeName="John Doe"
  4. # script 1executeScript sampleDatabaseSetup.txt… and then do the tests you want# script 2executeScript sampleDatabaseSetup.txt… and then do a number of different tests
  5. # the tests below should be unit testsexpect 25 getBQueueNodeFatherIndexexpectError “Code #432653: unexpected fault for the middleware connection”getCORBASkeletonMiddlwareProperty