SlideShare a Scribd company logo
Continuous Integration using Thucydides(BDD
with selenium
By : Khyati Shegal
Swati Jain
Content
BDD
BDD vs TDD
JBehave
JBehave & Selenium
Page Objects
Q & A
Challenges in Web
Automation
Dynamic nature of web pages
Ever changing Javascript world and cross
browser support
Simulating real user experience
Writing automation test at a low level (E.g >
click , select )
Robust handling of environment and response
slowness
Developer centric test cases
Continuous integration using thucydides(bdd) with  selenium
BDD Vs TDD
BDD : $(count)should-be(5)
TDD assertEquals(count 5)
Tools we are proposing
»Selenium 2.0 (Webdriver) ˃ Advanced browser testing
API
»Thucydides >automation framework designed to make it
easier to write automated acceptance tests using Selenium
2.
» Jenkins (Or Any other CI Tool) ˃ To support continuous
integration approach
Webdriver/Selenium 2.*
»Webdriver is an Advanced API to interact with
browser
» Clean API enables to write robust Automation
Solution
» Browsers Supported – Firefox, IE, Chrome,
Safari, HTMLUnit, Iphone, Android ( Default
browsers for Mobile Phones)
» Supports various programming languages –
Java, C#, Python, etc
» Java is supported out of the box
Continuous integration using thucydides(bdd) with  selenium
Thucydides
By default, Thucydides supports a simple directory-based convention for organizing your requirements. The standard structure uses
three levels: capabilities, features and stories.
+ src
+ test
+ resources
+ stories
+ grow_potatoes [a capability]
+ grow_organic_potatoes [a feature]
- plant_organic_potatoes.story [a story]
- dig_up_organic_potatoes.story [another story]
+ grow_sweet_potatoes [another feature]
...
If you prefer another hierarchy, you can use the thucydides.capability.types system property to override the default convention.
Defining Thucydides Page Objects
Page Objects are a way of isolating the implementation details of a web page inside a class, exposing only business-focused
methods related to that page
Example :-
public class LoginPage extends PageObject {
public LoginPage(WebDriver driver) {
super(driver);
}
@FindBy(id = "username")
private WebElement userName;
@FindBy(css = "button.button")
private WebElement loginButton;
public void inputForm(String username, String password) {
}
public void submitForm() {
}
public void logOut() {
}
public String getResultValue(String value){;
}
}
Continuous integration using thucydides(bdd) with  selenium
Stories
Narrative:
In order to configure on the THM DashBoard
As an Admin
I want to be able to login to the Dashboar
Scenario: Logging in as Admin
Given I am on Login Page
When I input 'admin' and 'alfresco' as Username And
Password
Then I Click Login Button
Then I should see 'logout'
Defining the Test Steps
public class LoginSteps extends ScenarioSteps {
LoginPage loginPage;
@Step
public void enters() {
loginPage.navigateTo(getDriver());
}
@Step
public void provides_credentials(String username, String password) {
loginPage.inputForm(username, password);
}
@Step
public void click_button() {
}
@Step
Step Class
public class LoginTest {
@Steps
LoginSteps login;
@Given("I am on Login Page")
@Alias("the admin is not logged in")
@Then("I am on Login Page")
public void givenIAmOnLoginPage() {
login.enters();
}
@When("I input '$username' and '$password' as Username And Passoword")
public void whenIInputUsernameAndPasswordAsUsernameAndPassoword(String username, String password) {
login.provides_credentials(username, password);
}
@Then("I Click Login Button")
public void thenIClickLoginButton() {
login.click_button();
}
Jenkin Set Up
Jenkins is an open source application which provides continuous integration
services for software development.
Jenkins focuses on the following two jobs:
1. Building/testing software projects continuously,
2. Monitoring executions of externally-run jobs
Command to run test cases :-
mvn clean install -Dstory.timeout.in.secs=30000
Continuous integration using thucydides(bdd) with  selenium
Thucydides Report
Continuous integration using thucydides(bdd) with  selenium
Thank You!!!

More Related Content

PPTX
Introduction to React and MobX
PDF
Javascript basic programs
PPTX
Geb qa fest2017
PPTX
Introduction to jquery mobile with Phonegap
PPTX
Make an html validator extension
PDF
22 j query1
PDF
Devoxx 2014-webComponents
Introduction to React and MobX
Javascript basic programs
Geb qa fest2017
Introduction to jquery mobile with Phonegap
Make an html validator extension
22 j query1
Devoxx 2014-webComponents

What's hot (18)

ODP
HTML5 e CSS3 (slides della sessione tenuta al DIMI di Udine)
PPTX
Javascipt
PDF
DirectToWeb 2.0
PPT
Session,cookies
ODP
jQuery
PPTX
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
PPTX
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
PPTX
Jquery mobile
PDF
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
PPTX
J query resh
PPTX
Knockout.js
PDF
[FEConf Korea 2017]Angular 컴포넌트 대화법
PPTX
CHATBOT using Facebook Messenger
PPTX
J query
PPT
Introduction to j query
PPTX
Harness jQuery Templates and Data Link
PPTX
Jquery beltranhomewrok
PPT
Advanced Skinning with DotNetNuke 5
HTML5 e CSS3 (slides della sessione tenuta al DIMI di Udine)
Javascipt
DirectToWeb 2.0
Session,cookies
jQuery
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
Jquery mobile
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
J query resh
Knockout.js
[FEConf Korea 2017]Angular 컴포넌트 대화법
CHATBOT using Facebook Messenger
J query
Introduction to j query
Harness jQuery Templates and Data Link
Jquery beltranhomewrok
Advanced Skinning with DotNetNuke 5
Ad

Similar to Continuous integration using thucydides(bdd) with selenium (20)

PDF
Continuous integration using thucydides(bdd) with selenium
PPTX
Continuous Security Testing in a Devops World #OWASPHelsinki
PPTX
Continuous Security Testing in a Devops World
PDF
cucumber harpal.pdf
PPT
Behavior Driven Development by Example
ODP
2014 11 20 Drupal 7 -> 8 test migratie
PPTX
Thucydides - a brief review
PPTX
Thucydides
PPT
Selenium
PDF
Bridging the gap between business and technology - Behaviour Driven Developme...
PPTX
Bdd with Cucumber and Mocha
PPT
BDD along with Continuous Integration
PPT
Stc 2015 regional-round-ppt-bdd along with ci
PPTX
Agile methodologies based on BDD and CI by Nikolai Shevchenko
PPTX
Writing automation tests with python selenium behave pageobjects
PPTX
Behat - human-readable automated testing
PPTX
Selenium. going beyond the possible
PPTX
Continuous Security Testing with Devops - OWASP EU 2014
PPTX
CucumberSeleniumWD
PDF
Ui automation
Continuous integration using thucydides(bdd) with selenium
Continuous Security Testing in a Devops World #OWASPHelsinki
Continuous Security Testing in a Devops World
cucumber harpal.pdf
Behavior Driven Development by Example
2014 11 20 Drupal 7 -> 8 test migratie
Thucydides - a brief review
Thucydides
Selenium
Bridging the gap between business and technology - Behaviour Driven Developme...
Bdd with Cucumber and Mocha
BDD along with Continuous Integration
Stc 2015 regional-round-ppt-bdd along with ci
Agile methodologies based on BDD and CI by Nikolai Shevchenko
Writing automation tests with python selenium behave pageobjects
Behat - human-readable automated testing
Selenium. going beyond the possible
Continuous Security Testing with Devops - OWASP EU 2014
CucumberSeleniumWD
Ui automation
Ad

Recently uploaded (20)

PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Well-logging-methods_new................
PDF
composite construction of structures.pdf
DOCX
573137875-Attendance-Management-System-original
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Lecture Notes Electrical Wiring System Components
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
PPT on Performance Review to get promotions
PPTX
Geodesy 1.pptx...............................................
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Sustainable Sites - Green Building Construction
Internet of Things (IOT) - A guide to understanding
Well-logging-methods_new................
composite construction of structures.pdf
573137875-Attendance-Management-System-original
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
CH1 Production IntroductoryConcepts.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Embodied AI: Ushering in the Next Era of Intelligent Systems
Lecture Notes Electrical Wiring System Components
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
R24 SURVEYING LAB MANUAL for civil enggi
PPT on Performance Review to get promotions
Geodesy 1.pptx...............................................
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Sustainable Sites - Green Building Construction

Continuous integration using thucydides(bdd) with selenium

  • 1. Continuous Integration using Thucydides(BDD with selenium By : Khyati Shegal Swati Jain
  • 2. Content BDD BDD vs TDD JBehave JBehave & Selenium Page Objects Q & A
  • 3. Challenges in Web Automation Dynamic nature of web pages Ever changing Javascript world and cross browser support Simulating real user experience Writing automation test at a low level (E.g > click , select ) Robust handling of environment and response slowness Developer centric test cases
  • 5. BDD Vs TDD BDD : $(count)should-be(5) TDD assertEquals(count 5)
  • 6. Tools we are proposing »Selenium 2.0 (Webdriver) ˃ Advanced browser testing API »Thucydides >automation framework designed to make it easier to write automated acceptance tests using Selenium 2. » Jenkins (Or Any other CI Tool) ˃ To support continuous integration approach
  • 7. Webdriver/Selenium 2.* »Webdriver is an Advanced API to interact with browser » Clean API enables to write robust Automation Solution » Browsers Supported – Firefox, IE, Chrome, Safari, HTMLUnit, Iphone, Android ( Default browsers for Mobile Phones) » Supports various programming languages – Java, C#, Python, etc » Java is supported out of the box
  • 9. Thucydides By default, Thucydides supports a simple directory-based convention for organizing your requirements. The standard structure uses three levels: capabilities, features and stories. + src + test + resources + stories + grow_potatoes [a capability] + grow_organic_potatoes [a feature] - plant_organic_potatoes.story [a story] - dig_up_organic_potatoes.story [another story] + grow_sweet_potatoes [another feature] ... If you prefer another hierarchy, you can use the thucydides.capability.types system property to override the default convention.
  • 10. Defining Thucydides Page Objects Page Objects are a way of isolating the implementation details of a web page inside a class, exposing only business-focused methods related to that page Example :- public class LoginPage extends PageObject { public LoginPage(WebDriver driver) { super(driver); } @FindBy(id = "username") private WebElement userName; @FindBy(css = "button.button") private WebElement loginButton; public void inputForm(String username, String password) { } public void submitForm() { } public void logOut() { } public String getResultValue(String value){; } }
  • 12. Stories Narrative: In order to configure on the THM DashBoard As an Admin I want to be able to login to the Dashboar Scenario: Logging in as Admin Given I am on Login Page When I input 'admin' and 'alfresco' as Username And Password Then I Click Login Button Then I should see 'logout'
  • 13. Defining the Test Steps public class LoginSteps extends ScenarioSteps { LoginPage loginPage; @Step public void enters() { loginPage.navigateTo(getDriver()); } @Step public void provides_credentials(String username, String password) { loginPage.inputForm(username, password); } @Step public void click_button() { } @Step
  • 14. Step Class public class LoginTest { @Steps LoginSteps login; @Given("I am on Login Page") @Alias("the admin is not logged in") @Then("I am on Login Page") public void givenIAmOnLoginPage() { login.enters(); } @When("I input '$username' and '$password' as Username And Passoword") public void whenIInputUsernameAndPasswordAsUsernameAndPassoword(String username, String password) { login.provides_credentials(username, password); } @Then("I Click Login Button") public void thenIClickLoginButton() { login.click_button(); }
  • 15. Jenkin Set Up Jenkins is an open source application which provides continuous integration services for software development. Jenkins focuses on the following two jobs: 1. Building/testing software projects continuously, 2. Monitoring executions of externally-run jobs Command to run test cases :- mvn clean install -Dstory.timeout.in.secs=30000

Editor's Notes

  • #9: Thucydides is built on top of Selenium 2.0
  • #11: In Thucydides, page objects can be just ordinary WebDriver page objects, on the condition that they have a constructor that accepts a WebDriver parameter. However, the Thucydides PageObject class provides a number of utility methods that make page objects more convenient to work with.
  • #16: Jenkins is an award-winning application that monitors executions of repeated jobs, such as building a software project or jobs run by cron. Among those things, current Jenkins focuses on the following two jobs: Building/testing software projects continuously, just like CruiseControl or DamageControl. In a nutshell, Jenkins provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity. Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those that are run on a remote machine. For example, with cron, all you receive is regular e-mails that capture the output, and it is up to you to look at them diligently and notice when it broke. Jenkins keeps those outputs and makes it easy for you to notice when something is wrong.