Contenu connexe Similaire à Digesting Cucumber Salad By Praveen Shivashankar (20) Plus de Agile Testing Alliance (20) Digesting Cucumber Salad By Praveen Shivashankar1. DIGESTING CUCUMBER SALAD
PREVIEW THE USE OF CUCUMBER
IN AGILE PROCESS
Confidential | Copyright © Agile Testing Alliance Global Gathering
2. Agenda
• The Agile Attitude
• Understanding System Behavior
• Introduction to Cucumber
• Install and Configure Cucumber
• Implement BDD using Cucumber
• Cucumber & Selenium
• Conclusion
Confidential | Copyright © Agile Testing Alliance Global Gathering
4. Agile Attitude
• Agile is a mindset defined by values, guided by
principles and manifested through many different
practices.
- Ahmed Sidky, Executive VP, Santeon.
Picture credit: Dilbert by Scott Adams
Confidential | Copyright © Agile Testing Alliance Global Gathering
5. Agile Mindset
Picture credit: www.finding-marbles.com
Confidential | Copyright © Agile Testing Alliance Global Gathering
6. System Behavior
• It’s all about WHAT THE SYSTEM SHOULD DO?
• Focus from a customer’s point of view rather than a
developer’s point of view.
Picture credit: ©Ted Goff
Confidential | Copyright © Agile Testing Alliance Global Gathering
7. Behavior Driven Development
Business
Domain Driven
Design
Technology
Test Driven
Development
BDD
Confidential | Copyright © Agile Testing Alliance Global Gathering
8. IT’S SALAD TIME!
Confidential | Copyright © Agile Testing Alliance Global Gathering
9. Meet Cucumber….
• Ruby based BDD Framework
• The two blocks of Cucumber:
– Feature File – contains
scenarios described in plain
text
– Glue Code – Auto generated
step definitions in Java
Picture credit: http://www.guru99.com/introduction-to-cucumber.html/
Confidential | Copyright © Agile Testing Alliance Global Gathering
11. Behavior
Description
Scenarios Features User Stories
Steps definition
Execution of the
steps (Results in
Failure)
Execution of the
steps (Should result
in Pass)
Functionality
Development
Confidential | Copyright © Agile Testing Alliance Global Gathering
12. Feature
Feature: <short description>
<story>
<scenario 1>
<scenario 2>
.
.
.
• A good feature document is
– Complete
– Specific
– Testable
Confidential | Copyright © Agile Testing Alliance Global Gathering
As a <role>
I want <feature>
So that <business value>
Scenario: <description>
Given <preconditions, context>
[And] <more preconditions>
When <action, behavior>
Then <post conditions>
[And] <more post conditions>
13. Scenarios
Picture credit: http://www.future-processing.pl/technical-blog/
Confidential | Copyright © Agile Testing Alliance Global Gathering
14. Installation & Configuration
• Eclipse IDE
• Create Java Project
• Create the Main and Test packages
• Resource folder to hold the Feature files
• Adding the essential JAR files
• Junit test runner
Confidential | Copyright © Agile Testing Alliance Global Gathering
15. TIME TO EAT!
Confidential | Copyright © Agile Testing Alliance Global Gathering
16. BDD Implementation with Cucumber
• Future Value of $$$!
Confidential | Copyright © Agile Testing Alliance Global Gathering
18. In Conclusion
• Cucumber is NOT a testing tool
• Requirements itself become testcases!!!
• API testing, Data driven testing & Mobile
testing
• Integrates with Selenium
• Potential for an agile environment
Confidential | Copyright © Agile Testing Alliance Global Gathering