Automated Acceptance Testing Example

Heard about Automated Acceptance Testing but not sure what to make of it. Check out this brief intro and demo of an automated acceptance test using Selenium Webdriver, Jasmine and Protractor.

Automated Acceptance TestingBehavior Driven DevelopmentSelenium WebDriverProtractorJasmineWebStormLift Web FrameworkAngularJS
1.0x

Automated Acceptance Testing Example

Created 3 years ago

Duration 0:17:56
lesson view count 63
Heard about Automated Acceptance Testing but not sure what to make of it. Check out this brief intro and demo of an automated acceptance test using Selenium Webdriver, Jasmine and Protractor.
Select the file type you wish to download
Slide Content
  1. Automated Acceptance Testing Example

    Slide 1 - Automated Acceptance Testing Example

    • Hani Massoud
    • 1
  2. Objective

    Slide 2 - Objective

    • Get a first taste of automated acceptance tests
    • See some automated tests in action:
    • An online store with a product catalogue
    • An automated Specification (how we expect the online store to behave)
    • Run the Specification
    • Verify the results
    • 2
  3. Contents

    Slide 3 - Contents

    • What are we Testing?
    • How are we Testing?
    • Automated Testing Demo
    • Benefits / Investment
    • 3
  4. What are we testing?

    Slide 4 - What are we testing?

    • System Under Test (SUT)
    • Web Application: Lift Web Server App, REST Web Services, AngularJS Web Pages
    • Features: Home Page, Catalogue, Shopping Cart
    • HTML5, CSS3, AngularJS
    • Browser
    • Lift Web Application
    • App Server
    • REST Web Services
    • Relational
    • Database
    • Database Server
    • Page structure
    • Look and feel
    • Presentation logic
    • User Experience
    • REST web services
    • Business logic
    • Persistence logic
    • Persistence
    • Data Model
    • 4
    • A web application
    • REST
  5. What are we testing?

    Slide 5 - What are we testing?

    • 5
    • An online store
    • Categories
    • Products
    • Menu
  6. How are we testing?

    Slide 6 - How are we testing?

    • 6
    • With a little help from Selenium and friends
    • Automated
  7. Slide 7

    • How are we testing?
    • 7
    • 1. Specify Desired Behaviour
    • 2. Execute Specification
    • 3. Verify Results Online
    • 3 Steps
    • Specs written in Jasmine from Pivotal Labs
    • Browser automation by Selenium WebDriver and Protractor from Google
    • Unit Test reports by Jasmine
    • Acceptance Test reports Protractor-html-screenshot-reporter from Jintoppy
  8. Demo

    Slide 8 - Demo

    • Step 1: Specify Desired Behaviour
    • Step 2: Execute Specification
    • Step 3: Verify Results Online
    • 8
    • Specifications are automated scripts that we can execute
    • Specs are executed during development
    • Test results are generated automatically
    • Demo
  9. Step 1: Specify Desired Behaviour

    Slide 9 - Step 1: Specify Desired Behaviour

    • 9
    • Desired behaviour is Specified in a Jasmine script developed in the WebStorm JavaScript IDE. Writing Jasmine Specifications is beyond the scope of this demo. Follow the Jasmine link to learn more.
  10. Step 2: Execute Specification

    Slide 10 - Step 2: Execute Specification

    • 2.1 Start the System Under Test (SUT)
    • 2.2 Start Selenium WebDriver
    • 2.3 Execute the Specifications
    • 10
  11. 2.1 Start the System Under Test

    Slide 11 - 2.1 Start the System Under Test

    • Go to project directory
    • Run sbt-staging
    • Start up server: container:start
    • 11
    • In this step I started the application in a staging environment for testing purposes. The application must be running so that Selenium WebDriver can perform the specified tests in the following steps.
  12. 2.2 Start Selenium WebDriver

    Slide 12 - 2.2 Start Selenium WebDriver

    • Run webdriver-manager start
    • 12
    • After this step, Selenium WebDriver is running and ready to execute tests that we will run in the next step.
  13. 2.3 Execute the Specifications

    Slide 13 - 2.3 Execute the Specifications

    • Go to project directory
    • Execute specifications
    • Run the command: protractor src\main\webapp\spec\e2eConf.js
    • Protractor runs the Specified tests through Selenium WebDriver
    • 13
    • See the video on the next page to see our automated tests in action.
  14. 14

    Slide 14 - 14

  15. 3. Verify the Results Online

    Slide 15 - 3. Verify the Results Online

    • Open report in browser
    • 15
    • After the tests are completed, a report is automatically generated to show the results.
    • The report is structured by Feature, Story and Scenario as per our Specification.
    • The Specification is “living documentation” of our application.
  16. Benefits / Investment

    Slide 16 - Benefits / Investment

    • Specs are living documentation of the system
    • Specs are reusable for regression tests
    • Specs create their own test data
    • System Under Test should provide Web pages or Web services that Selenium WebDriver can drive
    • Automated Specs need maintenance like any other code base
    • 16
  17. Thank You

    Slide 17 - Thank You

    • Hani Massoud
    • http://au.linkedin.com/in/hanimassoud/
    • 17