bdd and test automation in evalutionary product suite

74
BDD and Test Automation in Evolutionary Product Suite Lasantha Ranaweera Software Architect eBuilder Technology Center Colombo Colombo Java Meetup 2015

Upload: lasantha-ranaweera

Post on 08-Aug-2015

273 views

Category:

Software


2 download

TRANSCRIPT

Page 1: BDD and Test Automation in Evalutionary Product Suite

BDD and Test Automation in EvolutionaryProduct Suite

Lasantha Ranaweera

Software ArchitecteBuilder Technology Center

Colombo

Colombo Java Meetup 2015

Page 2: BDD and Test Automation in Evalutionary Product Suite

Outline

IntroductioneBuilderQuality Story

Same Problem, New SolutionBit of TheoryImplementationChallengesFuture DirectionsKey Take Aways

Page 3: BDD and Test Automation in Evalutionary Product Suite

eBuilder

Page 4: BDD and Test Automation in Evalutionary Product Suite

At a Glance

Page 5: BDD and Test Automation in Evalutionary Product Suite

An Evolutionary Product Suite

One Core Layer, Many ProductsCustomer Care Orchestration (CCO)

Page 6: BDD and Test Automation in Evalutionary Product Suite

An Evolutionary Product Suite

One Core Layer, Many ProductsCustomer Care Orchestration (CCO)

Page 7: BDD and Test Automation in Evalutionary Product Suite

An Evolutionary Product Suite

One Core Layer, Many Products

Customer Care Orchestration (CCO)

Page 8: BDD and Test Automation in Evalutionary Product Suite

An Evolutionary Product Suite

One Core Layer, Many Products

Customer Care Orchestration (CCO)

Page 9: BDD and Test Automation in Evalutionary Product Suite

Key Properties

BusinessI Software as a Service.I Integration is a Key Part.

Core PlatformI Legacy => JEE Based, Started Over 12 Years Ago.I CCO => Based on Microservices.

ProductI Legacy => Running on JBoss AS.

Page 10: BDD and Test Automation in Evalutionary Product Suite

Quality Story

Page 11: BDD and Test Automation in Evalutionary Product Suite

Long Story in Short

I No Automated Unit Testing from Inception.I Automation Varied on Product Level.I Existing Automation Tools Old/Not Reliable.I Several Automation Attempts Ended with Failure.I Long QA Cycles / More Slip Through.I Story Continues ....

Page 12: BDD and Test Automation in Evalutionary Product Suite

Bit of Theory

Page 13: BDD and Test Automation in Evalutionary Product Suite

TDD vs BDD

Language and Scopehttps://www.youtube.com/watch?v=mT8QDNNhExg

Page 14: BDD and Test Automation in Evalutionary Product Suite

Language

TDD

assertequals(counter,5);

BDD

counter equals to 5;

Page 15: BDD and Test Automation in Evalutionary Product Suite

Scope

Page 16: BDD and Test Automation in Evalutionary Product Suite

Scope

Page 17: BDD and Test Automation in Evalutionary Product Suite

Scope

Page 18: BDD and Test Automation in Evalutionary Product Suite

Scope

Page 19: BDD and Test Automation in Evalutionary Product Suite

Scope

Page 20: BDD and Test Automation in Evalutionary Product Suite

Testing Pyramid

http://martinfowler.com/bliki/TestPyramid.html

Page 21: BDD and Test Automation in Evalutionary Product Suite

Is TDD Dead ?

http://martinfowler.com/articles/is-tdd-dead/

Page 22: BDD and Test Automation in Evalutionary Product Suite

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

Page 23: BDD and Test Automation in Evalutionary Product Suite

JBehave

http://jbehave.org/

Page 24: BDD and Test Automation in Evalutionary Product Suite

Step 1

Page 25: BDD and Test Automation in Evalutionary Product Suite

Step 2

Page 26: BDD and Test Automation in Evalutionary Product Suite

Step 3

Page 27: BDD and Test Automation in Evalutionary Product Suite

Step 4

Page 28: BDD and Test Automation in Evalutionary Product Suite

Step 5

Page 29: BDD and Test Automation in Evalutionary Product Suite

Implementation

Page 30: BDD and Test Automation in Evalutionary Product Suite

Picard

Page 31: BDD and Test Automation in Evalutionary Product Suite

Time Line

I Started 2013 Q2.I Started for One Critical Product with 0% Automation.I Extensive Support Given by Top Management.I Identify Potential as a Common Framework.I Roll-out Carried with Help of Product QA Teams.I Currently Using 5 eBuilder Products.

Page 32: BDD and Test Automation in Evalutionary Product Suite

In the Start

ConsiderationsI End User.I Acceptable Time Limit.I Many Types of Tests.

DecisionsI End User => Testers in Scrum Teams.I Semi Technical Language Suitable for Testers.I Stories Independent from Each Other.I Developing a Framework for All Domains in eBuilder.I Support Atlassian Bamboo CI Server.

Page 33: BDD and Test Automation in Evalutionary Product Suite

In the Start

ConsiderationsI End User.I Acceptable Time Limit.I Many Types of Tests.

DecisionsI End User => Testers in Scrum Teams.I Semi Technical Language Suitable for Testers.I Stories Independent from Each Other.I Developing a Framework for All Domains in eBuilder.I Support Atlassian Bamboo CI Server.

Page 34: BDD and Test Automation in Evalutionary Product Suite

Different Skills and People

Testers DevelopersTesters DevelopersTesters DevelopersTesters Developers

Behavior Suite Picard

Page 35: BDD and Test Automation in Evalutionary Product Suite

Different Skills and People

Testers Developers

Testers DevelopersTesters DevelopersTesters Developers

Behavior Suite Picard

Page 36: BDD and Test Automation in Evalutionary Product Suite

Different Skills and People

Testers Developers

Testers Developers

Testers DevelopersTesters Developers

Behavior Suite Picard

Page 37: BDD and Test Automation in Evalutionary Product Suite

Different Skills and People

Testers DevelopersTesters Developers

Testers Developers

Testers Developers

Behavior Suite Picard

Page 38: BDD and Test Automation in Evalutionary Product Suite

Different Skills and People

Testers DevelopersTesters DevelopersTesters Developers

Testers Developers

Behavior Suite Picard

Page 39: BDD and Test Automation in Evalutionary Product Suite

Separation of Work

Behavior SuiteI JBehave + XML + XPath and Property Files.I One Central Configuration File.I Many Story Suites

1. Smoke Suite2. Regression Suite

PicardI Picard has over 99% Java Code.I Spring based XML configurations.I Apache Maven to Run Stories.

Page 40: BDD and Test Automation in Evalutionary Product Suite

Separation of Work

Behavior SuiteI JBehave + XML + XPath and Property Files.I One Central Configuration File.I Many Story Suites

1. Smoke Suite2. Regression Suite

PicardI Picard has over 99% Java Code.I Spring based XML configurations.I Apache Maven to Run Stories.

Page 41: BDD and Test Automation in Evalutionary Product Suite

Bit More Details..

High Level Story

Base 1 Base 2 Base 3 Base 4

Mapping Layer

Web Browser XML FTP Web Service

Page 42: BDD and Test Automation in Evalutionary Product Suite

JBehave Code Generator

I Long Running Scenarios.I Model Reusable Base

Stories.

Story Generator

High Level Base

Page 43: BDD and Test Automation in Evalutionary Product Suite

A High Level Story

Page 44: BDD and Test Automation in Evalutionary Product Suite

A High Level Story

Page 45: BDD and Test Automation in Evalutionary Product Suite

A Base Story

Page 46: BDD and Test Automation in Evalutionary Product Suite

Main Configuration File

Page 47: BDD and Test Automation in Evalutionary Product Suite

Page Mapping File

Page 48: BDD and Test Automation in Evalutionary Product Suite

Step Mapping

Page 49: BDD and Test Automation in Evalutionary Product Suite

Demo

Demonstration

Page 50: BDD and Test Automation in Evalutionary Product Suite

Browser Testing

FactsI Supports Struts, JQuery, ExtJS and Bootstrap.I FluentSelenium with XPath are used.I Non-ambiguous Step Naming was a Challenge.I Page Names Given as Configurations.

Cross Browser

Page 51: BDD and Test Automation in Evalutionary Product Suite

Browser Testing

FactsI Supports Struts, JQuery, ExtJS and Bootstrap.I FluentSelenium with XPath are used.I Non-ambiguous Step Naming was a Challenge.I Page Names Given as Configurations.

Cross Browser

Page 52: BDD and Test Automation in Evalutionary Product Suite

Integration Testing

I XML, Excel and EDI File Handling.I Support for both FTP and SFTP Protocols.I Web Service Testing

1. Traditional2. RESTFul

Page 53: BDD and Test Automation in Evalutionary Product Suite

Bamboo Server Integration

I Production Environment for Test Suite.I Customized Reporting Module.I Extended Reporting Module Provided by Enthusiast.I Both Parallel and Sequential Test Execution with Streams.

Page 54: BDD and Test Automation in Evalutionary Product Suite

Test Stream Execution

Page 55: BDD and Test Automation in Evalutionary Product Suite

Test Stream Execution

Page 56: BDD and Test Automation in Evalutionary Product Suite

Test Stream Execution

Page 57: BDD and Test Automation in Evalutionary Product Suite

Test Stream Execution

Page 58: BDD and Test Automation in Evalutionary Product Suite

Ease of Use

I JBehave + Maven Provide Good Tooling.I Easy Start with Base Stories.I Readability of Step Mappings

1. Good Naming Convention2. Logical Grouping

Page 59: BDD and Test Automation in Evalutionary Product Suite

Challenges

Page 60: BDD and Test Automation in Evalutionary Product Suite

Reliability

I Proven Base Stories.I Understand UI Behavior.

Unit E2E Picard

Page 61: BDD and Test Automation in Evalutionary Product Suite

Time Limit

I Stream Implementation.I No Long Wait Times.

Unit E2E Picard

Page 62: BDD and Test Automation in Evalutionary Product Suite

Isolate Failures

I Screen Capture for UI Failures.I Proper Logging for Step Implementations.

Unit E2E Picard

Page 63: BDD and Test Automation in Evalutionary Product Suite

Future Directions

Page 64: BDD and Test Automation in Evalutionary Product Suite

Using Amazon EC2 For Test Automation

I Scalable CI server with Elastic Bamboo.I Heterogeneous Environment Testing.

Page 65: BDD and Test Automation in Evalutionary Product Suite

Microservices Testing

I E2E Test Automation Not Easy with Microservices.I Automating Unit Tests Easier.I REST Heavily Used in Inter Service Communication.I Planning to Support Consumer-Driven Test Framework.I Mobile UI Testing Another Potential Avenue.

Page 66: BDD and Test Automation in Evalutionary Product Suite

Key Take Aways

I Different Skills + BDD => Better Quality.

I No Survival Without Test Automation.I Unit Testing Number 1 Priority.I There are Situations E2E Testing Better Suited.I Good Results Can Achieve Even with E2E Testing.

Page 67: BDD and Test Automation in Evalutionary Product Suite

Key Take Aways

I Different Skills + BDD => Better Quality.I No Survival Without Test Automation.

I Unit Testing Number 1 Priority.I There are Situations E2E Testing Better Suited.I Good Results Can Achieve Even with E2E Testing.

Page 68: BDD and Test Automation in Evalutionary Product Suite

Key Take Aways

I Different Skills + BDD => Better Quality.I No Survival Without Test Automation.I Unit Testing Number 1 Priority.

I There are Situations E2E Testing Better Suited.I Good Results Can Achieve Even with E2E Testing.

Page 69: BDD and Test Automation in Evalutionary Product Suite

Key Take Aways

I Different Skills + BDD => Better Quality.I No Survival Without Test Automation.I Unit Testing Number 1 Priority.I There are Situations E2E Testing Better Suited.

I Good Results Can Achieve Even with E2E Testing.

Page 70: BDD and Test Automation in Evalutionary Product Suite

Key Take Aways

I Different Skills + BDD => Better Quality.I No Survival Without Test Automation.I Unit Testing Number 1 Priority.I There are Situations E2E Testing Better Suited.I Good Results Can Achieve Even with E2E Testing.

Page 71: BDD and Test Automation in Evalutionary Product Suite

Key Take Aways

I Different Skills + BDD => Better Quality.I No Survival Without Test Automation.I Unit Testing Number 1 Priority.I There are Situations E2E Testing Better Suited.I Good Results Can Achieve Even with E2E Testing.

Page 72: BDD and Test Automation in Evalutionary Product Suite

Questions

[email protected]

Page 74: BDD and Test Automation in Evalutionary Product Suite

Thank You