View
13.039
Download
2
Category
Tags:
Preview:
Citation preview
BEHAVIOR-DRIVEN DEVELOPMENT (BDD)
AND AUTOMATION TESTING WITH CUCUMBER
November 2013
KMS Technology httpkms-technologycom
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
driverget(httpswwwfacebookcom)
driverfindElement(Byid(email))clear()
driverfindElement(Byid(email))sendKeys(bddtestyahoocom)
driverfindElement(Byid(pass))clear()
driverfindElement(Byid(pass))sendKeys()
driverfindElement(Byid(u_0_e))click()
3
HOW
4
AGENDA
BDD and Agile Development Practice
Automation Testing with Cucumber
Developing Cucumber-Based Automation
Framework
BDDCucumber ndash Pros amp Cons
5
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
6
BDD amp 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 PARTNERhellip
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 =gt value
end
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
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
driverget(httpswwwfacebookcom)
driverfindElement(Byid(email))clear()
driverfindElement(Byid(email))sendKeys(bddtestyahoocom)
driverfindElement(Byid(pass))clear()
driverfindElement(Byid(pass))sendKeys()
driverfindElement(Byid(u_0_e))click()
3
HOW
4
AGENDA
BDD and Agile Development Practice
Automation Testing with Cucumber
Developing Cucumber-Based Automation
Framework
BDDCucumber ndash Pros amp Cons
5
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
6
BDD amp 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 PARTNERhellip
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 =gt value
end
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
AUTOMATION TEST
Test
public void fb_login_test() throws Exception
driverget(httpswwwfacebookcom)
driverfindElement(Byid(email))clear()
driverfindElement(Byid(email))sendKeys(bddtestyahoocom)
driverfindElement(Byid(pass))clear()
driverfindElement(Byid(pass))sendKeys()
driverfindElement(Byid(u_0_e))click()
3
HOW
4
AGENDA
BDD and Agile Development Practice
Automation Testing with Cucumber
Developing Cucumber-Based Automation
Framework
BDDCucumber ndash Pros amp Cons
5
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
6
BDD amp 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 PARTNERhellip
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 =gt value
end
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
HOW
4
AGENDA
BDD and Agile Development Practice
Automation Testing with Cucumber
Developing Cucumber-Based Automation
Framework
BDDCucumber ndash Pros amp Cons
5
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
6
BDD amp 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 PARTNERhellip
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 =gt value
end
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
AGENDA
BDD and Agile Development Practice
Automation Testing with Cucumber
Developing Cucumber-Based Automation
Framework
BDDCucumber ndash Pros amp Cons
5
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
6
BDD amp 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 PARTNERhellip
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 =gt value
end
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
6
BDD amp 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 PARTNERhellip
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 =gt value
end
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
BEHAVIOR-DRIVEN DEVELOPMENT
7
GIVEN WHEN THEN
8
BDD AND AGILE DEVELOPMENT
PRACTICE
9
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
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 =gt value
end
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
GIVEN WHEN THEN
8
BDD AND AGILE DEVELOPMENT
PRACTICE
9
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
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 =gt value
end
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
BDD AND AGILE DEVELOPMENT
PRACTICE
9
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
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 =gt value
end
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
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 =gt value
end
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
CUCUMBER APPROACH
11
Given ^I launch ([^]) page$ do |page|
visit(page)
End
When ^I fill in ([^]) with ([^])$ do |field value|
fill_in field with =gt value
end
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
SCENARIO EXAMPLE
IN BDD FORMATFeature 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 httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquoltEmail gt
And I fill in ldquoPasswd with ltPasswordgt
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenarios
| Email | Password |
| kmsadmingmailcom | kms2013 |
| kmsusergmailcom | kms1234 |
12
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
HOW CUCUMBER EXECUTE A
SCENARIO
13
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
SUMMARY
14
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
TESTING AREA
Web application
Web services
bull Desktop applicationndash httppragprogcombookidgtrscripted-gui-testing-with-ruby
bull Mobile applicationndash httpwwwmoncefbelyamanicomios-automated-testing-with-calabash-cucumber-ruby
15
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
CASE STUDY
Complete 70 automation testing following
agile process for a Healthcare Data Provider
Client ndash Health Market Science (HMS)
Business Challengesndash 90 automation testing must be done for every 4-
week sprint
ndash Big Data Technology ndash Since MySQL Oracle to
NoSQL Cassandra Storm Hadoop
ndash Complicated test data creation
16
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
INSTALLATION
bull Ruby
ndash Windows httprubyinstallerorg
ndash Linux httpsrvmiorvminstall
bull Cucumber
bull gem install cucumber httprubygemsorggemscucumber
17
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEMO
bull Web application
Cucumber + Capybara
bull Web Services
Cucumber + HTTParty + Savon
18
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEMO WEB APPLICATION
19
Cucumber Capybara
Selenium
WebDriver
Poltergeist
phantomjs
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
20
DEMO WEB APPLICATION
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
21
Navigating
bull (Object) visit(url)
ndash The request method is always GET
ndash url (String) - The relativeabsolute URL to navigate to
ndash Examples
bull visit(httpgooglecom)
DEMO WEB APPLICATION
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
22
Navigating
Action
bull (Object) click_link(locator options = )
ndash Finds a link by id or text and clicks it
bull (Object) click_button(locator options = )
ndash Finds a button by id text or value and clicks it
bull (Object) fill_in(locator options = )
ndash Locate a text field or text area The field can be found via its
name id or label text
DEMO WEB APPLICATION
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
23
Navigating
ActionCheck Point
bull (Boolean) has_content(content)
bull (Boolean) has_no_content(content)
ndash content (String) - The text to check for
ndash Examples
bull pagehas_content(lsquohellorsquo)
bull pagehas_no_content(lsquohellorsquo)
DEMO WEB APPLICATION
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
24
Navigating
ActionCheck Point
bull RSpec magic matchers
ndash pageshould have_selector(table tr)
ndash pageshould have_no_selector(content)
ndash pageshould have_css(table trfoo)
ndash pageshould 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 PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEMO WEB APPLICATION
Regular ExpressionRegular Expression
Regular Expression
DEMO WEB APPLICATION
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
Regular ExpressionRegular Expression
Regular Expression
DEMO WEB APPLICATION
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
27
TAKE A REST
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEMO
bull Web Services
Cucumber + HTTParty + Savon
28
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEMO WEB SERVICES
29
bull At a glance
RESTfulWeb
Service
SOAP Web Service
HTTPartyRestClient
JsonSavon
Libs
Cukes
GETPOST
Content JSON
ldquodata_idrdquordquo1001rdquo
ldquoactiverdquordquoyesrdquo
ldquoagerdquordquo29rdquo
GETPOST
Content XMLltSOAPEnv xlmshellip
ltdata_idgt1001ltdata_idgt
ltactivegtyesltactivegt
ltagegt29ltagegt
ltSOAPEnvgt
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEMO WEB SERVICES
HTTPartyHTTPartyget httpmyexamplecomnewfeedslsquo
Responsebody=ldquoidrdquordquo100rdquordquoMessagerdquordquoHellordquo
HTTPartypost httpmyexamplecomupdateStatus
date =gt ldquoNov-11-2013rdquo status =gt ldquoFull of energy
todayrdquo
Responsebody=ldquoupdaterdquordquosuccessrdquordquoidrdquordquo425rdquo
HTTPartyput httpmyexamplecomstatusmessagersquo
timeout =gt 5000
Responsebody=ldquosuccessrdquordquotruerdquordquomessagerdquordquome
ssage_1377057406713rdquo
HTTPartydelete
httpmyexamplecomstatusmessage_13770574067
14lsquo
=gt Responsebody=ldquosuccessrdquordquofalserdquordquoreasonrdquordquonon-
existrdquo
30
JSONActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo] = ldquoHellordquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquoupdaterdquo] = ldquosuccessrdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquomessagerdquo]
= ldquomessage_1377057406713rdquo
ActualRslt = JSONparse(responsebody)
Msg1 = ActualRslt[ldquosuccessrdquo] = ldquofalserdquo
Msg1 = ActualRslt[ldquoreasonrdquo] = ldquonon-existrdquo
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEMO WEB SERVICES
Savon
create a client for the service
client = Savonclient(wsdl
httpserviceexamplecomwsdl)
clientoperations
=gt [find_user list_users]
call the findUser operation
response = clientcall(find_user
message id 42 )
31
actualRes = responsexml
ltxml version=10 encoding=utf-
8gtltsoapEnvelopeXMLSchemagt
ltsoapBodygtltfindUserResponse
xmlns=httpserviceexamplecomgt
ltfindUserResultgtltSuccessgttrueltSuccessgt
ltLastNamegtSmithltLastNamegt
ltFirstNamegtJohnltFirstNamegt
ltCitygtMountain ViewltCitygt
ltStategtCAltStategtltWeatherIDgt
ltfindUserResultgtltfindUserResponsegt
ltsoapBodygtltsoapEnvelopegt
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
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 clients request
Scenario Outline Get weather status by address of clients requests
Given The check IP location and weather web services are running
When I send request to get location detail of address ltAddressgt
Then I should have ZIP code and ltCountrygt 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 ltCity_Namegt
and ltStategt of that location
Scenarios
|Address |Country |City_Name |State |
|wwwgooglecom |United States |Mountain View |California |
32
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
33
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
34
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
35
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
36
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
37
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
38
Web Service UIDatabase
Step Library amp Object Definition
Environment Configuration
Web driver
(IECHFF)Cassandra
MySQL
Oracle
RESTfulWS
SOAP WS
Test
Data
Repo
Reports
Logs
CORE LAYER
Feature Repository Test
Execution
Tester ATester B Tester C Tester D
TRANSLATION LAYER
DESCRIPTION LAYER
Web Apps
OCI8Cassandra
HTTPartySavon JSON
OpensslCapybara
Xmlparserhelliphelliphellip
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
39
DEVELOPING CUCUMBER-BASED
AUTOMATION FRAMEWORK
A Hybrid Test Automation Framework
Keyword-DrivenTest Library Architecture
Functional Decomposition
Data-Driven
Object Action Argument
Logintxt_usr set myname
Logintxt_pwd set mypass
Loginbtn_sign click
Framework
Method
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
HOW WE ENGAGE WHY WE ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
40
BDDCUCUMBER ndash PROS amp CONS
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
41
BDDCUCUMBER - 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
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
42
BDDCUCUMBER - CONS
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
ARE YOUR BEST PARTNERhellip
Bright Minds Brilliant Solutions
43
QampA
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
copy 2013 KMS Technology
THANK YOU
44
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
REFERENCES
45
bull All about BDD Cucumber httpcukesinfo
bull BDD cucumber book httpwwwamazoncomThe-Cucumber-
Book-Behaviour-Driven-Developmentdp1934356808
bull Ruby gems httprubygemsorg
bull Ruby programming httpwwwruby-langorg
Recommended