BDD and Test Automation in Evolutionary
Product Suite
Lasantha Ranaweera
Software Architect
eBuilder Technology Center
Colombo
Colombo Java Meetup 2015
Outline
Introduction
eBuilder
Quality Story
Same Problem, New Solution
Bit of Theory
Implementation
Challenges
Future Directions
Key Take Aways
eBuilder
At a Glance
An Evolutionary Product Suite
An Evolutionary Product Suite
An Evolutionary Product Suite
One Core Layer, Many Products
An Evolutionary Product Suite
Customer Care Orchestration (CCO)
Key Properties
Business
Software as a Service.
Integration is a Key Part.
Core Platform
Legacy => JEE Based, Started Over 12 Years Ago.
CCO => Based on Microservices.
Product
Legacy => Running on JBoss AS.
Quality Story
Long Story in Short
No Automated Unit Testing from Inception.
Automation Varied on Product Level.
Existing Automation Tools Old/Not Reliable.
Several Automation Attempts Ended with Failure.
Long QA Cycles / More Slip Through.
Story Continues ....
Bit of Theory
TDD vs BDD
Language and Scope
https://www.youtube.com/watch?v=mT8QDNNhExg
Language
TDD
assertequals(counter,5);
BDD
counter equals to 5;
Scope
Scope
Scope
Scope
Scope
Testing Pyramid
http://martinfowler.com/bliki/TestPyramid.html
Is TDD Dead ?
http://martinfowler.com/articles/is-tdd-dead/
Just Say No to More End-to-End Tests
Unit E2E
Fast
Reliable
Isolates Failures
Simulates a Real User
http://googletesting.blogspot.co.uk/2015/04/
just-say-no-to-more-end-to-end-tests.html
JBehave
http://jbehave.org/
Step 1
Step 2
Step 3
Step 4
Step 5
Implementation
Picard
Time Line
Started 2013 Q2.
Started for One Critical Product with 0% Automation.
Extensive Support Given by Top Management.
Identify Potential as a Common Framework.
Roll-out Carried with Help of Product QA Teams.
Currently Using 5 eBuilder Products.
In the Start
Considerations
End User.
Acceptable Time Limit.
Many Types of Tests.
In the Start
Considerations
End User.
Acceptable Time Limit.
Many Types of Tests.
Decisions
End User => Testers in Scrum Teams.
Semi Technical Language Suitable for Testers.
Stories Independent from Each Other.
Developing a Framework for All Domains in eBuilder.
Support Atlassian Bamboo CI Server.
Different Skills and People
Different Skills and People
Testers Developers
Different Skills and People
Testers Developers
Different Skills and People
Testers Developers
Different Skills and People
Testers Developers
Behavior Suite Picard
Separation of Work
Behavior Suite
JBehave + XML + XPath and Property Files.
One Central Configuration File.
Many Story Suites
1. Smoke Suite
2. Regression Suite
Separation of Work
Behavior Suite
JBehave + XML + XPath and Property Files.
One Central Configuration File.
Many Story Suites
1. Smoke Suite
2. Regression Suite
Picard
Picard has over 99% Java Code.
Spring based XML configurations.
Apache Maven to Run Stories.
Bit More Details..
High Level Story
Base 1 Base 2 Base 3 Base 4
Mapping Layer
Web Browser XML FTP Web Service
JBehave Code Generator
Long Running Scenarios.
Model Reusable Base
Stories.
Story Generator
High Level Base
A High Level Story
A High Level Story
A Base Story
Main Configuration File
Page Mapping File
Step Mapping
Demo
Demonstration
Browser Testing
Facts
Supports Struts, JQuery, ExtJS and Bootstrap.
FluentSelenium with XPath are used.
Non-ambiguous Step Naming was a Challenge.
Page Names Given as Configurations.
Browser Testing
Facts
Supports Struts, JQuery, ExtJS and Bootstrap.
FluentSelenium with XPath are used.
Non-ambiguous Step Naming was a Challenge.
Page Names Given as Configurations.
Cross Browser
Integration Testing
XML, Excel and EDI File Handling.
Support for both FTP and SFTP Protocols.
Web Service Testing
1. Traditional
2. RESTFul
Bamboo Server Integration
Production Environment for Test Suite.
Customized Reporting Module.
Extended Reporting Module Provided by Enthusiast.
Both Parallel and Sequential Test Execution with Streams.
Test Stream Execution
Test Stream Execution
Test Stream Execution
Test Stream Execution
Ease of Use
JBehave + Maven Provide Good Tooling.
Easy Start with Base Stories.
Readability of Step Mappings
1. Good Naming Convention
2. Logical Grouping
Challenges
Reliability
Proven Base Stories.
Understand UI Behavior.
Unit E2E Picard
Time Limit
Stream Implementation.
No Long Wait Times.
Unit E2E Picard
Isolate Failures
Screen Capture for UI Failures.
Proper Logging for Step Implementations.
Unit E2E Picard
Future Directions
Using Amazon EC2 For Test Automation
Scalable CI server with Elastic Bamboo.
Heterogeneous Environment Testing.
Microservices Testing
E2E Test Automation Not Easy with Microservices.
Automating Unit Tests Easier.
REST Heavily Used in Inter Service Communication.
Planning to Support Consumer-Driven Test Framework.
Mobile UI Testing Another Potential Avenue.
Key Take Aways
Different Skills + BDD => Better Quality.
Key Take Aways
Different Skills + BDD => Better Quality.
No Survival Without Test Automation.
Key Take Aways
Different Skills + BDD => Better Quality.
No Survival Without Test Automation.
Unit Testing Number 1 Priority.
Key Take Aways
Different Skills + BDD => Better Quality.
No Survival Without Test Automation.
Unit Testing Number 1 Priority.
There are Situations E2E Testing Better Suited.
Key Take Aways
Different Skills + BDD => Better Quality.
No Survival Without Test Automation.
Unit Testing Number 1 Priority.
There are Situations E2E Testing Better Suited.
Good Results Can Achieve Even with E2E Testing.
Key Take Aways
Different Skills + BDD => Better Quality.
No Survival Without Test Automation.
Unit Testing Number 1 Priority.
There are Situations E2E Testing Better Suited.
Good Results Can Achieve Even with E2E Testing.
Questions
Questions
lasantha@opensource.lk
Thank You

BDD and Test Automation in Evalutionary Product Suite