SlideShare a Scribd company logo
Acceptance Tests
"no codes goes in until the tests go on"




MSc. Dragan Tomić
Content
- what are acceptance tests
- why do we need them
- who creates them
- when create
- where use
- Details...
- Examples
- Summary
What are acceptance tests
● Acceptance tests
  ○ user's point of view
  ○ external view of system


● Examine externally visible effects
  ○ input and output
  ○ state changes
  ○ external interfaces


● Implementation independent
  (there automation may not be)
Why do we need them?
- Rework down from 60% to 20%
- Workflow working first time
- Getting business rules right (preventing
Rework)
- Tighter cross-functional team integration
- Crisp visible story completion criteria
Classical development
      Elicit          Analyze
                                      Design
  requirements      requirements




     Code                Test         Deploy




                                   Why go back?
- Misunderstandings...
When we create AT's
                            Analyze
       Elicit
                       requirements with       Design
   requirements
                             Tests




    Code with
                            Deploy
      Tests




- AT are created when die Requirements are Analysed
- Developers code with AT (Acceptance Tests)
- Failing AT provides quick feedback
Who creates them
● Author the test
  ○ customer, tester, developer together
● Connect tests to the system              Customer
                                            Tester
  ○ developer or technical testers
                                           Developer
● Run the tests
  ○ developer than tester
  ○ Manual
    or...
  ○ Automated (allows regression tests)
Tests
- Acceptance tests not substitute for interactive
communication
   ○ provides focus for this communication
- Tests in business domain terms
   ○ shared between customer and developer (common
     language)
Details
- Unit tests are not enough
- Objective of acceptance tests (business-facing, not
developer-facing, deliver value to Application's user)
- Too expensive or not?
- Automated Acceptance Test best practices
- The whole team owns the acceptance tests
Creating and maintaining effective AAT's

● Four sections:
  ○   creating acceptance tests
  ○   creating an application driver layer
  ○   implementing acceptance tests
  ○   maintaining acceptance test suites
● INVEST principles
  Independent, Negotiable, Valuable, Estimable, Small, Testable
Creating AAT's
                        Given - state of app when test case begins
                        When - interaction between app and user
                        Then - state of app after that interaction is complete
                        (Cucumber, JBehave, Concordion, Twist or xUnit)


                        DSL - domain-specific language
                        API for the application driver layer



                        translates "high-level" commands to real
                        application data




Advantages: AT independance, simple test data creation
Example 1 (Acceptance Criteria)
Feature: Placing an order
Scenario:
User order should debit account correctly
Given there is an instrument called bond
And there is a user called Dave with 50 dollars in his account
When I log in as Dave
And I select the instrument bond
And I place an order to buy 4 at 10 dollars each
And the order is successful
Then I have 10 dollars left in my account

In Cucumber we would save this AC in a file 'features/placing_an_order.features'
Example 1 (Implementation layer)
Then we creating Ruby file features/step_definitions/placing_an_order_steps.rb
require 'application_driver/admin_api'
require 'application_driver/trading_ui'
Before do
         @admin_api = AdminApi.new
         @trading_ui = TradingUi.new
end
Given /^there is an instrument called (w+)$/ do |instrument|
         @admin_api.create_instrument(instrument)               end
Given /^there is a user called (w+) with (w+) dollars in his account$/ do |user, amount|
         @admin_api.create_user(user, amount)        end
When /^I log in as (w+)$/ do |user|
         @trading_ui.login(user)    end
When /^I select the instrument (w+)$/ do |instrument|
         @trading_ui.select_instrument(instrument) end
When /^I place an order to buy (d+) at (d+) dollars each$/ do |quantity, amount|
         @trading_ui.place_order(quantity, amount) end
When /^the order for (d+) of (w+) at (d+) dollars each is successful$/ do |quantity, instrument, amount|
         @trading_ui.confirm_order_success(instrument, quantity, amount)        end
Then /^I have (d+) dollars left in my account$/ do |balance|
         @trading_ui.confirm_account_balance(balance)           end
Example 1 (Application driver layer)
Feature: Placing an order
        Scenario: User order debits account correctly
        # features/placing_an_order.feature:3
        Given there is an instrument called bond
        # features/step_definitions/placing_an_order_steps.rb:9
        And there is a user called Dave with 50 dollars in his account
        # features/step_definitions/placing_an_order_steps.rb:13
        When I log in as Dave
        # features/step_definitions/placing_an_order_steps.rb:17
        And I select the instrument bond
        # features/step_definitions/placing_an_order_steps.rb:21
        And I place an order to buy 4 at 10 dollars each
        # features/step_definitions/placing_an_order_steps.rb:25
        And the order for 4 of bond at 10 dollars each is successful
        # features/step_definitions/placing_an_order_steps.rb:29
        Then I have 10 dollars left in my account
        # features/step_definitions/placing_an_order_steps.rb:33


1 scenario (1 passed)
7 steps (7 passed)
0m0.016s
Example 1 - Recap
This is the process for creating acceptance tests:
● Discuss acceptance criteria with your customer
● Write them down in the executable format described in
  the Example 1
● Write an implementation for the test which uses only the
  domain language, accessing the application driver layer
● Create an application driver layer which talks to the
  system under test
Example 1 expressed as JUnit test
public class PlacingAnOrderAcceptanceTest extends DSLTestCase {
    @Test
    public void userOrderShouldDebitAccountCorrectly() {
          adminAPI.createInstrument("name: bond");
          adminAPI.createUser("Dave", "balance: 50.00");
          tradingUI.login("Dave");
          tradingUI.selectInstrument("bond");
          tradingUI.placeOrder("price: 10.00", "quantity: 4");
          tradingUI.confirmOrderSuccess("instrument: bond", "price: 10.00",
          "quantity: 4");
          tradingUI.confirmBalance("balance: 10.00");
    }
}
Managing Asynchrony and Timeouts
Has the test failed, or are we just waiting for the result to arrive?
Example:

[Test]
public void ShouldSendEmailOnFileReceipt() {
      ClearAllFilesFromInbox();
      DropFileToInbox();
      ConfirmEmailWasReceived();
}


The email won't have been received by the time we check for its arrival!

Solution:
DELAY PERIOD or some service that handles incoming emails
The Acceptance Test stage
- A build that fails the acceptance tests will not be deployable
- AT threshold is extremely important
- Without excellent AT one of 3 things happens:
     ○   lot of time is spent fixing bugs
     ○   too much time and money spent on manual acceptance and
         regression testing
     ○   end up releasing poor-quality sofware
- Keeping acceptance tests green (when breaks -> team STOP)
- Fail fast (if it is going to fail)
Acceptance Test Performance
- Performance is not a primary concern
(it's more important to have a comprehensive automated test suite)
- Typically, they take hours to complete
- But, there is a spectrum of techniques for
improvement
     ○   parallel testing
     ○   refactor common tasks
     ○   share expensive resources
     ○   using compute grids (use cloud computing)
Summary
- AT simulate user interaction with the system in order to
ensure business requirements
- Providing protection against large-scale changes to
system
- Significantly improving quality through comprehensive
automated regression testing
- Providing fast and reliable feedback whenever a defect
occurs so that it can be fixed immediately
Thank you for your attention!!!

More Related Content

What's hot

Practical TDD Demonstrated
Practical TDD DemonstratedPractical TDD Demonstrated
Practical TDD Demonstrated
Alan Christensen
 
Creating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance TestsCreating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance Tests
Jez Humble
 
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1
Blue Elephant Consulting
 
A Test Automation Framework
A Test Automation FrameworkA Test Automation Framework
A Test Automation Framework
Gregory Solovey
 
Top Testing Tips
Top Testing TipsTop Testing Tips
Top Testing Tips
Salesforce Developers
 
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
 
Rft courseware
Rft coursewareRft courseware
Rft courseware
prakashkanamarlapudi
 
Priyanka_Resume
Priyanka_ResumePriyanka_Resume
Priyanka_Resume
priyanka bhattacharjee
 
Performance testing and rpt
Performance testing and rptPerformance testing and rpt
Performance testing and rpt
SivaprasanthRentala1975
 
Automation test scripting techniques
Automation test scripting techniquesAutomation test scripting techniques
Automation test scripting techniques
Zhu Zhong
 
Automation using ibm rft
Automation using ibm rftAutomation using ibm rft
Automation using ibm rft
Prashant Chaudhary
 
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFTRFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
Yogindernath Gupta
 
Effective Software Test Case Design Approach
Effective Software Test Case Design ApproachEffective Software Test Case Design Approach
Effective Software Test Case Design Approach
Charles D. Carson, MSSWE, CSM, ASQ-CSQE
 
Advanced Rational Performance Tester reports
Advanced Rational Performance Tester reportsAdvanced Rational Performance Tester reports
Advanced Rational Performance Tester reports
Bill Duncan
 
Model Based Software Testing
Model Based Software TestingModel Based Software Testing
Model Based Software Testing
Esin Karaman
 
Program Check List (PCL) FSOFT
Program Check List (PCL) FSOFTProgram Check List (PCL) FSOFT
Program Check List (PCL) FSOFT
Mobi Marketing
 
Cucumber spec - a tool takes your bdd to the next level
Cucumber spec - a tool takes your bdd to the next levelCucumber spec - a tool takes your bdd to the next level
Cucumber spec - a tool takes your bdd to the next level
nextbuild
 
Testing, fixing, and proving with contracts
Testing, fixing, and proving with contractsTesting, fixing, and proving with contracts
Testing, fixing, and proving with contracts
Carlo A. Furia
 

What's hot (18)

Practical TDD Demonstrated
Practical TDD DemonstratedPractical TDD Demonstrated
Practical TDD Demonstrated
 
Creating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance TestsCreating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance Tests
 
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1
 
A Test Automation Framework
A Test Automation FrameworkA Test Automation Framework
A Test Automation Framework
 
Top Testing Tips
Top Testing TipsTop Testing Tips
Top Testing Tips
 
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?
 
Rft courseware
Rft coursewareRft courseware
Rft courseware
 
Priyanka_Resume
Priyanka_ResumePriyanka_Resume
Priyanka_Resume
 
Performance testing and rpt
Performance testing and rptPerformance testing and rpt
Performance testing and rpt
 
Automation test scripting techniques
Automation test scripting techniquesAutomation test scripting techniques
Automation test scripting techniques
 
Automation using ibm rft
Automation using ibm rftAutomation using ibm rft
Automation using ibm rft
 
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFTRFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
 
Effective Software Test Case Design Approach
Effective Software Test Case Design ApproachEffective Software Test Case Design Approach
Effective Software Test Case Design Approach
 
Advanced Rational Performance Tester reports
Advanced Rational Performance Tester reportsAdvanced Rational Performance Tester reports
Advanced Rational Performance Tester reports
 
Model Based Software Testing
Model Based Software TestingModel Based Software Testing
Model Based Software Testing
 
Program Check List (PCL) FSOFT
Program Check List (PCL) FSOFTProgram Check List (PCL) FSOFT
Program Check List (PCL) FSOFT
 
Cucumber spec - a tool takes your bdd to the next level
Cucumber spec - a tool takes your bdd to the next levelCucumber spec - a tool takes your bdd to the next level
Cucumber spec - a tool takes your bdd to the next level
 
Testing, fixing, and proving with contracts
Testing, fixing, and proving with contractsTesting, fixing, and proving with contracts
Testing, fixing, and proving with contracts
 

Similar to Acceptance tests

Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
toddbr
 
Sivareddy 0000000000000000
Sivareddy 0000000000000000Sivareddy 0000000000000000
Sivareddy 0000000000000000
sivareddyeda
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
QASymphony
 
Testing - How Vital and How Easy to use
Testing - How Vital and How Easy to useTesting - How Vital and How Easy to use
Testing - How Vital and How Easy to use
Uma Ghotikar
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile Development
Dynatrace
 
Performance Testing using LoadRunner
Performance Testing using LoadRunnerPerformance Testing using LoadRunner
Performance Testing using LoadRunner
Kumar Gupta
 
SbE - Requirements in an agile process
SbE - Requirements in an agile processSbE - Requirements in an agile process
SbE - Requirements in an agile process
Chris Schotanus
 
Software Development : Jeremy Gleason Iscope Digital
Software Development : Jeremy Gleason Iscope DigitalSoftware Development : Jeremy Gleason Iscope Digital
Software Development : Jeremy Gleason Iscope Digital
Iscope Digital
 
agile with scrum methodology
agile with scrum methodology agile with scrum methodology
agile with scrum methodology
rahul reddy
 
Manual testing good notes
Manual testing good notesManual testing good notes
Manual testing good notes
dkns0906
 
How to Build a Metrics-optimized Software Delivery Pipeline
How to Build a Metrics-optimized Software Delivery PipelineHow to Build a Metrics-optimized Software Delivery Pipeline
How to Build a Metrics-optimized Software Delivery Pipeline
Dynatrace
 
Release 12 features work arounds and Upgrade
Release 12 features work arounds and UpgradeRelease 12 features work arounds and Upgrade
Release 12 features work arounds and Upgrade
Prasad Gudipaty M.S., PMP
 
Elite mindz introduction
Elite mindz introductionElite mindz introduction
Elite mindz introduction
Simerjeet Singh
 
EliteMindz: Who are we? Where do we serve ? What are our products & services?
EliteMindz: Who are we? Where do we serve ? What are our products & services?EliteMindz: Who are we? Where do we serve ? What are our products & services?
EliteMindz: Who are we? Where do we serve ? What are our products & services?
Simerjeet Singh
 
Software testing interview Q&A – Part 2
Software testing interview Q&A – Part 2Software testing interview Q&A – Part 2
Software testing interview Q&A – Part 2
Khoa Bui
 
Building a Complete Pipeline: The Essential Components of Continuous Testing ...
Building a Complete Pipeline: The Essential Components of Continuous Testing ...Building a Complete Pipeline: The Essential Components of Continuous Testing ...
Building a Complete Pipeline: The Essential Components of Continuous Testing ...
Applitools
 
Kelis king - requirements analysis and the unified process
Kelis king - requirements analysis and the unified processKelis king - requirements analysis and the unified process
Kelis king - requirements analysis and the unified process
KelisKing
 
Application Performance, Test and Monitoring
Application Performance, Test and MonitoringApplication Performance, Test and Monitoring
Application Performance, Test and Monitoring
Dony Riyanto
 
DQ Product Usage Methodology Highlights_v6_ltd
DQ Product Usage Methodology Highlights_v6_ltdDQ Product Usage Methodology Highlights_v6_ltd
DQ Product Usage Methodology Highlights_v6_ltd
Digendra Vir Singh (DV)
 
Testwarez 2009 Use Proper Tool
Testwarez 2009 Use Proper ToolTestwarez 2009 Use Proper Tool
Testwarez 2009 Use Proper Tool
Adam Sandman
 

Similar to Acceptance tests (20)

Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
Sivareddy 0000000000000000
Sivareddy 0000000000000000Sivareddy 0000000000000000
Sivareddy 0000000000000000
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
 
Testing - How Vital and How Easy to use
Testing - How Vital and How Easy to useTesting - How Vital and How Easy to use
Testing - How Vital and How Easy to use
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile Development
 
Performance Testing using LoadRunner
Performance Testing using LoadRunnerPerformance Testing using LoadRunner
Performance Testing using LoadRunner
 
SbE - Requirements in an agile process
SbE - Requirements in an agile processSbE - Requirements in an agile process
SbE - Requirements in an agile process
 
Software Development : Jeremy Gleason Iscope Digital
Software Development : Jeremy Gleason Iscope DigitalSoftware Development : Jeremy Gleason Iscope Digital
Software Development : Jeremy Gleason Iscope Digital
 
agile with scrum methodology
agile with scrum methodology agile with scrum methodology
agile with scrum methodology
 
Manual testing good notes
Manual testing good notesManual testing good notes
Manual testing good notes
 
How to Build a Metrics-optimized Software Delivery Pipeline
How to Build a Metrics-optimized Software Delivery PipelineHow to Build a Metrics-optimized Software Delivery Pipeline
How to Build a Metrics-optimized Software Delivery Pipeline
 
Release 12 features work arounds and Upgrade
Release 12 features work arounds and UpgradeRelease 12 features work arounds and Upgrade
Release 12 features work arounds and Upgrade
 
Elite mindz introduction
Elite mindz introductionElite mindz introduction
Elite mindz introduction
 
EliteMindz: Who are we? Where do we serve ? What are our products & services?
EliteMindz: Who are we? Where do we serve ? What are our products & services?EliteMindz: Who are we? Where do we serve ? What are our products & services?
EliteMindz: Who are we? Where do we serve ? What are our products & services?
 
Software testing interview Q&A – Part 2
Software testing interview Q&A – Part 2Software testing interview Q&A – Part 2
Software testing interview Q&A – Part 2
 
Building a Complete Pipeline: The Essential Components of Continuous Testing ...
Building a Complete Pipeline: The Essential Components of Continuous Testing ...Building a Complete Pipeline: The Essential Components of Continuous Testing ...
Building a Complete Pipeline: The Essential Components of Continuous Testing ...
 
Kelis king - requirements analysis and the unified process
Kelis king - requirements analysis and the unified processKelis king - requirements analysis and the unified process
Kelis king - requirements analysis and the unified process
 
Application Performance, Test and Monitoring
Application Performance, Test and MonitoringApplication Performance, Test and Monitoring
Application Performance, Test and Monitoring
 
DQ Product Usage Methodology Highlights_v6_ltd
DQ Product Usage Methodology Highlights_v6_ltdDQ Product Usage Methodology Highlights_v6_ltd
DQ Product Usage Methodology Highlights_v6_ltd
 
Testwarez 2009 Use Proper Tool
Testwarez 2009 Use Proper ToolTestwarez 2009 Use Proper Tool
Testwarez 2009 Use Proper Tool
 

Recently uploaded

Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
Kavitha Krishnan
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 

Recently uploaded (20)

Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 

Acceptance tests

  • 1. Acceptance Tests "no codes goes in until the tests go on" MSc. Dragan Tomić
  • 2. Content - what are acceptance tests - why do we need them - who creates them - when create - where use - Details... - Examples - Summary
  • 3. What are acceptance tests ● Acceptance tests ○ user's point of view ○ external view of system ● Examine externally visible effects ○ input and output ○ state changes ○ external interfaces ● Implementation independent (there automation may not be)
  • 4. Why do we need them? - Rework down from 60% to 20% - Workflow working first time - Getting business rules right (preventing Rework) - Tighter cross-functional team integration - Crisp visible story completion criteria
  • 5. Classical development Elicit Analyze Design requirements requirements Code Test Deploy Why go back? - Misunderstandings...
  • 6. When we create AT's Analyze Elicit requirements with Design requirements Tests Code with Deploy Tests - AT are created when die Requirements are Analysed - Developers code with AT (Acceptance Tests) - Failing AT provides quick feedback
  • 7. Who creates them ● Author the test ○ customer, tester, developer together ● Connect tests to the system Customer Tester ○ developer or technical testers Developer ● Run the tests ○ developer than tester ○ Manual or... ○ Automated (allows regression tests)
  • 8. Tests - Acceptance tests not substitute for interactive communication ○ provides focus for this communication - Tests in business domain terms ○ shared between customer and developer (common language)
  • 9. Details - Unit tests are not enough - Objective of acceptance tests (business-facing, not developer-facing, deliver value to Application's user) - Too expensive or not? - Automated Acceptance Test best practices - The whole team owns the acceptance tests
  • 10. Creating and maintaining effective AAT's ● Four sections: ○ creating acceptance tests ○ creating an application driver layer ○ implementing acceptance tests ○ maintaining acceptance test suites ● INVEST principles Independent, Negotiable, Valuable, Estimable, Small, Testable
  • 11. Creating AAT's Given - state of app when test case begins When - interaction between app and user Then - state of app after that interaction is complete (Cucumber, JBehave, Concordion, Twist or xUnit) DSL - domain-specific language API for the application driver layer translates "high-level" commands to real application data Advantages: AT independance, simple test data creation
  • 12. Example 1 (Acceptance Criteria) Feature: Placing an order Scenario: User order should debit account correctly Given there is an instrument called bond And there is a user called Dave with 50 dollars in his account When I log in as Dave And I select the instrument bond And I place an order to buy 4 at 10 dollars each And the order is successful Then I have 10 dollars left in my account In Cucumber we would save this AC in a file 'features/placing_an_order.features'
  • 13. Example 1 (Implementation layer) Then we creating Ruby file features/step_definitions/placing_an_order_steps.rb require 'application_driver/admin_api' require 'application_driver/trading_ui' Before do @admin_api = AdminApi.new @trading_ui = TradingUi.new end Given /^there is an instrument called (w+)$/ do |instrument| @admin_api.create_instrument(instrument) end Given /^there is a user called (w+) with (w+) dollars in his account$/ do |user, amount| @admin_api.create_user(user, amount) end When /^I log in as (w+)$/ do |user| @trading_ui.login(user) end When /^I select the instrument (w+)$/ do |instrument| @trading_ui.select_instrument(instrument) end When /^I place an order to buy (d+) at (d+) dollars each$/ do |quantity, amount| @trading_ui.place_order(quantity, amount) end When /^the order for (d+) of (w+) at (d+) dollars each is successful$/ do |quantity, instrument, amount| @trading_ui.confirm_order_success(instrument, quantity, amount) end Then /^I have (d+) dollars left in my account$/ do |balance| @trading_ui.confirm_account_balance(balance) end
  • 14. Example 1 (Application driver layer) Feature: Placing an order Scenario: User order debits account correctly # features/placing_an_order.feature:3 Given there is an instrument called bond # features/step_definitions/placing_an_order_steps.rb:9 And there is a user called Dave with 50 dollars in his account # features/step_definitions/placing_an_order_steps.rb:13 When I log in as Dave # features/step_definitions/placing_an_order_steps.rb:17 And I select the instrument bond # features/step_definitions/placing_an_order_steps.rb:21 And I place an order to buy 4 at 10 dollars each # features/step_definitions/placing_an_order_steps.rb:25 And the order for 4 of bond at 10 dollars each is successful # features/step_definitions/placing_an_order_steps.rb:29 Then I have 10 dollars left in my account # features/step_definitions/placing_an_order_steps.rb:33 1 scenario (1 passed) 7 steps (7 passed) 0m0.016s
  • 15. Example 1 - Recap This is the process for creating acceptance tests: ● Discuss acceptance criteria with your customer ● Write them down in the executable format described in the Example 1 ● Write an implementation for the test which uses only the domain language, accessing the application driver layer ● Create an application driver layer which talks to the system under test
  • 16. Example 1 expressed as JUnit test public class PlacingAnOrderAcceptanceTest extends DSLTestCase { @Test public void userOrderShouldDebitAccountCorrectly() { adminAPI.createInstrument("name: bond"); adminAPI.createUser("Dave", "balance: 50.00"); tradingUI.login("Dave"); tradingUI.selectInstrument("bond"); tradingUI.placeOrder("price: 10.00", "quantity: 4"); tradingUI.confirmOrderSuccess("instrument: bond", "price: 10.00", "quantity: 4"); tradingUI.confirmBalance("balance: 10.00"); } }
  • 17. Managing Asynchrony and Timeouts Has the test failed, or are we just waiting for the result to arrive? Example: [Test] public void ShouldSendEmailOnFileReceipt() { ClearAllFilesFromInbox(); DropFileToInbox(); ConfirmEmailWasReceived(); } The email won't have been received by the time we check for its arrival! Solution: DELAY PERIOD or some service that handles incoming emails
  • 18. The Acceptance Test stage - A build that fails the acceptance tests will not be deployable - AT threshold is extremely important - Without excellent AT one of 3 things happens: ○ lot of time is spent fixing bugs ○ too much time and money spent on manual acceptance and regression testing ○ end up releasing poor-quality sofware - Keeping acceptance tests green (when breaks -> team STOP) - Fail fast (if it is going to fail)
  • 19. Acceptance Test Performance - Performance is not a primary concern (it's more important to have a comprehensive automated test suite) - Typically, they take hours to complete - But, there is a spectrum of techniques for improvement ○ parallel testing ○ refactor common tasks ○ share expensive resources ○ using compute grids (use cloud computing)
  • 20. Summary - AT simulate user interaction with the system in order to ensure business requirements - Providing protection against large-scale changes to system - Significantly improving quality through comprehensive automated regression testing - Providing fast and reliable feedback whenever a defect occurs so that it can be fixed immediately
  • 21. Thank you for your attention!!!