SlideShare a Scribd company logo
hugeinc.com
info@hugeinc.com
45 Main St. #220 Brooklyn, NY 11222
+1 718 625 4843
Mar 12, 2014
BDD
BDD
Node with MochaSelenium with
Cucumber
• Agile Manifesto
• Evolutionary Development and Design
• BDD introduction
• BDD Philosophy and Implementation
• BDD with Selenium & Cucumber
• BDD with Node & Mocha
• BDD in Agile
Topics Covered
.
• Composed by heavy hitters in the software industry in
Snowbird, UT in February 2001.
• Included the folks backing methodologies such as Scrum,
XP, Crystal ,Feature driven development, etc.
• Big names included such as Martin Fowler, Robert C
Martin( Uncle Bob), Alistair Cockburn, Ken Schwaber etc.
Agile Manifesto
.
Agile Manifesto - Continued
.
• Continuous Delivery & Integration
o Welcome changing reqs
o Deliver working software frequently
o Involve biz and developers throughout the project
o Build projects around motivated folks
o Communication should be face to face
o Primary metric of progress is working software
o Simplicity is essential
o Self organizing teams
o Periodic retrospectives
Continuous Delivery & Integration
.
You can't just ask customers what they want and then try to give that to them.
By the time you get it built, they'll want something new. - Steve Jobs
What Agile says...
.
Continuous Development and Testing.
Deliver features rather than modules.
Only focus on high-value features
Strong emphasis on testing.
Adapt to faster feedback
Strong emphasis on continuous integration.
Once all software is ready for delivery, all tests should pass.
A unique way to address modern challenges in software development.
Automation is the key
.
.
Technology Facing
.
These automated tests are written and maintained
exclusively by developers.
There are three kinds of tests that fall into this category
● Unit Test
● Integration / Component Test
● System / Deployment Test
Test Driven Dvlp (TDD) Philosophy
.
The basic tenets are developing and implementing Tests
before writing a line of code
Tests will and must fail up front
Code is developed after the test is developed.
A unique idea that is still foreign to many developers
This does not imply that we must use an agile development
process.
Business Facing
.
The tests in this quadrant are more commonly known as
Functional or Acceptance Tests.
Acceptance testing ensures that the acceptance criteria for a
story are met
Acceptance tests can test all kinds of attributes of the
system being built, including functionality, capacity, usability,
security, modifiability, availability
Acceptance tests are critical in an agile environment
because they answer the questions, “How do I know when I
am done?” for developers and “Did I get what I wanted?” for
users
Why Acceptance Testing essential?
.
Many developers believe that unit test suites created through
test-driven development are enough to protect against
regressions
Acceptance tests are business-facing, not developer-facing.
Unit tests are an essential part of any automated test strategy,
but they usually do not provide a high enough level of confidence
that the application can be released.
The objective of acceptance tests is to prove that our application
does what the customer meant it to, not that it works the way its
programmers think it should.
Acceptance Testing
.
Executable Specifications
.
As automated acceptance testing has become more central to the
continuous delivery, practitioners have realized that automated
testing is not just about testing.
Rather, acceptance tests are executable specifications of the
behavior of the software being developed.
This realization has spawned a new approach to automated
testing.
Behavior Driven Development
What is BDD?
.
“Behavior-driven development is
about implementing an application
by describing its behavior from the
perspective of its stakeholders”.
“It describes a cycle of interactions
with well-defined outputs, resulting
in the delivery of working, tested
software that matters.”
BDD is derivative
.
BDD is second generation agile methodology. Its an
evolution to TDD.
One of the core ideas of behavior-driven development is that
your acceptance criteria should be written in the form of the
customer’s expectations of the behavior of the application.
It should then be possible to take acceptance criteria thus
written, and execute them directly against the application to
verify that the application meets its specification
BDD in easy steps
.
Application breakup
.
What’s in a story?
.
A story is a unit of delivery
Story -28 Cash Withdrawal from ATM
As a active bank account holder
I want to withdraw cash from Bank ATM
Agree on “done”
.
Define scope using scenarios.
Feature: Cash Withdrawal from ATM
As a active bank account holder
I want to withdraw cash from Bank ATM
Scenario 1 – Cash Withdrawal with Sufficient amount
Given I have 100$ in account
When I withdraw 50$
Then Machine gives me 50$
Scenario 2 – Cash Withdrawal with In-Sufficient amount
Given I have 10$ in account
When I withdraw 50$
Then Machine says insufficent amount.
Tools and Frameworks
.
Stories & Scenarios:
Cucumber, JBehave, Mocha, Concordian, Twist
Implementation:
Selenium, Junit or TestNG
Cucumber Framework
.
Cucumber is the most popular tool is writing Scenarios in style of
Tests which can be shared with Non-Tech people.
It alters the traditional, boring, very large requirement documents
into clean, understandable English syntax feature files which
execute itself.
In short cucumber delivers executable Delivery document.
It uses very simple Gherkin language to define the scenarios.
Cucumber Framework
.
Cucumber Features is nothing but list of executable steps.
There are 3 major types of steps.
Given – When – Then
- Given some initial context
- When an event occurs
- Then ensures some outcomes.
Automate the scenarios in Java with
Cucumber
.
Make each step executable
@Given(“I have 100$ in account”)
public void createAccountWithBalance() {
}
@When(“I withdraw 50$”)
public void makeWithdrawAction() {
}
@Then(“Machine gives me 50$”)
public void dispenseTheCash() {
}
Automate the scenarios in Java
.
Make each step executable
@Given(“I have 10$ in account”)
public void createAccountWithBalance() {
}
@When(“I withdraw 50$”)
public void makeWithdrawAction() {
}
@Then(“Machine says insufficient amount”)
public void withdrawlError() {
}
Additional feature of cucumbers
.
Before:
@Given(“I have 10$ in account”)
public void createAccountWithBalance() {
}
After:
@Given(“I have (d+)$ in account”)
public void createAccountWithBalance(var amount) {
}
Before:
@Then(“Machine says ‘Insufficient amount’”)
public void withdrawlError() {
}
After:
@Then(“Machine says (.*)”)
public void withdrawlError(var message) {
}
Automation is the key
.
Scenarios become acceptance tests
which become regression test ...and documentation
Examples become code tests
…and documentation
Test Automation Tools
.
• Quick Test Professional By HP
• Rational Functional Tester By Rational (IBM Company)
• Silk Test By Borland
• Test complete By Automated QA
• QA Run (Compuware )
• Watir ( Open Source)
• Selenium ( Open Source)
• Sahi (Open Source)
Test Automation Using Selenium
.
Selenium is a robust set of tools that supports rapid development of test
automation for web-based applications.
Selenium provides a rich set of testing functions specifically geared to the
needs of testing of a web application.
Selenium operations are highly flexible, allowing many options for locating UI
elements and comparing expected test results against actual application
behavior.
Selenium Framework Features
.
• Supports Cross Browser Testing. The Selenium tests can be run on multiple
browsers.
• Allows scripting in several languages like Java, C#, PHP and Python.
• Assertion statements provide an efficient way of comparing expected and
actual results.
• Inbuilt reporting mechanism.
Selenium Driver
.
• Selenium driver is the most important point of function in writing
Selenium Tests
• Driver can perform many functions like
• Open a page
• Find elements ( By Id, class or CSS Property)
• Wait for a page load or action
• Fill the text boxes
• Click the Buttons, URLs
• Hover on elements
Over all Selenium driver is the one with whom everyone has to deal
mainly. Lot of common functionality has been implemented somewhere
is other tests. There is very good online community support and
documents for any queries or questions.
Cucumber Feature : Code Example
.
@CompareHappyPath
Feature: Compare Vehicles
As a user, I can compare a Lexus trim to other vehicle trims
Scenario: User can successfully compare one vehicle to another
Given user starts Compare flow on a large viewport
When they select the IS model
When they select the IS 250 AWD trim
When they add a competitor trim
Then ensure the compare vehicles button appears
Selenium Code Example in Lexus
.
private String startUrl = "/web/compare";
@Before("@CompareHappyPath")
public void setUp() throws Exception {
logger.debug("Start Compare Happy Path...");
}
@After("@CompareHappyPath")
public void tearDown() {
if (driver != null) {
}
driver.quit();
}
@Given("user starts Compare flow on a (.*) viewport")
public void startHappyPath(String viewportSize) {
this.openPage(startUrl);
assertTrue(StringUtils.endsWith(driver.getCurrentUrl(),
startUrl));
}
- NodeJS testing frameworks
BDD:
Mocha **, Vows*, Jasmine*, Cucumber *
TDD:
Expresso
Both: Mocha ***, Chai *
- Mocha is primarily BDD. TDD is a special mod of it.
From
(1) https://nodejsmodules.org/tags/testing
(2) https://nodejsmodules.org/tags/bdd
(3) https://nodejsmodules.org/tags/tdd
In NodeJS world
NodeJS Framework
.
Set the requirements:
● Requirement 1: Landing page functionality
a. 1.1 Need to see text on the landing page.
b. 1.2 Need to see the link to the login page.
● Requirement 2: Login page functionality
a. 2.1 Need to see text on the login page.
b. 2.2 Need to be able to login with user/email
“TEST”/”TEST”.
… etc.
NodeJS Framework
.
NodeJS Framework
.
TDD implementation very similar to BDD implementation
NodeJS Framework
.
Expected Output:
Expected Failure Output:
Ideal qualities of Tests
.
• Decisive – Test should be human communication filter. It should
determine success/failure of a program and each time it should help to
advance to next level.
• Complete Test should read like a story. It should contains all the
information it needs to run correctly with a given test harness and work
artifact under test.
• Valid – produces a result that matches the intention of the work artifact
under test
• Repeatable always gives the same results if the test harness and the
artifact under test are the same i.e. Is deterministic
• Isolated is not affected by other tests run before it nor does a test affect
the results of tests run after it
• Automated requires only a start signal in order to run to completion in a
finite amount of time
Quotes
.
If it's worth building, it's worth testing.
If it's not worth testing, why are you wasting your time working on it?
BDD benefits
.
• It produces the software that matters.
• Requirement becomes easy to understand and communicate.
• It promotes tangible stakeholder value in software solution.
• Provides detailed (executable) specifications
• Provides concrete evidence that your code works
• Requires developers to prove it with code
• Provides finely grained, concrete feedback (in mins)
• Supports evolutionary development
• Defects after deployment are rare and non critical. Much difference than
Legacy way of development.
BDD is a step in that direction
BDD Costs
.
• Cost of learning curve. Initial dip in productivity, but quality deliverable
starts from day one.
• Maintaining acceptance tests over the long term requires discipline.
• Continuous refactoring as new acceptance criteria comes.
• Need to deal with Social barrier.
• Slow performance
At the end its subjective decision either its costly or not costly.
The great ROYAL FATE….!
Myth
.
Myth: No one knows TDD/BDD. Otherwise it would be everywhere.
Answer: Not true…!
Large portion of developers has been exposed to TDD since last 5 years. Myth
looks true due to very less adoption ratio. And the one of the reason ( Out of
many is) social barrier.
I see only two class in my Team. And I am a programmer not QA. I cannot
write tests.
Who owns Acceptance Tests?
.
Agile Developer
.
Agile Developer
.
• Agile programmers are pros because they take things like software quality very
seriously.
• The best are passionate testers who take pride in their work and are always
looking for an edge in writing higher-quality code.
• To that end, there are certain things agile programmers do when regularly
creating high-quality, production-ready software.
• They write lots of tests and will often use tests as a means of driving out their
designs.
• They are continuously designing and improving the architecture of their software
as they go.
• They make sure the code base is always in a state of production readiness and
ready to deploy at a moment’s notice.
Agile Tester
.
Agile Tester
.
• Agile testers know that although it’s one thing to build it, it is another to know it
works.
• Agile tester will insert themselves into the agile project early, ensuring that
success for user stories gets defined up front and that when working software is
produced, it works.
• Agile tester work closely with developers, helping with test automation, looking
for holes, and doing extensive exploratory testing by trying to break the
application from all possible angles.
• Agile Tester have in mind the big testing picture and never lose site of load
testing, scalability, and anything else the team could be doing to produce high-
quality software.
Lexus Experience
● We used traditional model : Acceptance tests are the responsibility of the testing
team.
● The test team was always at the end of the chain of development, so our
acceptance tests spent most of their lives failing.
● This is not a trivial problem. Acceptance tests are often complex.
● We changed the ownership of the automated acceptance tests.
1. Happy Path
2. Alternative Path
3. Sad Path
Experience
.
“All right… we know what BDD is and understand the importance of Tests but you
know… one day tests started to fail and then one day we got override of it.”
This nonsense seems to be common in across the industry. If test is not running,
means my program isn't running. Don’t deliver it.
In practical, this happens as programmers faces lot pressure apart from programming.
They can’t convenience non-Tech leads about the process and quality.
So the first and most important thing in BDD/TDD is
Support from Leads.
Acceptance BDD … to overcome above problem
.
• Acceptance Business Driven Development (ATDD) is a practice in which the
whole team collaboratively discusses acceptance criteria, with examples,
and then distills them into a set of concrete acceptance tests before
development begins.
• It’s the best way I know to ensure that we all have the same shared
understanding of what it is we’re actually building.
• It’s also the best way known to ensure we have a shared definition of
Done.
Experience … Continued
.
BDD is not only to write Acceptance Test first before Code.
Its philosophy and very highly articulated practice , it needs time to understand, digest
and make it in practice in day to day work.
Next question… Are we following BDD in Lexus? I don’t think so, but we should try.
I think … the day when Programmer thinks first about Test before Code
implementation and Implement functionality through the window of acceptance
criteria compiled by Analysts and QA then we would be on path of BDD.
Questions?…
Comments?...
hugeinc.com
info@hugeinc.com
45 Main St. #220 Brooklyn, NY 11222
+1 718 625 4843

More Related Content

What's hot

Lesson 4...Bug Life Cycle
Lesson 4...Bug Life CycleLesson 4...Bug Life Cycle
Lesson 4...Bug Life Cycle
bhushan Nehete
 
Become an AppDynamics Dashboard Rockstar - AppD Summit Europe
Become an AppDynamics Dashboard Rockstar - AppD Summit EuropeBecome an AppDynamics Dashboard Rockstar - AppD Summit Europe
Become an AppDynamics Dashboard Rockstar - AppD Summit Europe
AppDynamics
 
Code coverage & tools
Code coverage & toolsCode coverage & tools
Code coverage & tools
Rajesh Kumar
 
Black and Blue APIs: Attacker's and Defender's View of API Vulnerabilities
Black and Blue APIs: Attacker's and Defender's View of API VulnerabilitiesBlack and Blue APIs: Attacker's and Defender's View of API Vulnerabilities
Black and Blue APIs: Attacker's and Defender's View of API Vulnerabilities
Matt Tesauro
 
Types of Software Testing | Edureka
Types of Software Testing | EdurekaTypes of Software Testing | Edureka
Types of Software Testing | Edureka
Edureka!
 
Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14
dotCloud
 
Api management best practices with wso2 api manager
Api management best practices with wso2 api managerApi management best practices with wso2 api manager
Api management best practices with wso2 api manager
Chanaka Fernando
 
BDD with Cucumber
BDD with CucumberBDD with Cucumber
BDD with Cucumber
Knoldus Inc.
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
Naresh Jain
 
Static Testing
Static Testing Static Testing
Static Testing
Suraj Vishwakarma
 
Guide to Agile testing
Guide to Agile testingGuide to Agile testing
Guide to Agile testing
Subrahmaniam S.R.V
 
API Security Best Practices and Guidelines
API Security Best Practices and GuidelinesAPI Security Best Practices and Guidelines
API Security Best Practices and Guidelines
WSO2
 
Contract testing and Pact
Contract testing and PactContract testing and Pact
Contract testing and Pact
Seb Rose
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Naga Dinesh
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1Raghu Kiran
 
Spring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice ArchitectureSpring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice Architecture
Marcin Grzejszczak
 
Arquitetura de Automação de Teste
Arquitetura de Automação de TesteArquitetura de Automação de Teste
Arquitetura de Automação de Teste
Elias Nogueira
 
API Management Within a Microservices Architecture
API Management Within a Microservices Architecture API Management Within a Microservices Architecture
API Management Within a Microservices Architecture
Nadeesha Gamage
 

What's hot (20)

Lesson 4...Bug Life Cycle
Lesson 4...Bug Life CycleLesson 4...Bug Life Cycle
Lesson 4...Bug Life Cycle
 
Become an AppDynamics Dashboard Rockstar - AppD Summit Europe
Become an AppDynamics Dashboard Rockstar - AppD Summit EuropeBecome an AppDynamics Dashboard Rockstar - AppD Summit Europe
Become an AppDynamics Dashboard Rockstar - AppD Summit Europe
 
Code coverage
Code coverageCode coverage
Code coverage
 
Code coverage & tools
Code coverage & toolsCode coverage & tools
Code coverage & tools
 
Black and Blue APIs: Attacker's and Defender's View of API Vulnerabilities
Black and Blue APIs: Attacker's and Defender's View of API VulnerabilitiesBlack and Blue APIs: Attacker's and Defender's View of API Vulnerabilities
Black and Blue APIs: Attacker's and Defender's View of API Vulnerabilities
 
Types of Software Testing | Edureka
Types of Software Testing | EdurekaTypes of Software Testing | Edureka
Types of Software Testing | Edureka
 
Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14
 
Api management best practices with wso2 api manager
Api management best practices with wso2 api managerApi management best practices with wso2 api manager
Api management best practices with wso2 api manager
 
BDD with Cucumber
BDD with CucumberBDD with Cucumber
BDD with Cucumber
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
Static Testing
Static Testing Static Testing
Static Testing
 
Guide to Agile testing
Guide to Agile testingGuide to Agile testing
Guide to Agile testing
 
API Security Best Practices and Guidelines
API Security Best Practices and GuidelinesAPI Security Best Practices and Guidelines
API Security Best Practices and Guidelines
 
Contract testing and Pact
Contract testing and PactContract testing and Pact
Contract testing and Pact
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1
 
Spring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice ArchitectureSpring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice Architecture
 
Arquitetura de Automação de Teste
Arquitetura de Automação de TesteArquitetura de Automação de Teste
Arquitetura de Automação de Teste
 
API Management Within a Microservices Architecture
API Management Within a Microservices Architecture API Management Within a Microservices Architecture
API Management Within a Microservices Architecture
 
Manual testing ppt
Manual testing pptManual testing ppt
Manual testing ppt
 

Viewers also liked

Test Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaTest Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and Mocha
Salesforce Developers
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberKMS Technology
 
What is BDD
What is BDDWhat is BDD
What is BDD
Pankaj Nakhat
 
Unit testing with mocha
Unit testing with mochaUnit testing with mocha
Unit testing with mocha
Revath S Kumar
 
Our Journey To Continuous Delivery
Our Journey To Continuous DeliveryOur Journey To Continuous Delivery
Our Journey To Continuous Delivery
Robert Mircea
 
The journey to Continuous Delivery
The journey to Continuous DeliveryThe journey to Continuous Delivery
The journey to Continuous Delivery
Claudio Sanchez
 
Behaviour Driven Development (BDD) With Apex on Force.com
Behaviour Driven Development (BDD) With Apex on Force.comBehaviour Driven Development (BDD) With Apex on Force.com
Behaviour Driven Development (BDD) With Apex on Force.com
Salesforce Developers
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise MiddlewareBehrad Zari
 
Salesforce selenium-saucelabs-webinar-april-2014
Salesforce selenium-saucelabs-webinar-april-2014Salesforce selenium-saucelabs-webinar-april-2014
Salesforce selenium-saucelabs-webinar-april-2014
Sauce Labs
 
TDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and JasmineTDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and Jasmine
Luis Sánchez Castellanos
 
Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!
Julien Biezemans
 
Performance Measurement and Monitoring for Salesforce Web & Mobile Apps
Performance Measurement and Monitoring for Salesforce Web & Mobile AppsPerformance Measurement and Monitoring for Salesforce Web & Mobile Apps
Performance Measurement and Monitoring for Salesforce Web & Mobile AppsSalesforce Developers
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
Florian Fesseler
 
An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)
Suman Guha
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
Nalin Goonawardana
 
Modern Web Applications
Modern Web ApplicationsModern Web Applications
Modern Web Applications
Ömer Göktuğ Poyraz
 
Testing Salesforce at Cloud Scale
Testing Salesforce at Cloud ScaleTesting Salesforce at Cloud Scale
Testing Salesforce at Cloud Scale
gwestr
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)
Ajay Danait
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
Daniel Kummer
 
Amalgamation of BDD, parallel execution and mobile automation
Amalgamation of BDD, parallel execution and mobile automationAmalgamation of BDD, parallel execution and mobile automation
Amalgamation of BDD, parallel execution and mobile automation
Agile Testing Alliance
 

Viewers also liked (20)

Test Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaTest Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and Mocha
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
 
What is BDD
What is BDDWhat is BDD
What is BDD
 
Unit testing with mocha
Unit testing with mochaUnit testing with mocha
Unit testing with mocha
 
Our Journey To Continuous Delivery
Our Journey To Continuous DeliveryOur Journey To Continuous Delivery
Our Journey To Continuous Delivery
 
The journey to Continuous Delivery
The journey to Continuous DeliveryThe journey to Continuous Delivery
The journey to Continuous Delivery
 
Behaviour Driven Development (BDD) With Apex on Force.com
Behaviour Driven Development (BDD) With Apex on Force.comBehaviour Driven Development (BDD) With Apex on Force.com
Behaviour Driven Development (BDD) With Apex on Force.com
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
 
Salesforce selenium-saucelabs-webinar-april-2014
Salesforce selenium-saucelabs-webinar-april-2014Salesforce selenium-saucelabs-webinar-april-2014
Salesforce selenium-saucelabs-webinar-april-2014
 
TDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and JasmineTDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and Jasmine
 
Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!
 
Performance Measurement and Monitoring for Salesforce Web & Mobile Apps
Performance Measurement and Monitoring for Salesforce Web & Mobile AppsPerformance Measurement and Monitoring for Salesforce Web & Mobile Apps
Performance Measurement and Monitoring for Salesforce Web & Mobile Apps
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
 
An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Modern Web Applications
Modern Web ApplicationsModern Web Applications
Modern Web Applications
 
Testing Salesforce at Cloud Scale
Testing Salesforce at Cloud ScaleTesting Salesforce at Cloud Scale
Testing Salesforce at Cloud Scale
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
 
Amalgamation of BDD, parallel execution and mobile automation
Amalgamation of BDD, parallel execution and mobile automationAmalgamation of BDD, parallel execution and mobile automation
Amalgamation of BDD, parallel execution and mobile automation
 

Similar to Bdd with Cucumber and Mocha

Agile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai ShevchenkoAgile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai ShevchenkoMoldova ICT Summit
 
Robert polak matrix skills-web developer 2018-3
Robert polak   matrix skills-web developer 2018-3Robert polak   matrix skills-web developer 2018-3
Robert polak matrix skills-web developer 2018-3
Robert Polak
 
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo RiolWebinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
atSistemas
 
BDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesBDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User Stories
Sauce Labs
 
Test Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and CucumberTest Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and Cucumber
Rhoynar Software Consulting
 
Bridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous DeliveryBridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous Delivery
masoodjan
 
Expo qa from user stories to automated acceptance tests with bdd
Expo qa   from user stories to automated acceptance tests with bddExpo qa   from user stories to automated acceptance tests with bdd
Expo qa from user stories to automated acceptance tests with bdd
Eduardo Riol
 
Engineering Velocity @indeed eng presented on Sept 24 2014 at Beyond Agile
Engineering Velocity @indeed eng presented on Sept 24 2014 at Beyond AgileEngineering Velocity @indeed eng presented on Sept 24 2014 at Beyond Agile
Engineering Velocity @indeed eng presented on Sept 24 2014 at Beyond Agile
KenAtIndeed
 
The Quest for Continuous Delivery at Pluralsight
The Quest for Continuous Delivery at PluralsightThe Quest for Continuous Delivery at Pluralsight
The Quest for Continuous Delivery at Pluralsight
Mike Clement
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistMark Fayngersh
 
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
 
Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD
Gervais Johnson, Advisor
 
JS FAST Prototyping with AngularJS & RequireJS
JS FAST Prototyping with AngularJS & RequireJSJS FAST Prototyping with AngularJS & RequireJS
JS FAST Prototyping with AngularJS & RequireJS
Yuriy Silvestrov
 
Acceptance tests
Acceptance testsAcceptance tests
Acceptance tests
Dragan Tomic
 
From Monoliths to Services: Paying Your Technical Debt
From Monoliths to Services: Paying Your Technical DebtFrom Monoliths to Services: Paying Your Technical Debt
From Monoliths to Services: Paying Your Technical Debt
TechWell
 
Hands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.comHands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.com
Salesforce Developers
 
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Thinkful
 
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Synerzip
 
Bootstrapping an App for Launch
Bootstrapping an App for LaunchBootstrapping an App for Launch
Bootstrapping an App for Launch
Craig Phares
 
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch TutorialMongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB
 

Similar to Bdd with Cucumber and Mocha (20)

Agile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai ShevchenkoAgile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai Shevchenko
 
Robert polak matrix skills-web developer 2018-3
Robert polak   matrix skills-web developer 2018-3Robert polak   matrix skills-web developer 2018-3
Robert polak matrix skills-web developer 2018-3
 
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo RiolWebinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
 
BDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesBDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User Stories
 
Test Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and CucumberTest Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and Cucumber
 
Bridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous DeliveryBridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous Delivery
 
Expo qa from user stories to automated acceptance tests with bdd
Expo qa   from user stories to automated acceptance tests with bddExpo qa   from user stories to automated acceptance tests with bdd
Expo qa from user stories to automated acceptance tests with bdd
 
Engineering Velocity @indeed eng presented on Sept 24 2014 at Beyond Agile
Engineering Velocity @indeed eng presented on Sept 24 2014 at Beyond AgileEngineering Velocity @indeed eng presented on Sept 24 2014 at Beyond Agile
Engineering Velocity @indeed eng presented on Sept 24 2014 at Beyond Agile
 
The Quest for Continuous Delivery at Pluralsight
The Quest for Continuous Delivery at PluralsightThe Quest for Continuous Delivery at Pluralsight
The Quest for Continuous Delivery at Pluralsight
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwist
 
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
 
Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD
 
JS FAST Prototyping with AngularJS & RequireJS
JS FAST Prototyping with AngularJS & RequireJSJS FAST Prototyping with AngularJS & RequireJS
JS FAST Prototyping with AngularJS & RequireJS
 
Acceptance tests
Acceptance testsAcceptance tests
Acceptance tests
 
From Monoliths to Services: Paying Your Technical Debt
From Monoliths to Services: Paying Your Technical DebtFrom Monoliths to Services: Paying Your Technical Debt
From Monoliths to Services: Paying Your Technical Debt
 
Hands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.comHands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.com
 
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
 
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
 
Bootstrapping an App for Launch
Bootstrapping an App for LaunchBootstrapping an App for Launch
Bootstrapping an App for Launch
 
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch TutorialMongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
 

Recently uploaded

OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Yara Milbes
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 

Recently uploaded (20)

OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 

Bdd with Cucumber and Mocha

  • 1. hugeinc.com info@hugeinc.com 45 Main St. #220 Brooklyn, NY 11222 +1 718 625 4843 Mar 12, 2014 BDD
  • 3. • Agile Manifesto • Evolutionary Development and Design • BDD introduction • BDD Philosophy and Implementation • BDD with Selenium & Cucumber • BDD with Node & Mocha • BDD in Agile Topics Covered .
  • 4. • Composed by heavy hitters in the software industry in Snowbird, UT in February 2001. • Included the folks backing methodologies such as Scrum, XP, Crystal ,Feature driven development, etc. • Big names included such as Martin Fowler, Robert C Martin( Uncle Bob), Alistair Cockburn, Ken Schwaber etc. Agile Manifesto .
  • 5. Agile Manifesto - Continued . • Continuous Delivery & Integration o Welcome changing reqs o Deliver working software frequently o Involve biz and developers throughout the project o Build projects around motivated folks o Communication should be face to face o Primary metric of progress is working software o Simplicity is essential o Self organizing teams o Periodic retrospectives
  • 6. Continuous Delivery & Integration . You can't just ask customers what they want and then try to give that to them. By the time you get it built, they'll want something new. - Steve Jobs
  • 7. What Agile says... . Continuous Development and Testing. Deliver features rather than modules. Only focus on high-value features Strong emphasis on testing. Adapt to faster feedback Strong emphasis on continuous integration. Once all software is ready for delivery, all tests should pass. A unique way to address modern challenges in software development.
  • 9. .
  • 10. Technology Facing . These automated tests are written and maintained exclusively by developers. There are three kinds of tests that fall into this category ● Unit Test ● Integration / Component Test ● System / Deployment Test
  • 11. Test Driven Dvlp (TDD) Philosophy . The basic tenets are developing and implementing Tests before writing a line of code Tests will and must fail up front Code is developed after the test is developed. A unique idea that is still foreign to many developers This does not imply that we must use an agile development process.
  • 12. Business Facing . The tests in this quadrant are more commonly known as Functional or Acceptance Tests. Acceptance testing ensures that the acceptance criteria for a story are met Acceptance tests can test all kinds of attributes of the system being built, including functionality, capacity, usability, security, modifiability, availability Acceptance tests are critical in an agile environment because they answer the questions, “How do I know when I am done?” for developers and “Did I get what I wanted?” for users
  • 13. Why Acceptance Testing essential? . Many developers believe that unit test suites created through test-driven development are enough to protect against regressions Acceptance tests are business-facing, not developer-facing. Unit tests are an essential part of any automated test strategy, but they usually do not provide a high enough level of confidence that the application can be released. The objective of acceptance tests is to prove that our application does what the customer meant it to, not that it works the way its programmers think it should.
  • 15. Executable Specifications . As automated acceptance testing has become more central to the continuous delivery, practitioners have realized that automated testing is not just about testing. Rather, acceptance tests are executable specifications of the behavior of the software being developed. This realization has spawned a new approach to automated testing. Behavior Driven Development
  • 16. What is BDD? . “Behavior-driven development is about implementing an application by describing its behavior from the perspective of its stakeholders”. “It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters.”
  • 17. BDD is derivative . BDD is second generation agile methodology. Its an evolution to TDD. One of the core ideas of behavior-driven development is that your acceptance criteria should be written in the form of the customer’s expectations of the behavior of the application. It should then be possible to take acceptance criteria thus written, and execute them directly against the application to verify that the application meets its specification
  • 18. BDD in easy steps .
  • 20. What’s in a story? . A story is a unit of delivery Story -28 Cash Withdrawal from ATM As a active bank account holder I want to withdraw cash from Bank ATM
  • 21. Agree on “done” . Define scope using scenarios. Feature: Cash Withdrawal from ATM As a active bank account holder I want to withdraw cash from Bank ATM Scenario 1 – Cash Withdrawal with Sufficient amount Given I have 100$ in account When I withdraw 50$ Then Machine gives me 50$ Scenario 2 – Cash Withdrawal with In-Sufficient amount Given I have 10$ in account When I withdraw 50$ Then Machine says insufficent amount.
  • 22. Tools and Frameworks . Stories & Scenarios: Cucumber, JBehave, Mocha, Concordian, Twist Implementation: Selenium, Junit or TestNG
  • 23. Cucumber Framework . Cucumber is the most popular tool is writing Scenarios in style of Tests which can be shared with Non-Tech people. It alters the traditional, boring, very large requirement documents into clean, understandable English syntax feature files which execute itself. In short cucumber delivers executable Delivery document. It uses very simple Gherkin language to define the scenarios.
  • 24. Cucumber Framework . Cucumber Features is nothing but list of executable steps. There are 3 major types of steps. Given – When – Then - Given some initial context - When an event occurs - Then ensures some outcomes.
  • 25. Automate the scenarios in Java with Cucumber . Make each step executable @Given(“I have 100$ in account”) public void createAccountWithBalance() { } @When(“I withdraw 50$”) public void makeWithdrawAction() { } @Then(“Machine gives me 50$”) public void dispenseTheCash() { }
  • 26. Automate the scenarios in Java . Make each step executable @Given(“I have 10$ in account”) public void createAccountWithBalance() { } @When(“I withdraw 50$”) public void makeWithdrawAction() { } @Then(“Machine says insufficient amount”) public void withdrawlError() { }
  • 27. Additional feature of cucumbers . Before: @Given(“I have 10$ in account”) public void createAccountWithBalance() { } After: @Given(“I have (d+)$ in account”) public void createAccountWithBalance(var amount) { } Before: @Then(“Machine says ‘Insufficient amount’”) public void withdrawlError() { } After: @Then(“Machine says (.*)”) public void withdrawlError(var message) { }
  • 28. Automation is the key . Scenarios become acceptance tests which become regression test ...and documentation Examples become code tests …and documentation
  • 29. Test Automation Tools . • Quick Test Professional By HP • Rational Functional Tester By Rational (IBM Company) • Silk Test By Borland • Test complete By Automated QA • QA Run (Compuware ) • Watir ( Open Source) • Selenium ( Open Source) • Sahi (Open Source)
  • 30. Test Automation Using Selenium . Selenium is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. Selenium operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.
  • 31. Selenium Framework Features . • Supports Cross Browser Testing. The Selenium tests can be run on multiple browsers. • Allows scripting in several languages like Java, C#, PHP and Python. • Assertion statements provide an efficient way of comparing expected and actual results. • Inbuilt reporting mechanism.
  • 32. Selenium Driver . • Selenium driver is the most important point of function in writing Selenium Tests • Driver can perform many functions like • Open a page • Find elements ( By Id, class or CSS Property) • Wait for a page load or action • Fill the text boxes • Click the Buttons, URLs • Hover on elements Over all Selenium driver is the one with whom everyone has to deal mainly. Lot of common functionality has been implemented somewhere is other tests. There is very good online community support and documents for any queries or questions.
  • 33. Cucumber Feature : Code Example . @CompareHappyPath Feature: Compare Vehicles As a user, I can compare a Lexus trim to other vehicle trims Scenario: User can successfully compare one vehicle to another Given user starts Compare flow on a large viewport When they select the IS model When they select the IS 250 AWD trim When they add a competitor trim Then ensure the compare vehicles button appears
  • 34. Selenium Code Example in Lexus . private String startUrl = "/web/compare"; @Before("@CompareHappyPath") public void setUp() throws Exception { logger.debug("Start Compare Happy Path..."); } @After("@CompareHappyPath") public void tearDown() { if (driver != null) { } driver.quit(); } @Given("user starts Compare flow on a (.*) viewport") public void startHappyPath(String viewportSize) { this.openPage(startUrl); assertTrue(StringUtils.endsWith(driver.getCurrentUrl(), startUrl)); }
  • 35. - NodeJS testing frameworks BDD: Mocha **, Vows*, Jasmine*, Cucumber * TDD: Expresso Both: Mocha ***, Chai * - Mocha is primarily BDD. TDD is a special mod of it. From (1) https://nodejsmodules.org/tags/testing (2) https://nodejsmodules.org/tags/bdd (3) https://nodejsmodules.org/tags/tdd In NodeJS world
  • 36. NodeJS Framework . Set the requirements: ● Requirement 1: Landing page functionality a. 1.1 Need to see text on the landing page. b. 1.2 Need to see the link to the login page. ● Requirement 2: Login page functionality a. 2.1 Need to see text on the login page. b. 2.2 Need to be able to login with user/email “TEST”/”TEST”. … etc.
  • 38. NodeJS Framework . TDD implementation very similar to BDD implementation
  • 40. Ideal qualities of Tests . • Decisive – Test should be human communication filter. It should determine success/failure of a program and each time it should help to advance to next level. • Complete Test should read like a story. It should contains all the information it needs to run correctly with a given test harness and work artifact under test. • Valid – produces a result that matches the intention of the work artifact under test • Repeatable always gives the same results if the test harness and the artifact under test are the same i.e. Is deterministic • Isolated is not affected by other tests run before it nor does a test affect the results of tests run after it • Automated requires only a start signal in order to run to completion in a finite amount of time
  • 41. Quotes . If it's worth building, it's worth testing. If it's not worth testing, why are you wasting your time working on it?
  • 42. BDD benefits . • It produces the software that matters. • Requirement becomes easy to understand and communicate. • It promotes tangible stakeholder value in software solution. • Provides detailed (executable) specifications • Provides concrete evidence that your code works • Requires developers to prove it with code • Provides finely grained, concrete feedback (in mins) • Supports evolutionary development • Defects after deployment are rare and non critical. Much difference than Legacy way of development. BDD is a step in that direction
  • 43. BDD Costs . • Cost of learning curve. Initial dip in productivity, but quality deliverable starts from day one. • Maintaining acceptance tests over the long term requires discipline. • Continuous refactoring as new acceptance criteria comes. • Need to deal with Social barrier. • Slow performance At the end its subjective decision either its costly or not costly. The great ROYAL FATE….!
  • 44. Myth . Myth: No one knows TDD/BDD. Otherwise it would be everywhere. Answer: Not true…! Large portion of developers has been exposed to TDD since last 5 years. Myth looks true due to very less adoption ratio. And the one of the reason ( Out of many is) social barrier. I see only two class in my Team. And I am a programmer not QA. I cannot write tests.
  • 47. Agile Developer . • Agile programmers are pros because they take things like software quality very seriously. • The best are passionate testers who take pride in their work and are always looking for an edge in writing higher-quality code. • To that end, there are certain things agile programmers do when regularly creating high-quality, production-ready software. • They write lots of tests and will often use tests as a means of driving out their designs. • They are continuously designing and improving the architecture of their software as they go. • They make sure the code base is always in a state of production readiness and ready to deploy at a moment’s notice.
  • 49. Agile Tester . • Agile testers know that although it’s one thing to build it, it is another to know it works. • Agile tester will insert themselves into the agile project early, ensuring that success for user stories gets defined up front and that when working software is produced, it works. • Agile tester work closely with developers, helping with test automation, looking for holes, and doing extensive exploratory testing by trying to break the application from all possible angles. • Agile Tester have in mind the big testing picture and never lose site of load testing, scalability, and anything else the team could be doing to produce high- quality software.
  • 50. Lexus Experience ● We used traditional model : Acceptance tests are the responsibility of the testing team. ● The test team was always at the end of the chain of development, so our acceptance tests spent most of their lives failing. ● This is not a trivial problem. Acceptance tests are often complex. ● We changed the ownership of the automated acceptance tests. 1. Happy Path 2. Alternative Path 3. Sad Path
  • 51. Experience . “All right… we know what BDD is and understand the importance of Tests but you know… one day tests started to fail and then one day we got override of it.” This nonsense seems to be common in across the industry. If test is not running, means my program isn't running. Don’t deliver it. In practical, this happens as programmers faces lot pressure apart from programming. They can’t convenience non-Tech leads about the process and quality. So the first and most important thing in BDD/TDD is Support from Leads.
  • 52. Acceptance BDD … to overcome above problem . • Acceptance Business Driven Development (ATDD) is a practice in which the whole team collaboratively discusses acceptance criteria, with examples, and then distills them into a set of concrete acceptance tests before development begins. • It’s the best way I know to ensure that we all have the same shared understanding of what it is we’re actually building. • It’s also the best way known to ensure we have a shared definition of Done.
  • 53. Experience … Continued . BDD is not only to write Acceptance Test first before Code. Its philosophy and very highly articulated practice , it needs time to understand, digest and make it in practice in day to day work. Next question… Are we following BDD in Lexus? I don’t think so, but we should try. I think … the day when Programmer thinks first about Test before Code implementation and Implement functionality through the window of acceptance criteria compiled by Analysts and QA then we would be on path of BDD.
  • 55. hugeinc.com info@hugeinc.com 45 Main St. #220 Brooklyn, NY 11222 +1 718 625 4843