Automation solution using jbehave, selenium and hudson
1. Pankaj Nakhat
Agile and Automation Test Consultant
pankaj@qainfolabs.com
http://uk.linkedin.com/in/pankajnakhat
http://pankajnakhat.com/blog
2. » Agile and Automation Test Consultant
» 10 Years of experience in Agile Testing,
Coaching and Consulting
» With Major media , Investment Banking and
Product based companies.
» Pankaj Nakhat
˃ http://www.pankajnakhat.com/blog
˃ pankaht@gmail.com
˃ +44 7799663003
˃ +91 9799056600
4. » Dynamic nature of web pages
» Ever changing Javascript world and Browser
Capabilities
» Simulating real user experience
» Writing automation test at a low level (E.g > click ,
select )
» Robust handling of environment and response
slowness
» Reporting point of failure specifically in terms of a
feature
5. » Multi Tier Automation Architecture
» Write test in Domain specific languages
» Intelligent Synchronization based on the
context of the test
» Separating Test intent and Implementation
» Using abstraction techniques to write
maintainable test code.
» Using multi Threaded technologies like
Selenium Grid for Scalability of the tests
6. » Selenium 2.0 (Webdriver)
˃ Advanced browser testing API
» Jbehave
˃ BDD Tool to support writing Test in language people speak.
» Hudson (Or Any other CI Tool)
˃ To support continuous integration approach
8. » 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
» Supports various programming languages –
Java, C#, Python, etc
» Java is supported out of the box
9. » Behaviour Driven Development tool
http://en.wikipedia.org/wiki/Behavior_Driven_Development
» Tests can be written in English (Or Any other Language)
» Testers can be given a Domain Specific Language to test
» Tests are expressed in Given, When and Then Syntax
» Tests are written in business language, rather then low level
web language which is hard to maintain.
» Can be used for Web, Integration or API Testing.
» Example (Google mail)
˃ Given I login to Google mail
˃ When I go to my inbox
˃ Then there are 20 new emails
Comes with a Maven plugin to integrate with any build tool viz Bamboo, Hudson, Cruise Control etc
11. » Tagging of scenarios – For requirement
Traceability
» Story Maps – For Better Coverage Reports
» Web Interface to execute scenarios
» Full control on the implementation of the
Tests
» Keeps Test intent and Implementation
Separate
» Steps Dictionary – To enable easy finding of
existing Test steps
12. » Framework should be light weight
» Test code should be as good as Prod. Code
» Test API should be neat and self documented
» Page object pattern is one of the widely accepted
techniques
˃ E.g >
public void login(String userName, String Password) {
Pages.loginPage().open();
Pages.loginPage().login(userName, password)
.verifyUserIsLoggedIn();
}
13. » Open source tools have big user community
» Platform and tools inter dependent
» Tried and tested for years
» Support XP, Agile development methodologies
» Enable automation engagement from different
stakeholders of the project
» Scalable Cloud solutions available