SlideShare a Scribd company logo
1 of 11
Download to read offline
Service Layer Testing Using
BDD For Legacy Products /
Applications
Service Layer Testing & Automation –
Approach Document
• Service Layer Testing – What is in for Legacy Products.
• What can we do
• How can we do
• Testing at service layer – Options before us.
• Strategy & Approach for Legacy Products.
• Challenges & Limitation
• Estimates for piloting
Service Layer Testing with BDD – What is in for Legacy Products.
• Key testing challenges to improve product quality
• Zero Test Automation
• No effective integration test. Regression testing is the only place where integration testing is executed.
• Test case coverage for System and Regression testing
- Testers are not aware of many logic in the code
- Time/effort constraints from executing as many test cases we want to execute for any test cycle
• Enhanced Test scenarios through Service Layer Testing or Developer Integration testing
- Improves the overall Legacy Product Quality by enhancing test scenario coverage which in turn will reduce defect
leakage.
• Automated nightly runs – Reduction of duration / effort / cost
- As the service layer test suite grows, we can introduce automated nightly runs which allow to execute as
much test scenarios/case as possible without effort and time constraint
What can we do
4
•Write service layer testing (Developer Integration Testing) using BDD (SpecFlow) test framework.
•Develop Java/>net based ‘Test Framework Classes’ to enable testing like batch framework.
•As part of service layer testing we will deliberately ignore unit test and favor developer integration testing (details are in the next
couple of slides).
•Automated (hourly/nightly) /Triggered (code check in) runs of the test suite.
•Configurable test framework would enable wider test coverage. Also the execution would take a fraction of time needed for
manual testing.
How can we do
5
Spec Flow
process :
Creation of
Feature Files
based on BA’s
Spec / Scenarios
in the code.
Spec Flow
process :
Creation of test
stubs
Spec Flow
process :
Writing of c# test
code
Java/>Net
Wrapper :
Write wrapper to
call Legacy
functions through
available interface.
Below steps highlight the tasks involved
Sample Feature file
• Feature: Validate Campaign
Validate the user inputs while creation/amendment of Some Data and determine whether the Data can be saved or not
• Scenario: Valid Type I Data in Additional 2 tab
Given user entered Type I Data
And Necessary flag is ON
When ‘Users' of Type I Data is same as ‘User' of Type I Data
Then I should get "Valid Type I Data "
• Scenario: Invalid Type I Data in Additional 2 tab
Given user entered Type I Data
And Necessary flag is ON
When ‘Users' of Type I Data is different from ‘Users' of Type I Data
Then I should get error message
• And so on…
6
Testing at service layer – Options before us
BDD without refactoring
Each behavior in the feature file can be mapped to test case with data manipulation.
Cons:
• Even though we were checking single behavior we need to execute whole validate procedure
• Test procedures will be ugly as in all the cases we were calling single procedure but doing data manipulation
to execute targeted scenario
Execute
‘ValidateSomeData’
test case
------------------
Assert the results
for Makegood
validation.
Execution Work Flow
1. Parameter object injection
2. Manipulate parameter object to
check behavior of makegood
campaign
3. Call ‘ValidateSomeData’
Function in the wrapper
Call ‘ValidateSomeData’
function in Legacy Code
through available interface
Advantages with writing test
framework
8
• Test end to end flow covering all the relevant paths/scenarios in a single test.
• With configurable inputs tests can cover multiple scenarios in single run.
• Enhances the quality of the overall regression suite while bring down the execution time of manual regression.
• As developers are writing he/she can go through the code and cover all the logic/scenarios as part of the end
to end flow
• Scenarios documented in the feature files can be ported to WIKI as it changes and used as living document
• The Acceptance criteria’s from the BA would not only act as the Behavior of the application for the
Development team, the specFlow report derived from the scenarios would be the test cases for the QA team,
which would help them in reducing the effort of writing the test cases.
Strategy & Approach for Legacy Products.
9
Strategy for Framework Classes
We see two different strategies for service layer testing possible in Legacy Products. Below are the details, Pros & cons associated
with it.
Module level strategy:
•Pick up a complete module or sub module and write a complete integration test suite with the help of dedicated developers.
Parallel development of WCF & framework classes is must to make the testing feasible and allow better test/scenario coverage.
•With this strategy we can reduce/ eliminate the effort for functional testing & regression testing for that module/sub module like
campaign module.
Enhancement level strategy:
•Start writing test cases for new enhancements but this has to be supplemented with additional test cases which covers all the
impacted scenarios.
•Developers need to focus on writing the test cases for impacted scenarios which would elongate timeline of that feature.
•Such strategy would limit the test coverage limited to new enhancements. This strategy would create test suite with unrelated test
cases from one release to another release.
Based on the analysis our suggestion is to pilot either of this approach in phased manner. Piloting would help to evaluate the
gains early on, while phasing will allow us to amortize framework related investment if any. For example batch testing can be
differed to future phases as it needs lot more framework classes than a testing a function like Validate Data.
Challenges & Limitation With Service Layer Testing
Challenges:
• High reliance on developers to unearth the scenarios from legacy code in absence of living specs.
• Absence of agile development, user stories, code refactoring could complicate development and maintenance of BDD test cases.
• Testing of batch jobs is a challenge, either we need to identify tools or need to write WCF wrapper & framework classes which
need to compare inputs with outputs like DB data or flat files.
• Data cleanup / tear down could be an issue unless framework classes include auto increment features to avoid referential
integrity issues.
• Standards & guidelines for writing feature file and BDD test cases.
THANK YOU

More Related Content

Recently uploaded

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 

Recently uploaded (20)

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Service layer testing using BDD for legacy products

  • 1. Service Layer Testing Using BDD For Legacy Products / Applications
  • 2. Service Layer Testing & Automation – Approach Document • Service Layer Testing – What is in for Legacy Products. • What can we do • How can we do • Testing at service layer – Options before us. • Strategy & Approach for Legacy Products. • Challenges & Limitation • Estimates for piloting
  • 3. Service Layer Testing with BDD – What is in for Legacy Products. • Key testing challenges to improve product quality • Zero Test Automation • No effective integration test. Regression testing is the only place where integration testing is executed. • Test case coverage for System and Regression testing - Testers are not aware of many logic in the code - Time/effort constraints from executing as many test cases we want to execute for any test cycle • Enhanced Test scenarios through Service Layer Testing or Developer Integration testing - Improves the overall Legacy Product Quality by enhancing test scenario coverage which in turn will reduce defect leakage. • Automated nightly runs – Reduction of duration / effort / cost - As the service layer test suite grows, we can introduce automated nightly runs which allow to execute as much test scenarios/case as possible without effort and time constraint
  • 4. What can we do 4 •Write service layer testing (Developer Integration Testing) using BDD (SpecFlow) test framework. •Develop Java/>net based ‘Test Framework Classes’ to enable testing like batch framework. •As part of service layer testing we will deliberately ignore unit test and favor developer integration testing (details are in the next couple of slides). •Automated (hourly/nightly) /Triggered (code check in) runs of the test suite. •Configurable test framework would enable wider test coverage. Also the execution would take a fraction of time needed for manual testing.
  • 5. How can we do 5 Spec Flow process : Creation of Feature Files based on BA’s Spec / Scenarios in the code. Spec Flow process : Creation of test stubs Spec Flow process : Writing of c# test code Java/>Net Wrapper : Write wrapper to call Legacy functions through available interface. Below steps highlight the tasks involved
  • 6. Sample Feature file • Feature: Validate Campaign Validate the user inputs while creation/amendment of Some Data and determine whether the Data can be saved or not • Scenario: Valid Type I Data in Additional 2 tab Given user entered Type I Data And Necessary flag is ON When ‘Users' of Type I Data is same as ‘User' of Type I Data Then I should get "Valid Type I Data " • Scenario: Invalid Type I Data in Additional 2 tab Given user entered Type I Data And Necessary flag is ON When ‘Users' of Type I Data is different from ‘Users' of Type I Data Then I should get error message • And so on… 6
  • 7. Testing at service layer – Options before us BDD without refactoring Each behavior in the feature file can be mapped to test case with data manipulation. Cons: • Even though we were checking single behavior we need to execute whole validate procedure • Test procedures will be ugly as in all the cases we were calling single procedure but doing data manipulation to execute targeted scenario Execute ‘ValidateSomeData’ test case ------------------ Assert the results for Makegood validation. Execution Work Flow 1. Parameter object injection 2. Manipulate parameter object to check behavior of makegood campaign 3. Call ‘ValidateSomeData’ Function in the wrapper Call ‘ValidateSomeData’ function in Legacy Code through available interface
  • 8. Advantages with writing test framework 8 • Test end to end flow covering all the relevant paths/scenarios in a single test. • With configurable inputs tests can cover multiple scenarios in single run. • Enhances the quality of the overall regression suite while bring down the execution time of manual regression. • As developers are writing he/she can go through the code and cover all the logic/scenarios as part of the end to end flow • Scenarios documented in the feature files can be ported to WIKI as it changes and used as living document • The Acceptance criteria’s from the BA would not only act as the Behavior of the application for the Development team, the specFlow report derived from the scenarios would be the test cases for the QA team, which would help them in reducing the effort of writing the test cases.
  • 9. Strategy & Approach for Legacy Products. 9 Strategy for Framework Classes We see two different strategies for service layer testing possible in Legacy Products. Below are the details, Pros & cons associated with it. Module level strategy: •Pick up a complete module or sub module and write a complete integration test suite with the help of dedicated developers. Parallel development of WCF & framework classes is must to make the testing feasible and allow better test/scenario coverage. •With this strategy we can reduce/ eliminate the effort for functional testing & regression testing for that module/sub module like campaign module. Enhancement level strategy: •Start writing test cases for new enhancements but this has to be supplemented with additional test cases which covers all the impacted scenarios. •Developers need to focus on writing the test cases for impacted scenarios which would elongate timeline of that feature. •Such strategy would limit the test coverage limited to new enhancements. This strategy would create test suite with unrelated test cases from one release to another release. Based on the analysis our suggestion is to pilot either of this approach in phased manner. Piloting would help to evaluate the gains early on, while phasing will allow us to amortize framework related investment if any. For example batch testing can be differed to future phases as it needs lot more framework classes than a testing a function like Validate Data.
  • 10. Challenges & Limitation With Service Layer Testing Challenges: • High reliance on developers to unearth the scenarios from legacy code in absence of living specs. • Absence of agile development, user stories, code refactoring could complicate development and maintenance of BDD test cases. • Testing of batch jobs is a challenge, either we need to identify tools or need to write WCF wrapper & framework classes which need to compare inputs with outputs like DB data or flat files. • Data cleanup / tear down could be an issue unless framework classes include auto increment features to avoid referential integrity issues. • Standards & guidelines for writing feature file and BDD test cases.