The document outlines a presentation by Harsh Murari on BDD and Cucumber-based test automation frameworks, focusing on the offerings of Rhoynar Software Consulting. It discusses the principles of behavior driven development (BDD), continuous integration infrastructure, and software testing tools like Autotestr and Emailverify. The summary highlights how BDD facilitates business-centric software development and provides robust regression testing through scenarios written in simple English syntax.
BDD and Cucumberbased Test Automation Frameworks Harsh Murari harsh@rhoynar.com Software Architect Rhoynar Software Consulting, Boulder, CO www.rhoynar.com Presented At SQUAD Meetup at Denver, CO, Oct 11, 2016
About Me • Co-founderand Software Architect at Rhoynar Software Consulting (www.rhoynar.com) • Working on Application Development, QA Automation andTest Automation Solutions • 12+ years of Software Engineering Experience
4.
About Rhoynar SoftwareConsulting Founded in 2015, providing QA automation and Continuous Delivery Services for clients in Denver/Boulder area. Contact Us: Web: www.rhoynar.com Ph.: +1-855-5-RHOYNAR Email: contact@rhoynar.com • Consulting: Application Development, QA Automation and DevOps • Staffing: Highly Experienced Candidates • Training: 3-5 days customized training courses
5.
AboutThis Presentation: Objectives •Motivation and Background: • Open-source initiatives from Rhoynar • Continuous Integration Infrastructure • Email NotificationVerification • AutoTestR – Automatic Page Object Generation • BDD and Cucumber • Overview of BDD – Behavior Driven Development Model and Cucumber • Integration of SeleniumWebDriver, Page Objects and Models Design Pattern • BDD andTest Automation Best Practices • BDD Demo
AutoTestR – Page ObjectAutoGeneration • AutoTestR uses node.js framework to parse the DOM for the page and generate corresponding test object code. https://github.com/Rhoynar/AutoTestR
10.
AutoTestR Graph BasedTestCase Generation - Each node represents a page-object (or rather business object) - Each node specifies what are its exported interfaces, what are its next states - Based on this graph, AutoTestR auto-generates test case skeletons as well! - ExampleTest Cases: - Login->Unregistered Page - Login->Main Page->CreateUser->End - Login->Main Page->SearchUser->End - Login->Main Page->DeleteUser->End - Login->Main Page->Unregistered Page https://github.com/Rhoynar/AutoTestR
11.
EmailVerify:Verify Email NotificationReceipt UseCase - Web Application Sends a Notification/Email to Users - Test Automation Wants toVerify if Email has been received? - Email with certain Subject Line has been received? - Email with certain content has been received? Etc https://github.com/Rhoynar/EmailVerify Use EmailVerify Library - Simple to use: startMonitor(), verify(), stopMonitor() - Multiple variations of use-cases and regular expression parsing support!
12.
BDD/Cucumber based QA- AutomationFramework https://github.com/Rhoynar/qa-automation • Project for barebones QA Automation Development Using: • Java • BDD • Cucumber • TestNG • Maven
13.
What is BDD(Behavior Driven Development)? • BDD Keeps Business Behavior in sync with Software Development • ExtendsTest Driven Development to cover BusinessAcceptanceTests
14.
How can Iwrite tests without actual code? • BDD Uses Simple English Syntax (Gherkin) • BDD uses example based ‘Scenarios’ • Each ‘Scenario’ is noted in the form of ’Given’, ‘When’, ‘Then’
15.
Outside In Approach •Start with a conversation • Determine the business value • Provide Examples of use
Does this onlywork withWeb Based Applications? • BDD can be work with any type of application! • We recently used BDD to load builds onto Android Device. Scenario: Load Android Build onto device Given Device is Connected When I load the build Then Device is detected in ADB Automatic Conversion to Code public void device_is_connected() {…} public void i_load_the_build() {…} public void device_detected_in_adb() {…}
18.
Building Blocks ofScenarios • BDD Allows to build on top of existing scenarios easily • Existing step-defs can be re-used, only new steps need to be written • Less Code Repetition – better regression framework Scenario: Load Android Build onto device Given Device is Connected When I load the build And I reset the device Then Device is detected in ADB With only one additional step, I have a new test case public void device_is_connected() {…} public void i_load_the_build() {…} public void i_reset_device(){…} public void device_detected_in_adb() {…}
Summary • BDD minimizescommunications, hides implementation details and provides robust regression tests. • BDD Provides Building blocks of scenarios and step-definitions, so incremental test can be written easily.
21.
Contact Us: Rhoynar SoftwareConsulting Web: www.rhoynar.com Ph.: +1-855-5-RHOYNAR Email: contact@rhoynar.com Consulting QA Automation, DevOps and Application Development Staffing Highly qualified and tech- screened candidates Training Customized onsite training events on latest technologies