[thong nguyen & trong bui] behavior driven development (bdd) and automation testing with...
DESCRIPTION
“How are business users assured that all features are built and tested?”. “Test cases written by the test teams are too technical for business users”. If you find yourself in the above situations, Behavior-Driven Development (BDD) may be a good choice for your team. In this presentation, we will discuss BDD as an agile development practice, automation testing using Cucumber as well as the advantages and disadvantages of BDD/Cucumber.TRANSCRIPT
Behavior-Driven Development (BDD) And Automation Testing With
Cucumber
TRONG BUI amp THONG NGUYEN
STC 2014
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
Automation Test
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
4
Behavior-Driven Development (BDD)
And Automation Testing With Cucumber
5
AGENDA
Behavior-driven development
Automation Testing with Cucumber
BDDCucumber ndash Pros amp Cons
QampA
6
7
Behavior-driven development
Behavior-driven development
8
Given When Then
9
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
Feature Login to Email system
As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
Given I launch httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquohcmc-stc-12-julgmailcom
And I fill in ldquoPasswd with ldquohcmc-stc-passwd
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
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
Automation Test
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
4
Behavior-Driven Development (BDD)
And Automation Testing With Cucumber
5
AGENDA
Behavior-driven development
Automation Testing with Cucumber
BDDCucumber ndash Pros amp Cons
QampA
6
7
Behavior-driven development
Behavior-driven development
8
Given When Then
9
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
Feature Login to Email system
As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
Given I launch httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquohcmc-stc-12-julgmailcom
And I fill in ldquoPasswd with ldquohcmc-stc-passwd
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
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
Automation Test
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
4
Behavior-Driven Development (BDD)
And Automation Testing With Cucumber
5
AGENDA
Behavior-driven development
Automation Testing with Cucumber
BDDCucumber ndash Pros amp Cons
QampA
6
7
Behavior-driven development
Behavior-driven development
8
Given When Then
9
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
Feature Login to Email system
As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
Given I launch httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquohcmc-stc-12-julgmailcom
And I fill in ldquoPasswd with ldquohcmc-stc-passwd
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
Automation Test
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
4
Behavior-Driven Development (BDD)
And Automation Testing With Cucumber
5
AGENDA
Behavior-driven development
Automation Testing with Cucumber
BDDCucumber ndash Pros amp Cons
QampA
6
7
Behavior-driven development
Behavior-driven development
8
Given When Then
9
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
Feature Login to Email system
As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
Given I launch httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquohcmc-stc-12-julgmailcom
And I fill in ldquoPasswd with ldquohcmc-stc-passwd
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
Behavior-Driven Development (BDD)
And Automation Testing With Cucumber
5
AGENDA
Behavior-driven development
Automation Testing with Cucumber
BDDCucumber ndash Pros amp Cons
QampA
6
7
Behavior-driven development
Behavior-driven development
8
Given When Then
9
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
Feature Login to Email system
As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
Given I launch httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquohcmc-stc-12-julgmailcom
And I fill in ldquoPasswd with ldquohcmc-stc-passwd
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
AGENDA
Behavior-driven development
Automation Testing with Cucumber
BDDCucumber ndash Pros amp Cons
QampA
6
7
Behavior-driven development
Behavior-driven development
8
Given When Then
9
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
Feature Login to Email system
As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
Given I launch httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquohcmc-stc-12-julgmailcom
And I fill in ldquoPasswd with ldquohcmc-stc-passwd
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
7
Behavior-driven development
Behavior-driven development
8
Given When Then
9
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
Feature Login to Email system
As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
Given I launch httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquohcmc-stc-12-julgmailcom
And I fill in ldquoPasswd with ldquohcmc-stc-passwd
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
Behavior-driven development
8
Given When Then
9
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
Feature Login to Email system
As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
Given I launch httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquohcmc-stc-12-julgmailcom
And I fill in ldquoPasswd with ldquohcmc-stc-passwd
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
Given When Then
9
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
Feature Login to Email system
As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
Given I launch httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquohcmc-stc-12-julgmailcom
And I fill in ldquoPasswd with ldquohcmc-stc-passwd
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
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
Feature Login to Email system
As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
Given I launch httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquohcmc-stc-12-julgmailcom
And I fill in ldquoPasswd with ldquohcmc-stc-passwd
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
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
Feature Login to Email system
As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
Given I launch httpsaccountsgooglecom page
When I fill in ldquoEmail with ldquohcmc-stc-12-julgmailcom
And I fill in ldquoPasswd with ldquohcmc-stc-passwd
And I click on signIn button
Then I am on the ldquoHomerdquo page
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
Scenario Example in BDD Format
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
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 | | hcmc-stc-12-julgmailcom | hcmc-stc2013| | hcmc-stc-usergmailcom | hcmc-stc1234|
12
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
Summary
13
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
Demo
bull Web application Cucumber + Capybara
bull Web services Cucumber + HTTParty + Savon
14
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
Demo Web Application
15
Feature Login to Email system As an employee I want to login into my email system with provided username and password
Scenario Verify that employee could login email system
tag_login_email Scenario Outline Verify that employee could login email system 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 should see text ltMessagegtldquo Scenarios | Email | Password | Message | | demo01hcmcstcgmailcom | demo2013 | Primary Email demo01hellip | | demo02hcmcstcgmailcom | demo11234 | Primary Email demo02hellip | | Nonexisthcmcstcgmailcom | demo11234 | Invalid email or password|
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
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 |
16
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
17
BDDCUCUMBER ndash PROS amp CONS
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
18
BDDCucumber - Pros
BBD is FRIENDLY and UNDERSTANDABLE by non-
technical users
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
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
19
BDDCucumber - Cons
Incompatibility among GEM versions
Lacking of tool for managing Features and
Scenarios effectively
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
20
QampA
References
21
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 2014 HCMC Software Testing Club
THANK YOU
References
21
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 2014 HCMC Software Testing Club
THANK YOU
copy 2014 HCMC Software Testing Club
THANK YOU