Introduction to Workbot 2.0 Ryan Li  Test automation  ant the Cucumber.

Slides:



Advertisements
Similar presentations
Use-Cases.
Advertisements

Local Touch – Global Reach The New Tester Matthew Eakin, Manager Managed Testing Practice Sogeti, USA.
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Story-Based Test Automation Using Free Tools
1 Software Requirement Analysis Deployment Package for the Basic Profile Version 0.1, January 11th 2008.
Senior Design – Acceptance Test Plan Review The goal is to: define the criteria for approving the application. Tightly coupled to the Requirements document.
 What is Software Testing  Terminologies used in Software testing  Types of Testing  What is Manual Testing  Types of Manual Testing  Process that.
Living Requirements using Behavior Driven Development
UNIT-V The MVC architecture and Struts Framework.
Object Oriented Software Development
Background The Encyclopedio of Life (EOL) is an ROR open source project to create a free, online reference source and database for every one of the 1.8.
Behaviour Driven Development with Cucumber for Java.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Agile Developers Go Testing Part II Darcy Alexei November 2010.
RUP Implementation and Testing
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Software Development Process.  You should already know that any computer system is made up of hardware and software.  The term hardware is fairly easy.
A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Software Construction Lecture 18 Software Testing.
Intermediate 2 Software Development Process. Software You should already know that any computer system is made up of hardware and software. The term hardware.
Yarmouk University Department of Computer Information Systems CIS 499 Yarmouk University Department of Computer Information Systems CIS 499 Yarmouk University.
Automated Acceptance Testing and Continuous Delivery Larry Apke Agile Expert
TEST-1 6. Testing & Refactoring. TEST-2 How we create classes? We think about what a class must do We focus on its implementation We write fields We write.
Use Case Diagram The purpose is to communicate the system’s functionality and behaviour to the customer or end user. Mainly used for capturing user requirements.
1 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
Telerik Software Academy Software Quality Assurance Binding business requirements to.NET code.
Capturing the requirements  Requirement: a feature of the system or a description of something the system is capable of doing in order to fulfill the.
© Hive Studios 2011 Ivan Pavlović, Hive Studios Visual C# MVP, MCT, CSM
SPECIAL NOTE The customer on arrival at the post office is supposed to approach the counter for payment after that, he goes to writing duty for allocation.
Executive Summary - Human Factors Heuristic Evaluation 04/18/2014.
We Behatin’. INTRODUCTION Behat background 3 Behat prep Getting started
Zhuhai Test Automation Overview Ryan Li Team lead of test automation Foglight QA.
IBM Software Group © 2008 IBM Corporation Tivoli Provisioning Manager Beta Program Web Replay Intro and Lab September, 2008 Robert Uthe.
Use Case Diagrams A Detailed Description. Use Case Diagrams Use case diagrams describe relationships between users and use cases A use case is a (usually.
HPE ALM Octane.
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
EI Architecture Overview/Current Assessment/Technical Architecture
Leverage your Business with Selenium Automation Testing
BEHAVIOR DRIVEN DEVELOPMENT / TESTING (BDD)
TEST AUTOMATION IN BDD WAY
Business Directory REST API
Data Virtualization Tutorial: Introduction to SQL Script
Bring Accessibility into the Development Lifecycle with CI Testing
Recall The Team Skills Analyzing the Problem (with 5 steps)
Software Testing.
Object-Oriented Analysis and Design
Unified Modeling Language
Recall The Team Skills Analyzing the Problem
Software Quality Assurance
Requirements: Use Case Models and Narratives
Template library tool and Kestrel training
Advantages OF BDD Testing
John D. McGregor Session 9 Testing Vocabulary
Rational Unified Process
SIRS and STARS: Now What?
Course: Module: Lesson # & Name Instructional Material 1 of 32 Lesson Delivery Mode: Lesson Duration: Document Name: 1. Professional Diploma in ERP Systems.
Using Use Case Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Open Source Tool Based Automation solution with Continuous Integration and end to end BDD Implementation Arun Krishnan - Automation Manager Maria Afzal-
Engineering Quality Software
Object-Oriented Software Engineering
Applying Use Cases (Chapters 25,26)
Applying Use Cases (Chapters 25,26)
Introduction to BDD. Introduction to BDD “BDD is a second-generation, outside-in, pull-based, multiple-stakeholder, multiple-scale, high-automation,
Specification by example
Telerik Testing Framework
Software Development Process Using UML Recap
UML Design for an Automated Registration System
Open Source Tool Based Automation solution with Continuous Integration and end to end BDD Implementation Arun Krishnan - Automation Manager Maria Afzal-
Presentation transcript:

Introduction to Workbot 2.0 Ryan Li  Test automation  ant the Cucumber

Agenda What’s Cucumber? Why Cucumber? Features What’s BDD Examples Q&A Ryan Li, Test automation, Quest software 2011

What’s Cucumber? We can also call it Cuke, is an acceptance testing tool that executes plain-text functional descriptions as automated tests. The language that Cucumber understands is called Gherkin. Types of software testing: Ryan Li, Test automation, Quest software 2011

Ryan Li, Test automation, Quest software Test Matrix TypeWhy? UnitDid we build the code right? Does it work as specified? AcceptanceDid we build the right code? Does it do what the user wants? IntegrationDo system components work together? What about performance? SystemIs the system installed and configured correctly? ExploratoryWhat can we find out about the system that is not specified by these tests?

What’s Cucumber? A Very Short Introduction to Acceptance Testing Ryan Li, Test automation, Quest software 2011

Consider This Test Script A new customer registers The customer places three books in the shopping cart The customer goes to check-out The customer fills in their delivery address (province: Ontario) The system offers free delivery to the customer Ryan Li, Test automation, Quest software 2011

Consider This Test Script The system offers free delivery to Ontario customers when they place their first order and their order contains at least three books Ryan Li, Test automation, Quest software 2011

Convert to the Tabular Form Ryan Li, Test automation, Quest software 2011 number of booksorder numbership tofree delivery? 31OntarioYes

Convert to the Tabular Form Ryan Li, Test automation, Quest software 2011 number of booksorder numbership tofree delivery? 31OntarioYes 21OntarioNo

Convert to the Tabular Form Ryan Li, Test automation, Quest software 2011 number of booksorder numbership tofree delivery? 31OntarioYes 21OntarioNo 32OntarioNo

Convert to the Tabular Form Ryan Li, Test automation, Quest software 2011 number of booksorder numbership tofree delivery? 31OntarioYes 21OntarioNo 32OntarioNo 31AlbertaNo

How To Do It Collaborate: developers business analysts testers product owner Which tool to use is not as important Don’t look up terminology in Wikipedia Ryan Li, Test automation, Quest software 2011

Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behavior without detailing how that behavior is implemented. Ryan Li, Test automation, Quest software The Gherkin language

Feature: Cucumber In order to share the love As a presenter I will demonstrate behavior driven development with Cucumber Scenario: Behavior Driven Development with Cucumber Given a desire for higher quality software And a tool that executes feature documentation written in plain text When you watch this presentation Then you will gain an understanding of behavior driven development And see examples of behavior driven development with cucumber And be equipped to integrate Cucumber into your development process Ryan Li, Test automation, Quest software 2011

Meets requirements So, you may ask this question: how Gherkin meets our requirements?? Ryan Li, Test automation, Quest software 2011 目的 角色 期望结果 为了( In order to ) 作为( As a ) 预期( Will, Should )

Meets requirements In order to keep of track movies that I want to see As a XunleiCanCan’s customer I can add movies to a queue Ryan Li, Test automation, Quest software 2011 value proposition

Meets requirements In order to keep of track movies that I want to see As a XunleiCanCan’s customer I can add movies to a queue Ryan Li, Test automation, Quest software 2011 role

Meets requirements In order to keep of track movies that I want to see As a XunleiCanCan’s customer I can add movies to a queue Ryan Li, Test automation, Quest software 2011 feature

Wroks as expected Now, it’s the time to have a look at our scenarios Cucumber scenariosCucumber scenarios consist of steps, also known as Givens, Whens and Thens* * Cucumber doesn’t technically distinguish between these three kind of steps. However, we strongly recommend that you do! These words have been carefully selected for their purpose, and you should know what the purpose is to get into the BDD mindset. Ryan Li, Test automation, Quest software 2011

Given ( 假如 ) The purpose of givens is to put the system in a known state before the user (or external system) starts interacting with the system (in the When steps). Avoid talking about user interaction in givens. If you had worked with usecases, you would call this preconditions. Examples: Create records (model instances) / set up the database state. It’s ok to call into the layer “inside” the UI layer here (in Rails: talk to the models). Log in a user (An exception to the no-interaction recommendation. Things that “happened earlier” are ok). Ryan Li, Test automation, Quest software 2011

When ( 当 ) The purpose of When steps is to describe the key action the user performs (or, using Robert C. Martin’s metaphor, the state transition). Examples: Interact with a web page (Webrat/Watir/Selenium interaction etc should mostly go into When steps). Interact with some other user interface element. Developing a library? Kicking off some kind of action that has an observable effect somewhere else. Ryan Li, Test automation, Quest software 2011

Then ( 那么 ) The purpose of Then steps is to observe outcomes. The observations should be related to the business value/benefit in your feature description. The observations should also be on some kind of output – that is something that comes out of the system (report, user interface, message) and not something that is deeply buried inside it (that has no business value). Examples: Verify that something related to the Given+When is (or is not) in the output Check that some external system has received the expected message (was an with specific content sent?) Ryan Li, Test automation, Quest software 2011

Wroks as expected Feature: Manage companies In order to keep track of companies A user Should be able to manage companies Scenario: Create a new company Given I am logged in When I create a new company named Acme Then I should see that a company named Acme exists Ryan Li, Test automation, Quest software 2011

Wroks as expected features/ companies.feature steps/ company_steps.rb Ryan Li, Test automation, Quest software 2011

Given == Setup Given "I am logged in" do user = Factory(:user) visits new_session_path fills_in ‘Login’, :with => user.login fills_in ‘Password’, :with => user.password clicks_button ‘Login’ end Ryan Li, Test automation, Quest software 2011

When == Change When "I create a new company named $name" do |name| visits new_company_path fills_in 'Name', :with => name clicks_button 'Create' end When I create a new company named Acme Ryan Li, Test automation, Quest software 2011 variable

Then == Outcome Then "I should see that a company named $name exists" do |name| response.body.should =~ Regexp.new(name) end Ryan Li, Test automation, Quest software 2011

Using STAF in Cucumber Encapsulate STAF components Require STAF class in step definitions require 'java' require 'jstaf' import "com.ibm.staf.STAFHandle" import "com.ibm.staf.STAFResult" import "com.ibm.staf.STAFMarshallingContext" Ryan Li, Test automation, Quest software 2011

Demonstration Ensure the functions of the calculator works properly Ryan Li, Test automation, Quest software

Resources Examples with i18n support: Tutorials: posts Ryan Li, Test automation, Quest software 2011