Continuous Integration using Thucydides
(BDD) with selenium
By : Khyati Shegal
Swati Jain
SOFTWARE DEVELOPMENT DONE RIGHT
Netherlands | USA | India | France | UK

www.xebia.in; Blog :http://.xebee.xebia.in
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
Simulati...
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...
Webdriver/Selenium 2.*
»Webdriver is an Advanced API to interact
with browser
» Clean API enables to write robust
Automati...
Thucydides
By default, Thucydides supports a simple directory-based convention for organizing your requirements. The stand...
Defining Thucydides Page Objects

Page Objects are a way of isolating the implementation details of a web page inside a cl...
Stories
Narrative:
In order to configure on the THM DashBoard
As an Admin
I want to be able to login to the Dashboar
Scena...
Defining the Test Steps
public class LoginSteps extends ScenarioSteps {
LoginPage loginPage;
@Step
public void enters() {
...
Step Class
public class LoginTest {
@Steps
LoginSteps login;
@Given("I am on Login Page")
@Alias("the admin is not logged ...
Jenkin Set Up
Jenkins is an open source application which provides continuous
integration services for software developmen...
Thucydides Report
Agile Testing

Current Competencies

Automation Frameworks in place

Mobile Testing: Appium, Calabash
Performance Testing ...
Contact us @

Websites

www.xebia.in
www.xebia.com
www.xebia.fr

Xebia India

infoindia@xebia.com

Thought Leadership

Htt...
Continuous integration using thucydides(bdd) with selenium
Continuous integration using thucydides(bdd) with selenium
Continuous integration using thucydides(bdd) with selenium
Continuous integration using thucydides(bdd) with selenium
Continuous integration using thucydides(bdd) with selenium
Upcoming SlideShare
Loading in …5
×

Continuous integration using thucydides(bdd) with selenium

5,021 views

Published on

This presentation gives an overview of #challenges in #automation , #types of automation #techniques and which #tools to use to achieve it

Published in: Technology

Continuous integration using thucydides(bdd) with selenium

  1. 1. Continuous Integration using Thucydides (BDD) with selenium By : Khyati Shegal Swati Jain
  2. 2. SOFTWARE DEVELOPMENT DONE RIGHT Netherlands | USA | India | France | UK www.xebia.in; Blog :http://.xebee.xebia.in
  3. 3. Content BDD BDD vs TDD JBehave JBehave & Selenium Page Objects Q&A
  4. 4. 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. 5. BDD Vs TDD BDD : $(count)should-be(5) TDD assertEquals(count 5)
  6. 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. 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
  8. 8. 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 + grow_organic_potatoes [a capability] [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.
  9. 9. 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){; } }
  10. 10. 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'
  11. 11. 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 public void LogOut(){
  12. 12. 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(); }
  13. 13. 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
  14. 14. Thucydides Report
  15. 15. Agile Testing Current Competencies Automation Frameworks in place Mobile Testing: Appium, Calabash Performance Testing Tools: JMeter, LoadUI -  Selenium/Webdriver keyword driven -  SoapUI ATDD Tools: Cucumber, Fitnesse, JBehave, Geb Language Proficiencies: Java, Ruby, Groovy, Python Functional automation Tools: Selenium/Webdriver, AUTO IT, SoapUI, QTP Knowledge Sharing: Speakers in national and international conferences
  16. 16. Contact us @ Websites www.xebia.in www.xebia.com www.xebia.fr Xebia India infoindia@xebia.com Thought Leadership Htto://xebee.xebia.in http://blog.xebia.com http://podcast.xebia.com

×