SlideShare a Scribd company logo
1 of 45
Download to read offline
BEHAVIOR-DRIVEN DEVELOPMENT (BDD)
AND AUTOMATION TESTING WITH CUCUMBER
November 2013
KMS Technology: http://kms-technology.com
1
SAMPLE REQUIREMENT
Feature: login to the system.
As a user,
I want to login into the system when I provide username and
password.
Scenario: login successfully
Given the login page is opening
When I input username into the username textbox
And I input valid password into the password textbox
And I click Login button
Then I am on the Home page
2
AUTOMATION TEST
@Test
public void fb_login_test() throws Exception {
driver.get("https://www.facebook.com/");
driver.findElement(By.id("email")).clear();
driver.findElement(By.id("email")).sendKeys("bddtest@yahoo.com");
driver.findElement(By.id("pass")).clear();
driver.findElement(By.id("pass")).sendKeys("********");
driver.findElement(By.id("u_0_e")).click();
}
3
HOW?
4
AGENDA
BDD and Agile Development Practice
Automation Testing with Cucumber
Developing Cucumber-Based Automation
Framework
BDD/Cucumber – Pros & Cons
5
HOW WE ENGAGE, WHY WE ARE YOUR
BEST PARTNER….
Bright Minds, Brilliant Solutions
6
BDD & AGILE DEVELOPMENT
PRACTICE
BEHAVIOR-DRIVEN DEVELOPMENT
7
GIVEN, WHEN, THEN
8
BDD AND AGILE DEVELOPMENT
PRACTICE
9
HOW WE ENGAGE, WHY WE ARE YOUR
BEST PARTNER….
Bright Minds, Brilliant Solutions
10
AUTOMATION TESTING WITH
CUCUMBER
CUCUMBER APPROACH
11
Given /^I launch "([^"]*)" page$/ do |page|
visit(page)
End
When /^I fill in "([^"]*)" with "([^"]*)"$/ do |field, value|
fill_in field, :with => value
end
SCENARIO EXAMPLE
IN BDD FORMAT
Feature: login to the system.
As a user, I want to login into the system when I provide username and
password.
@tag_login_email
Scenario Outline: Verify that can login gmail
Given I launch "https://accounts.google.com" page
When I fill in “Email " with “<Email >"
And I fill in “Passwd" with "<Password> "
And I click on "signIn" button
Then I am on the “Home” page
Scenarios:
| Email | Password |
| kms.admin@gmail.com | kms@2013 |
| kms.user@gmail.com | kms@1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
• Desktop application
– http://pragprog.com/book/idgtr/scripted-gui-testing-with-ruby
• Mobile application
– http://www.moncefbelyamani.com/ios-automated-testing-with-calabash-cucumber-ruby/
15
CASE STUDY
Complete 70% automation testing following
agile process for a Healthcare Data Provider
Client:
– Health Market Science (HMS)
Business Challenges:
– 90% automation testing must be done for every 4-
week sprint
– Big Data Technology – Since MySQL, Oracle to
NoSQL, Cassandra, Storm, Hadoop
– Complicated test data creation
16
INSTALLATION
• Ruby:
– Windows: http://rubyinstaller.org/
– Linux: https://rvm.io/rvm/install
• Cucumber:
• gem install cucumber
http://rubygems.org/gems/cucumber
17
DEMO
• Web application:
Cucumber + Capybara
• Web Services:
Cucumber + HTTParty + Savon
18
DEMO: WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO: WEB APPLICATION
21
Navigating
• (Object) visit(url)
– The request method is always GET.
– url (String) - The relative/absolute URL to navigate to.
– Examples:
• visit('http://google.com')
DEMO: WEB APPLICATION
22
Navigating
Action
• (Object) click_link(locator, options = {})
– Finds a link by id or text and clicks it.
• (Object) click_button(locator, options = {})
– Finds a button by id, text or value and clicks it.
• (Object) fill_in(locator, options = {})
– Locate a text field or text area. The field can be found via its
name, id or label text.
DEMO: WEB APPLICATION
23
Navigating
Action
Check Point
• (Boolean) has_content?(content) /
• (Boolean) has_no_content?(content)
– content (String) - The text to check for
– Examples:
• page.has_content?(‘hello’)
• page.has_no_content?(‘hello’)
DEMO: WEB APPLICATION
24
Navigating
Action
Check Point
• RSpec magic matchers
– page.should have_selector('table tr')
– page.should have_no_selector(:content)
– page.should have_css('table tr.foo')
– page.should have_content('foo')
DEMO: WEB APPLICATION
DEMO: WEB APPLICATION
Regular ExpressionRegular Expression
Regular Expression
DEMO: WEB APPLICATION
HOW WE ENGAGE, WHY WE ARE YOUR
BEST PARTNER….
Bright Minds, Brilliant Solutions
27
TAKE A REST
DEMO
• Web Services:
Cucumber + HTTParty + Savon
28
DEMO: WEB SERVICES
29
• At a glance:
RESTful
Web
Service
SOAP Web
Service
HTTParty/
RestClient
/Json
Savon
Libs
Cukes!
GET/POST:
Content: JSON
{“data_id”:”1001”,
“active”:”yes”
“age”:”29”}
GET/POST:
Content: XML
<SOAP:Env xlms…
<data_id>1001</data_id>
<active>yes</active>
<age>29</age>
</SOAP:Env>
DEMO: WEB SERVICES
HTTParty
HTTParty.get 'http://myexample.com/newfeeds‘
 Response.body={“id”:”100”,”Message”:”Hello”}
HTTParty.post 'http://myexample.com/updateStatus',
{:date => “Nov-11-2013”, :status => “Full of energy
today”}
 Response.body={“update”:”success”,”id”:”425”}
HTTParty.put 'http://myexample.com/status/message’,
{:timeout => 5000}
 Response.body={“success”:”true”,”message”:”me
ssage_1377057406713”}
HTTParty.delete
'http://myexample.com/status/message_13770574067
14‘
=> Response.body={“success”:”false”,”reason”:”non-
exist”}
30
JSON
ActualRslt = JSON.parse(response.body)
Msg1 = ActualRslt[“message”] #= “Hello”
ActualRslt = JSON.parse(response.body)
Msg1 = ActualRslt[“update”] #= “success”
ActualRslt = JSON.parse(response.body)
Msg1 = ActualRslt[“message”]
#= “message_1377057406713”
ActualRslt = JSON.parse(response.body)
Msg1 = ActualRslt[“success”] #= “false”
Msg1 = ActualRslt[“reason”] #= “non-exist”
DEMO: WEB SERVICES
Savon
# create a client for the service
client = Savon.client(wsdl:
'http://service.example.com?wsdl')
client.operations
=> [:find_user, :list_users]
# call the 'findUser' operation
response = client.call(:find_user,
message: { id: 42 })
31
actualRes = response.xml
<?xml version="1.0" encoding="utf-
8"?><soap:Envelope....XMLSchema">
<soap:Body><findUserResponse
xmlns="http://service.example.com">
<findUserResult><Success>true</Success>
<LastName>Smith</LastName>
<FirstName>John</FirstName>
<City>Mountain View</City>
<State>CA</State><WeatherID>
</findUserResult></findUserResponse>
</soap:Body></soap:Envelope>
DEMO: WEB SERVICES
Feature: Get Weather status to display on webpage
As an owner of Traveling Service, I want to be able to get weather status of any
location based on address of client's request
Scenario Outline: Get weather status by address of client's requests
Given The check IP location and weather web services are running
When I send request to get location detail of address "<Address>"
Then I should have ZIP code and "<Country>" of that location
And I send request to get weather status of that location by its ZIP code
Then I should receive current "Temperature, Wind, RelativeHumidity" and "<City_Name>"
and "<State>" of that location
Scenarios:
|Address |Country |City_Name |State |
|www.google.com |United States |Mountain View |California |
32
HOW WE ENGAGE, WHY WE ARE YOUR
BEST PARTNER….
Bright Minds, Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library & Object Definition
Environment Configuration
Web
driver
(IE,CH,FF)
Cassandra
MySQL
Oracle
RESTful
WS
SOAP
WS
Test
Data
Repo.
Reports
/Logs
CORE LAYER
Feature Repository Test
Execution
Tester A Tester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web
Apps
OCI8,
Cassandra
HTTParty
Savon, JSON
Openssl
Capybara
Xmlparser
……….
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library & Object Definition
Environment Configuration
Web
driver
(IE,CH,FF)
Cassandra
MySQL
Oracle
RESTful
WS
SOAP
WS
Test
Data
Repo.
Reports
/Logs
CORE LAYER
Feature Repository Test
Execution
Tester A Tester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web
Apps
OCI8,
Cassandra
HTTParty
Savon, JSON
Openssl
Capybara
Xmlparser
……….
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library & Object Definition
Environment Configuration
Web
driver
(IE,CH,FF)
Cassandra
MySQL
Oracle
RESTful
WS
SOAP
WS
Test
Data
Repo.
Reports
/Logs
CORE LAYER
Feature Repository Test
Execution
Tester A Tester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web
Apps
OCI8,
Cassandra
HTTParty
Savon, JSON
Openssl
Capybara
Xmlparser
……….
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library & Object Definition
Environment Configuration
Web
driver
(IE,CH,FF)
Cassandra
MySQL
Oracle
RESTful
WS
SOAP
WS
Test
Data
Repo.
Reports
/Logs
CORE LAYER
Feature Repository Test
Execution
Tester A Tester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web
Apps
OCI8,
Cassandra
HTTParty
Savon, JSON
Openssl
Capybara
Xmlparser
……….
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library & Object Definition
Environment Configuration
Web
driver
(IE,CH,FF)
Cassandra
MySQL
Oracle
RESTful
WS
SOAP
WS
Test
Data
Repo.
Reports
/Logs
CORE LAYER
Feature Repository Test
Execution
Tester A Tester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web
Apps
OCI8,
Cassandra
HTTParty
Savon, JSON
Openssl
Capybara
Xmlparser
……….
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-Driven
Test Library
Architecture
Functional
Decomposition
Data-Driven
Object Action Argument
Login.txt_usr set myname
Login.txt_pwd set mypass
Login.btn_sign click
Framework
Method
HOW WE ENGAGE, WHY WE ARE YOUR
BEST PARTNER….
Bright Minds, Brilliant Solutions
40
BDD/CUCUMBER – PROS & CONS
41
BDD/CUCUMBER - PROS
 BBD is FRIENDLY and UNDERSTANDABLE by non-
technical User
 Great support from RUBY community - Automation
framework based BDD Cucumber is NOT REALLY
HARD to develop and maintenance
 Support on MULTIPLE PLATFORM, OS and different
browsers
42
BDD/CUCUMBER - CONS
 Incompatibility among GEM versions
 Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNER….
Bright Minds, Brilliant Solutions
43
Q&A
© 2013 KMS Technology
THANK YOU
44
REFERENCES
45
• All about BDD Cucumber: http://cukes.info/
• BDD cucumber book: http://www.amazon.com/The-Cucumber-
Book-Behaviour-Driven-Development/dp/1934356808
• Ruby gems: http://rubygems.org
• Ruby programming: http://www.ruby-lang.org

More Related Content

What's hot

Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...KMS Technology
 
BDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVABDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVASrinivas Katakam
 
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Edureka!
 
What Is Cucumber?
What Is Cucumber?What Is Cucumber?
What Is Cucumber?QATestLab
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework DesignsSauce Labs
 
Test automation
Test automationTest automation
Test automationXavier Yin
 
API Testing following the Test Pyramid
API Testing following the Test PyramidAPI Testing following the Test Pyramid
API Testing following the Test PyramidElias Nogueira
 
Selenium with Cucumber
Selenium  with Cucumber Selenium  with Cucumber
Selenium with Cucumber Knoldus Inc.
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For AgileNaresh Jain
 
Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Mindfire Solutions
 
How to select the right automated testing tool
How to select the right automated testing toolHow to select the right automated testing tool
How to select the right automated testing toolKatalon Studio
 
ATLAS Automation POC
ATLAS Automation POCATLAS Automation POC
ATLAS Automation POCaakashmc
 
Cypress e2e automation testing - day1 intor by: Hassan Hameed
Cypress e2e automation testing -  day1 intor by: Hassan HameedCypress e2e automation testing -  day1 intor by: Hassan Hameed
Cypress e2e automation testing - day1 intor by: Hassan HameedHassan Muhammad
 

What's hot (20)

Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
 
BDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVABDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVA
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
What Is Cucumber?
What Is Cucumber?What Is Cucumber?
What Is Cucumber?
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework Designs
 
Test automation
Test automationTest automation
Test automation
 
API Testing following the Test Pyramid
API Testing following the Test PyramidAPI Testing following the Test Pyramid
API Testing following the Test Pyramid
 
Selenium with Cucumber
Selenium  with Cucumber Selenium  with Cucumber
Selenium with Cucumber
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 
Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)
 
How to select the right automated testing tool
How to select the right automated testing toolHow to select the right automated testing tool
How to select the right automated testing tool
 
ATLAS Automation POC
ATLAS Automation POCATLAS Automation POC
ATLAS Automation POC
 
Cypress e2e automation testing - day1 intor by: Hassan Hameed
Cypress e2e automation testing -  day1 intor by: Hassan HameedCypress e2e automation testing -  day1 intor by: Hassan Hameed
Cypress e2e automation testing - day1 intor by: Hassan Hameed
 
Bdd and spec flow
Bdd and spec flowBdd and spec flow
Bdd and spec flow
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Cucumber ppt
Cucumber pptCucumber ppt
Cucumber ppt
 
Cucumber & gherkin language
Cucumber & gherkin languageCucumber & gherkin language
Cucumber & gherkin language
 
Cucumber_Training_ForQA
Cucumber_Training_ForQACucumber_Training_ForQA
Cucumber_Training_ForQA
 

Similar to Behavior Driven Development and Automation Testing Using Cucumber

Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Rackspace Academy
 
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014Amazon Web Services
 
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fastHow Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fastAtlassian
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformWSO2
 
Performance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverPerformance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverBlazeMeter
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesChris Bailey
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Startedguest1af57e
 
SMC304 Serverless Orchestration with AWS Step Functions
SMC304 Serverless Orchestration with AWS Step FunctionsSMC304 Serverless Orchestration with AWS Step Functions
SMC304 Serverless Orchestration with AWS Step FunctionsAmazon Web Services
 
Deploying your static web app to the Cloud
Deploying your static web app to the CloudDeploying your static web app to the Cloud
Deploying your static web app to the CloudChristoffer Noring
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack APIKrunal Jain
 
점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정Arawn Park
 
The wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesThe wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesAdi Ofri
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2aIvan Ma
 
Serverless archtiectures
Serverless archtiecturesServerless archtiectures
Serverless archtiecturesIegor Fadieiev
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAmazon Web Services
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Emerson Eduardo Rodrigues Von Staffen
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...Amazon Web Services
 
How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case Kai Sasaki
 

Similar to Behavior Driven Development and Automation Testing Using Cucumber (20)

Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
 
Iac d.damyanov 4.pptx
Iac d.damyanov 4.pptxIac d.damyanov 4.pptx
Iac d.damyanov 4.pptx
 
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
 
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fastHow Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 Platform
 
Performance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverPerformance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & Webdriver
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Started
 
SMC304 Serverless Orchestration with AWS Step Functions
SMC304 Serverless Orchestration with AWS Step FunctionsSMC304 Serverless Orchestration with AWS Step Functions
SMC304 Serverless Orchestration with AWS Step Functions
 
Deploying your static web app to the Cloud
Deploying your static web app to the CloudDeploying your static web app to the Cloud
Deploying your static web app to the Cloud
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack API
 
점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정
 
The wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesThe wild wild west of Selenium Capabilities
The wild wild west of Selenium Capabilities
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
 
Serverless archtiectures
Serverless archtiecturesServerless archtiectures
Serverless archtiectures
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for Government
 
Serverless Apps with AWS Step Functions
Serverless Apps with AWS Step FunctionsServerless Apps with AWS Step Functions
Serverless Apps with AWS Step Functions
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case
 

More from KMS Technology

A journey to a Full Stack Tester
A journey to a Full Stack Tester A journey to a Full Stack Tester
A journey to a Full Stack Tester KMS Technology
 
React & Redux, how to scale?
React & Redux, how to scale?React & Redux, how to scale?
React & Redux, how to scale?KMS Technology
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testingCommon design principles and design patterns in automation testing
Common design principles and design patterns in automation testingKMS Technology
 
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOpsKMS Technology
 
What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?KMS Technology
 
JavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy LanguageJavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy LanguageKMS Technology
 
JavaScript No longer A “toy” Language
JavaScript No longer A “toy” LanguageJavaScript No longer A “toy” Language
JavaScript No longer A “toy” LanguageKMS Technology
 
Preparations For A Successful Interview
Preparations For A Successful InterviewPreparations For A Successful Interview
Preparations For A Successful InterviewKMS Technology
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page ApplicationKMS Technology
 
AWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkAWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkKMS Technology
 
Technology Application Development Trends For IT Students
Technology Application Development Trends For IT StudentsTechnology Application Development Trends For IT Students
Technology Application Development Trends For IT StudentsKMS Technology
 
Contributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project SeminarContributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project SeminarKMS Technology
 
Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014KMS Technology
 
Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014KMS Technology
 
Cross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin WebinarCross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin WebinarKMS Technology
 
Software Testing Process & Trend
Software Testing Process & TrendSoftware Testing Process & Trend
Software Testing Process & TrendKMS Technology
 

More from KMS Technology (20)

A journey to a Full Stack Tester
A journey to a Full Stack Tester A journey to a Full Stack Tester
A journey to a Full Stack Tester
 
React & Redux, how to scale?
React & Redux, how to scale?React & Redux, how to scale?
React & Redux, how to scale?
 
Sexy React Stack
Sexy React StackSexy React Stack
Sexy React Stack
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testingCommon design principles and design patterns in automation testing
Common design principles and design patterns in automation testing
 
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
 
KMSNext Roadmap
KMSNext RoadmapKMSNext Roadmap
KMSNext Roadmap
 
KMS Introduction
KMS IntroductionKMS Introduction
KMS Introduction
 
What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?
 
JavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy LanguageJavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy Language
 
JavaScript No longer A “toy” Language
JavaScript No longer A “toy” LanguageJavaScript No longer A “toy” Language
JavaScript No longer A “toy” Language
 
Preparations For A Successful Interview
Preparations For A Successful InterviewPreparations For A Successful Interview
Preparations For A Successful Interview
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
 
AWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkAWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic Beanstalk
 
KMS Introduction
KMS IntroductionKMS Introduction
KMS Introduction
 
Technology Application Development Trends For IT Students
Technology Application Development Trends For IT StudentsTechnology Application Development Trends For IT Students
Technology Application Development Trends For IT Students
 
Contributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project SeminarContributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project Seminar
 
Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014
 
Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014
 
Cross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin WebinarCross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin Webinar
 
Software Testing Process & Trend
Software Testing Process & TrendSoftware Testing Process & Trend
Software Testing Process & Trend
 

Recently uploaded

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Behavior Driven Development and Automation Testing Using Cucumber

  • 1. BEHAVIOR-DRIVEN DEVELOPMENT (BDD) AND AUTOMATION TESTING WITH CUCUMBER November 2013 KMS Technology: http://kms-technology.com 1
  • 2. SAMPLE REQUIREMENT Feature: login to the system. As a user, I want to login into the system when I provide username and password. Scenario: login successfully Given the login page is opening When I input username into the username textbox And I input valid password into the password textbox And I click Login button Then I am on the Home page 2
  • 3. AUTOMATION TEST @Test public void fb_login_test() throws Exception { driver.get("https://www.facebook.com/"); driver.findElement(By.id("email")).clear(); driver.findElement(By.id("email")).sendKeys("bddtest@yahoo.com"); driver.findElement(By.id("pass")).clear(); driver.findElement(By.id("pass")).sendKeys("********"); driver.findElement(By.id("u_0_e")).click(); } 3
  • 5. AGENDA BDD and Agile Development Practice Automation Testing with Cucumber Developing Cucumber-Based Automation Framework BDD/Cucumber – Pros & Cons 5
  • 6. HOW WE ENGAGE, WHY WE ARE YOUR BEST PARTNER…. Bright Minds, Brilliant Solutions 6 BDD & AGILE DEVELOPMENT PRACTICE
  • 9. BDD AND AGILE DEVELOPMENT PRACTICE 9
  • 10. HOW WE ENGAGE, WHY WE ARE YOUR BEST PARTNER…. Bright Minds, Brilliant Solutions 10 AUTOMATION TESTING WITH CUCUMBER
  • 11. CUCUMBER APPROACH 11 Given /^I launch "([^"]*)" page$/ do |page| visit(page) End When /^I fill in "([^"]*)" with "([^"]*)"$/ do |field, value| fill_in field, :with => value end
  • 12. SCENARIO EXAMPLE IN BDD FORMAT Feature: login to the system. As a user, I want to login into the system when I provide username and password. @tag_login_email Scenario Outline: Verify that can login gmail Given I launch "https://accounts.google.com" page When I fill in “Email " with “<Email >" And I fill in “Passwd" with "<Password> " And I click on "signIn" button Then I am on the “Home” page Scenarios: | Email | Password | | kms.admin@gmail.com | kms@2013 | | kms.user@gmail.com | kms@1234 | 12
  • 13. HOW CUCUMBER EXECUTE A SCENARIO 13
  • 15. TESTING AREA Web application Web services • Desktop application – http://pragprog.com/book/idgtr/scripted-gui-testing-with-ruby • Mobile application – http://www.moncefbelyamani.com/ios-automated-testing-with-calabash-cucumber-ruby/ 15
  • 16. CASE STUDY Complete 70% automation testing following agile process for a Healthcare Data Provider Client: – Health Market Science (HMS) Business Challenges: – 90% automation testing must be done for every 4- week sprint – Big Data Technology – Since MySQL, Oracle to NoSQL, Cassandra, Storm, Hadoop – Complicated test data creation 16
  • 17. INSTALLATION • Ruby: – Windows: http://rubyinstaller.org/ – Linux: https://rvm.io/rvm/install • Cucumber: • gem install cucumber http://rubygems.org/gems/cucumber 17
  • 18. DEMO • Web application: Cucumber + Capybara • Web Services: Cucumber + HTTParty + Savon 18
  • 19. DEMO: WEB APPLICATION 19 Cucumber Capybara Selenium WebDriver Poltergeist phantomjs
  • 21. 21 Navigating • (Object) visit(url) – The request method is always GET. – url (String) - The relative/absolute URL to navigate to. – Examples: • visit('http://google.com') DEMO: WEB APPLICATION
  • 22. 22 Navigating Action • (Object) click_link(locator, options = {}) – Finds a link by id or text and clicks it. • (Object) click_button(locator, options = {}) – Finds a button by id, text or value and clicks it. • (Object) fill_in(locator, options = {}) – Locate a text field or text area. The field can be found via its name, id or label text. DEMO: WEB APPLICATION
  • 23. 23 Navigating Action Check Point • (Boolean) has_content?(content) / • (Boolean) has_no_content?(content) – content (String) - The text to check for – Examples: • page.has_content?(‘hello’) • page.has_no_content?(‘hello’) DEMO: WEB APPLICATION
  • 24. 24 Navigating Action Check Point • RSpec magic matchers – page.should have_selector('table tr') – page.should have_no_selector(:content) – page.should have_css('table tr.foo') – page.should have_content('foo') DEMO: WEB APPLICATION
  • 26. Regular ExpressionRegular Expression Regular Expression DEMO: WEB APPLICATION
  • 27. HOW WE ENGAGE, WHY WE ARE YOUR BEST PARTNER…. Bright Minds, Brilliant Solutions 27 TAKE A REST
  • 28. DEMO • Web Services: Cucumber + HTTParty + Savon 28
  • 29. DEMO: WEB SERVICES 29 • At a glance: RESTful Web Service SOAP Web Service HTTParty/ RestClient /Json Savon Libs Cukes! GET/POST: Content: JSON {“data_id”:”1001”, “active”:”yes” “age”:”29”} GET/POST: Content: XML <SOAP:Env xlms… <data_id>1001</data_id> <active>yes</active> <age>29</age> </SOAP:Env>
  • 30. DEMO: WEB SERVICES HTTParty HTTParty.get 'http://myexample.com/newfeeds‘  Response.body={“id”:”100”,”Message”:”Hello”} HTTParty.post 'http://myexample.com/updateStatus', {:date => “Nov-11-2013”, :status => “Full of energy today”}  Response.body={“update”:”success”,”id”:”425”} HTTParty.put 'http://myexample.com/status/message’, {:timeout => 5000}  Response.body={“success”:”true”,”message”:”me ssage_1377057406713”} HTTParty.delete 'http://myexample.com/status/message_13770574067 14‘ => Response.body={“success”:”false”,”reason”:”non- exist”} 30 JSON ActualRslt = JSON.parse(response.body) Msg1 = ActualRslt[“message”] #= “Hello” ActualRslt = JSON.parse(response.body) Msg1 = ActualRslt[“update”] #= “success” ActualRslt = JSON.parse(response.body) Msg1 = ActualRslt[“message”] #= “message_1377057406713” ActualRslt = JSON.parse(response.body) Msg1 = ActualRslt[“success”] #= “false” Msg1 = ActualRslt[“reason”] #= “non-exist”
  • 31. DEMO: WEB SERVICES Savon # create a client for the service client = Savon.client(wsdl: 'http://service.example.com?wsdl') client.operations => [:find_user, :list_users] # call the 'findUser' operation response = client.call(:find_user, message: { id: 42 }) 31 actualRes = response.xml <?xml version="1.0" encoding="utf- 8"?><soap:Envelope....XMLSchema"> <soap:Body><findUserResponse xmlns="http://service.example.com"> <findUserResult><Success>true</Success> <LastName>Smith</LastName> <FirstName>John</FirstName> <City>Mountain View</City> <State>CA</State><WeatherID> </findUserResult></findUserResponse> </soap:Body></soap:Envelope>
  • 32. DEMO: WEB SERVICES Feature: Get Weather status to display on webpage As an owner of Traveling Service, I want to be able to get weather status of any location based on address of client's request Scenario Outline: Get weather status by address of client's requests Given The check IP location and weather web services are running When I send request to get location detail of address "<Address>" Then I should have ZIP code and "<Country>" of that location And I send request to get weather status of that location by its ZIP code Then I should receive current "Temperature, Wind, RelativeHumidity" and "<City_Name>" and "<State>" of that location Scenarios: |Address |Country |City_Name |State | |www.google.com |United States |Mountain View |California | 32
  • 33. HOW WE ENGAGE, WHY WE ARE YOUR BEST PARTNER…. Bright Minds, Brilliant Solutions 33 DEVELOPING CUCUMBER-BASED AUTOMATION FRAMEWORK
  • 34. DEVELOPING CUCUMBER-BASED AUTOMATION FRAMEWORK 34 Web Service UIDatabase Step Library & Object Definition Environment Configuration Web driver (IE,CH,FF) Cassandra MySQL Oracle RESTful WS SOAP WS Test Data Repo. Reports /Logs CORE LAYER Feature Repository Test Execution Tester A Tester B Tester C Tester D TRANSLATION LAYER DESCRIPTION LAYER Web Apps OCI8, Cassandra HTTParty Savon, JSON Openssl Capybara Xmlparser ……….
  • 35. DEVELOPING CUCUMBER-BASED AUTOMATION FRAMEWORK 35 Web Service UIDatabase Step Library & Object Definition Environment Configuration Web driver (IE,CH,FF) Cassandra MySQL Oracle RESTful WS SOAP WS Test Data Repo. Reports /Logs CORE LAYER Feature Repository Test Execution Tester A Tester B Tester C Tester D TRANSLATION LAYER DESCRIPTION LAYER Web Apps OCI8, Cassandra HTTParty Savon, JSON Openssl Capybara Xmlparser ……….
  • 36. DEVELOPING CUCUMBER-BASED AUTOMATION FRAMEWORK 36 Web Service UIDatabase Step Library & Object Definition Environment Configuration Web driver (IE,CH,FF) Cassandra MySQL Oracle RESTful WS SOAP WS Test Data Repo. Reports /Logs CORE LAYER Feature Repository Test Execution Tester A Tester B Tester C Tester D TRANSLATION LAYER DESCRIPTION LAYER Web Apps OCI8, Cassandra HTTParty Savon, JSON Openssl Capybara Xmlparser ……….
  • 37. DEVELOPING CUCUMBER-BASED AUTOMATION FRAMEWORK 37 Web Service UIDatabase Step Library & Object Definition Environment Configuration Web driver (IE,CH,FF) Cassandra MySQL Oracle RESTful WS SOAP WS Test Data Repo. Reports /Logs CORE LAYER Feature Repository Test Execution Tester A Tester B Tester C Tester D TRANSLATION LAYER DESCRIPTION LAYER Web Apps OCI8, Cassandra HTTParty Savon, JSON Openssl Capybara Xmlparser ……….
  • 38. DEVELOPING CUCUMBER-BASED AUTOMATION FRAMEWORK 38 Web Service UIDatabase Step Library & Object Definition Environment Configuration Web driver (IE,CH,FF) Cassandra MySQL Oracle RESTful WS SOAP WS Test Data Repo. Reports /Logs CORE LAYER Feature Repository Test Execution Tester A Tester B Tester C Tester D TRANSLATION LAYER DESCRIPTION LAYER Web Apps OCI8, Cassandra HTTParty Savon, JSON Openssl Capybara Xmlparser ……….
  • 39. 39 DEVELOPING CUCUMBER-BASED AUTOMATION FRAMEWORK A Hybrid Test Automation Framework Keyword-Driven Test Library Architecture Functional Decomposition Data-Driven Object Action Argument Login.txt_usr set myname Login.txt_pwd set mypass Login.btn_sign click Framework Method
  • 40. HOW WE ENGAGE, WHY WE ARE YOUR BEST PARTNER…. Bright Minds, Brilliant Solutions 40 BDD/CUCUMBER – PROS & CONS
  • 41. 41 BDD/CUCUMBER - PROS  BBD is FRIENDLY and UNDERSTANDABLE by non- technical User  Great support from RUBY community - Automation framework based BDD Cucumber is NOT REALLY HARD to develop and maintenance  Support on MULTIPLE PLATFORM, OS and different browsers
  • 42. 42 BDD/CUCUMBER - CONS  Incompatibility among GEM versions  Lacking of tool for managing Features and Scenarios effectively
  • 43. ARE YOUR BEST PARTNER…. Bright Minds, Brilliant Solutions 43 Q&A
  • 44. © 2013 KMS Technology THANK YOU 44
  • 45. REFERENCES 45 • All about BDD Cucumber: http://cukes.info/ • BDD cucumber book: http://www.amazon.com/The-Cucumber- Book-Behaviour-Driven-Development/dp/1934356808 • Ruby gems: http://rubygems.org • Ruby programming: http://www.ruby-lang.org