Aruna Banavar Shankar & Miti Bhat

Slides:



Advertisements
Similar presentations
1. XP 2 * The Web is a collection of files that reside on computers, called Web servers. * Web servers are connected to each other through the Internet.
Advertisements

Advanced Piloting Cruise Plot.
Copyright © 2002 Pearson Education, Inc. Slide 1.
Requirements Engineering Process
Chapter 6 Structures and Classes. Copyright © 2006 Pearson Addison-Wesley. All rights reserved. 6-2 Learning Objectives Structures Structure types Structures.
Chapter 1 The Study of Body Function Image PowerPoint
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
By Rick Clements Software Testing 101 By Rick Clements
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Determine Eligibility Chapter 4. Determine Eligibility 4-2 Objectives Search for Customer on database Enter application signed date and eligibility determination.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Year 6 mental test 5 second questions
Excel Functions. Part 1. Introduction 2 An Excel function is a formula or a procedure that is performed in the Visual Basic environment, outside the.
Introduction Lesson 1 Microsoft Office 2010 and the Internet
Week 2 The Object-Oriented Approach to Requirements
1 How to Enter Time. 2 Select: Log In Once logged in, Select: Employees.
Configuration management
Chapter 5 – Enterprise Analysis
Mind Mapping Techniques to Create Proposals APMP Colorado Chapter March 6, 2012 James J. Franklin San Diego PMI Chapter PMI is a registered trade and service.
Information Systems Today: Managing in the Digital World
ABC Technology Project
EU Market Situation for Eggs and Poultry Management Committee 21 June 2012.
© Paradigm Publishing, Inc Access 2010 Level 1 Unit 1Creating Tables and Queries Chapter 2Creating Relationships between Tables.
Microsoft Access.
“The Honeywell Web-based Corrective Action Solution”
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
1 What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight.
VOORBLAD.
15. Oktober Oktober Oktober 2012.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
© 2010 Cisco and/or its affiliates. All rights reserved.Presentation_IDCisco Confidential CISCO LEARNING CREDITS MANAGEMENT TOOL CLP ADMINISTRATOR – USER.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
© 2012 National Heart Foundation of Australia. Slide 2.
Services Course Windows Live SkyDrive Participant Guide.
Chapter 10 Software Testing
April 2003 ONLINE SERVICE DELIVERY Presentation. 2 What is Online Service Delivery? Vision The current vision of the Online Service Delivery program is.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
1 How Do I Order From.decimal? Rev 05/04/09 This instructional training document may be updated at anytime. Please visit and check the.
25 seconds left…...
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Januar MDMDFSSMDMDFSSS
Chapter 10: The Traditional Approach to Design
Systems Analysis and Design in a Changing World, Fifth Edition
To the Assignments – Work in Progress Online Training Course
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
12 January 2009SDS batch generation, distribution and web interface 1 ExESS IT tool for SDS batch generation, distribution and web interface ExESS IT tool.
PSSA Preparation.
VPN AND REMOTE ACCESS Mohammad S. Hasan 1 VPN and Remote Access.
Immunobiology: The Immune System in Health & Disease Sixth Edition
CHAPTER 11 FILE INPUT & OUTPUT Introduction to Computer Science Using Ruby (c) 2012 Ophir Frieder et al.
1 PART 1 ILLUSTRATION OF DOCUMENTS  Brief introduction to the documents contained in the envelope  Detailed clarification of the documents content.
Chapter 13 Web Page Design Studio
Immunobiology: The Immune System in Health & Disease Sixth Edition
© Paradigm Publishing, Inc Access 2010 Level 2 Unit 2Advanced Reports, Access Tools, and Customizing Access Chapter 8Integrating Access Data.
© 2007 BST. All rights reserved. Confidential Information. SLU – 1 PDS_139 (0503) L2 Applying Problem- Solving Tools.
1 Office of New Teacher Induction Introducing NTIMS New Teacher Induction Mentoring System A Tool for Documenting School Based Mentoring Mentors’ Guide.
Modeling Main issues: What do we want to build How do we write this down.
Windfall Web Throughout this slide show there will be hyperlinks (highlighted in blue). Follow the hyperlinks to navigate to the specified Topic or Figure.
What’s new in WebSpace Changes and improvements with Xythos 7.2 Effective June 24,
Introduction to BDD. Introduction to BDD “BDD is a second-generation, outside-in, pull-based, multiple-stakeholder, multiple-scale, high-automation,
Presentation transcript:

Aruna Banavar Shankar & Miti Bhat Agile BDD using RSpec and Cucumber Aruna Banavar Shankar & Miti Bhat © 2012. Infosys Limited. Strictly private and confidential. No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Limited.

Contents BDD Installation Demo for Rspec Demo for Cucumber The Basic Features Cucumber vs. Rspec

An elephant as seen by 6 blind people! A story An elephant as seen by 6 blind people! The elephant was assumed to be what was “felt” by these blind people One question! – Can everyone see one entity as it is???

Introduction to BDD “Getting the Words Right” is the focus of BDD, leading to building one language that is understood the same way by the project stakeholders Vision is to bring in consistency, accuracy and meaning Behavior Driven Development (BDD) claims “the words you use about something influence the way you think about that”.

How it works? As <a ROLE> I need a <FEATURE> towards <BENEFIT> Examples As an <ADMIN> I need <ACCESS TO FUNCTIONAL ADMIN PORTAL> to <MANAGE USERS> As the <IT MANAGER> I need <DETAILED REPORT> to <VALIDATE IT SPEND>

Key stakeholders in a project Developer – Interested in coding than testing If tester finds a defect or if time permits …… focus on defects Let me code first is the general tendency Tester – Primary responsibility is to test and find defects Customer – Clarifications, approvals, sign off Different stakeholders, unlike mindset, varied mission come together in the project. Building an application by understanding its behavior from all stakeholder point of view. This builds a collaboration between developer, Tester, business and other teams.

Then……what is BDD In the "Agile specifications, BDD and Testing eXchange" in November 2009 in London, Dan North[3] gave the following description of BDD: BDD is a second-generation, outside–in, pull-based, multiple-stakeholder, multiple-scale, high-automation, agile methodology. It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters.

About them… RSpec created by Steven Baker in 2005. To explore new TDD frameworks Encourage focus on behavior…. Rspec 2008, Aslak Hellesøy To explore new BDD frameworks Rewrites RSpec’s Story Runner with a real grammar… Cucumber

Installation Installed as gems: rspec cucumber

Folder Structure http://www.sharpthoughts.org

Cucumber & RSpec Ref: The Rspec Book by David Chelimsky and others published by The Pragmatic Bookshelf

Demo Hello Rspec

Demo: Hello Cucumber

Step Definitions Creates a step. Methods: Given( ) When( ) Then( ) Each must have Regexp A block.

Step definitions Sample Given /^a greeter$/ do @greeter = CucumberGreeter.new end When /^I send it the greet message$/ do @message = @greeter.greet Then /^I should see "([^"]*)"$/ do |greeting| @message.should == greeting

Demo: step Definitions website2

User stories Consider: User navigates to home page User enters details User successfully logs in User unsuccessful in logging in

DEMO: Multiple scenarios Website: adding more scenarios without tables

Scenario outlines Let us define a single scenario outline Tables of input data Expected output.

Sample: Scenario outlines Scenario Outline: submit guess Given the secret code is "<code>" When I guess "<guess>" Then the symbol should be "<symbol>"

Sample: scenario Outlines Scenario Outline: submit details Given the user name is "<uname>" When I guess "<pwd>" Then the message should be "<mesg>" Scenarios: no matches | uname | pwd | symbol| | ^^^^ | a1a1 | failed | Scenarios: 1 uname incorrect | uname | pwd | mesg | | abcd | 1555 | passed | | ba-mn| 2555 | failed |

Test doubles An object that behaves as though it is the original object Eg: output

Demo: Test Double Uses test double but shows logical error

“It” method The it( ) method: creates an example ExampleGroup returns an instance of it using describe( ) Demo: website5 Note: Rspec double(out) – a mock for STDOUT

A small change def start @output.puts 'Welcome to website!' end The test passes!!! Once the passing code is ready… See it in action!!! Demo: website6 using .bat file

When Cucumber & WHEN Rspec Cucumber - integration/acceptance testing rspec/test unit - Model unit tests. Define feature scenario in cucumber Start by implementing every step of feature scenario For each functionality required BDD that with rspec Repeat until functionality is complete

Hooks Hooks: • Before - every scenario • After - every scenario • AfterStep - after every step

Backgrounds Steps that are invoked Before and After every scenario Feature: browse books Background: Logged in Given I have logged in as “Aruna" And the following models exist: | manufacturer | carmodel? | | Ford | yes | | Honda| no | Scenario: Display a car that already exists Scenario: Display a car that is not yet in market

Configuration Command Line configuration for: Switches Options Eg: mycmd: --tags @wip features Usage: cucumber –p mycmd

References / Bibliography The Rspec Book by David Chelimsky and others published by The Pragmatic Bookshelf http://www.infoq.com Wikipedia

To reproduce this slide simply create a new slide, right click and select layout and apply the Notes&Disclaimer layout.