SlideShare a Scribd company logo
1 of 37
Legacy code yet Agile way…
A journey we started!!!
Speakers:-
Prasad Kunte @prasad_kunte
Naresh Jain @nashjain
Hello
About IDeaS
25+ YEARS 7000+ CLIENTS 1M+ ROOMS 94 COUNTRIES 95% +
ago we started
helping clients
manage their
revenue
later we’re still finding the
revenue opportunity in
every situation
around the world are
priced every single day
using IDeaS
on 6 continents have
hotels that now run on
IDeaS Revenue
Management Systems
More than 95
percent of all
our clients are
still working
with us today.
• Developed & rolled out in 2007
• Mainly into maintenance untill last year
• Conducive market to pick this business since last year
CPRMS Product
• New Specifications for Inbound Data – Transactional data
instead of summry data
• New Forecasting Methodology for better forecasting
• Other New features
Business Requirements
& came the first surprise…
• Crashed CVS Repo Server
• An opportunity to migrate to SVN….
– We chose SVN http://cvs2svn.tigris.org/
• 0 Running Test Cases
• No CI/CD
• Production Schema/Seed not base lined in code base
• Old Stack
– Junit 1.5
– Spring 2.0.5
– Ant
The Legacy
Agile engineering practices
Safety Netting to Legacy Code
Dev. Setup
CI/CD
Test Pyramid
Clean Code
Need to have all of it…
Safety Netting to Legacy Code
Dev. Setup
CI/CD Env
Test Pyramid
Clean Code
We need
all of it
Don’t Forget
Mate,
Business is
waiting for new
features!!!
Ooops…… Which one to take first
Safety Netting to Legacy Code
Dev. Setup
CI/CD Env
Test Pyramid
Clean Code
1
2 3 4 5
Just like Product Backlog,
we have Agility Backlog
Sprint 0 – Backlog Prioritization
Safety Netting to Legacy Code
Dev. Setup
CI/CD Env
Test Pyramid
Clean Code
1
2
3
4
5
• Spiked out Workflow tests
• Removed un-necessary out dated items from SVN –
– Design Docs (HLD, LLD)
– Prototype HTMLs
– EAP project files
– Multiple JBOSS file check-ins
– MySQL cooked up data files
Reduced the code base size (from 2.1 GB to 500 MB)
• Spiked out Jenkins spin up and local build
The most important!!!
• Should we copy pase code for new specifications? --- Don’t think so
• Workflow Tests for Old Specs
– Ensured no existing
functionality breaks
– Still not database agnostic
• Tests to run locally on a
populated database
Ensure
support to
existing client
The 2nd most important… A feedback loop!
• Jenkins
I am here to help you guys!
Build Jobs for Local and Jenkins
Local Build
CI Build
CT Deploy
Workflow
Tests
Jenkins is Ready to give quick feedback
Next one – Safety Netting
• Unit Tests
– Independent isolated tests – Tests individual class/function/method
• Business Logic Tests –
– Validates a core business rule.
– Might span across multiple domain objects/functions
• Workflow Tests – 1 for each Scenario in New Spec
Safety Netting
as we move
along
• Refactor the code as we modify
it
• Write unit & business logic tests
if they don’t exist
• Don’t add 1 more if else to 10
existing if else(s)
Next is Test Pyramid
• Right Tests for getting right feedback
• Avoiding test duplication
• Avoid 100s of UI Tests – they are not needed as other layers
can catch most of it
Wait a second!
We’ve
started
building
3 layers
already
3 layers already there…
• https://wiki.jenkins-ci.org/display/JENKINS/LabeledTestGroupsPublisher+Plugin
• Test Groups: "unit", "smoke", "regression", "integration", "special", "misc“
Image source: http://www.ascendfinancialplanning.com/your-finances-are-like-the-game-of-football-do-you-have-a-game-plan
Well!! Then,
we need to
monitor it!
We do have a
plugin
• Unit, Business Logic, Integration, Workflow, End to End, UI
• Code and hpi available @ https://github.com/prasadkunte/labeled-test-groups-
publisher
• Now, we can configure & see tests on Jenkins like this
Lets change
labels as per
our pyramid
Labelled Test Group – in Action
You can keep business happy while we pay tech. debt.
Safety Netting to Legacy Code
Dev. Setup
CI/CD Env
Test Pyramid
Clean Code
& this is what we
started already!!!!!
Dev setup is the
next You guys are
meeting the
business needs,
that’s cool!!
Dev. Setup
• Dev. Setup pushed on to Artifact Repo. – Java, Jboss, MySQL
• Baseline database
– Structure copied from Prod
– Seed data identified
– Ant Script using dbdeploy to deploy base lined database
Dev. Setup
• Custom Tool to get trimmed DB – For Workflow Tests
Workflow test cases – Not database agnostic
Hackathon @ IDeaS
• Restified the app exposing few apis
• Workflow Test Cases Refactored – Database Agnostic
Before
After
Dev setup in good shape too
Safety Netting to Legacy Code
Dev. Setup CI/CD Env
Test Pyramid
Clean Code
We are going to
improve further!!!
JaCoCo wrapper for test results
Clean Code - Sonar Integration
Write Selenium UI tests only for important screens –
The 4th Layer…
• Integration with Jenkins pending
• Taking around 1 min to cover 8 screens
Another Layer in Test Pyramid - Selenium UI Test
So far, what did we achieve?
• From no safety net To some safety net for legacy code
• From no CI/CD To Jenkins CI/CD
• From no test pyramid To 4 layers of pyramid (3 integrated in CI)
• From no standard dev set up To standard dev setup
While committing to Business Requirements
http://www.strongautomotive.com/everyone-good-plan-get-punched-nose/
Road ahead…
Keep
Improving:-
1. Increase Test
Coverage %
2. Reduce
Violations
3. Reduce build
timings
4. Fully Automate
Production
Deployment
Moving Forward | Test Coverage & Viloations
– Sonar Violations - Spend 20 minutes a day,
– 5 tests a week – Refactor as we move
– 1 UI Test a week
Page 31
Earlier
Latest
Moving Forward | Reduce Build Timings – Faster Feedback Loop
Moving Forward | Auto Deployments
& the journey continues….
© Copyright Integrated Decisions and Systems, Inc. (IDeaS – A SAS COMPANY)
Visit IDeaS online at www.ideas.com
Thank you so much!
Speakers:
Naresh Jain @nashjain
Prasad Kunte @prasad_kunte
© Copyright Integrated Decisions and Systems, Inc. (IDeaS – A SAS COMPANY)
Visit IDeaS online at www.ideas.com
Few References
• http://blogs.agilefaqs.com/2011/02/01/inverting-the-testing-pyramid/
• https://prasadkunte.wordpress.com/2014/12/14/restifying-a-legacy-application-
an-experience/
• http://blogs.agilefaqs.com/2011/03/09/big-upfront-test-creation-in-legacy-
code-is-a-bad-idea/
• https://www.atlassian.com/company/about/shipit
• http://www.mkyong.com/webservices/jax-rs/jersey-spring-integration-example/
• http://examples.javacodegeeks.com/enterprise-java/rest/jersey/json-example-
with-jersey-jackson/
© Copyright Integrated Decisions and Systems, Inc. (IDeaS – A SAS COMPANY)
Visit IDeaS online at www.ideas.com

More Related Content

What's hot

Best Practices for Database Deployments
Best Practices for Database DeploymentsBest Practices for Database Deployments
Best Practices for Database DeploymentsRed Gate Software
 
Test Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaTest Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaSalesforce Developers
 
Releasing To Production Every Week
Releasing To Production Every WeekReleasing To Production Every Week
Releasing To Production Every Weekexortech
 
Software operability and run book collaboration - DevOps Summit, Bangalore
Software operability and run book collaboration - DevOps Summit, BangaloreSoftware operability and run book collaboration - DevOps Summit, Bangalore
Software operability and run book collaboration - DevOps Summit, BangaloreMatthew Skelton
 
Managing Continuous Delivery of Mobile Apps - for the Enterprise
Managing Continuous Delivery of Mobile Apps - for the EnterpriseManaging Continuous Delivery of Mobile Apps - for the Enterprise
Managing Continuous Delivery of Mobile Apps - for the EnterpriseSauce Labs
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMark Ginnebaugh
 
Releasing To Production Every Week India
Releasing To Production Every Week   IndiaReleasing To Production Every Week   India
Releasing To Production Every Week Indiaexortech
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha
 
The Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack WayThe Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack WayiWeb (group INAP)
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha
 
Dan Cuellar
Dan CuellarDan Cuellar
Dan CuellarCodeFest
 
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorksPerformance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorksThoughtworks
 
5 Steps on the Way to Continuous Delivery
5 Steps on the Way to Continuous Delivery5 Steps on the Way to Continuous Delivery
5 Steps on the Way to Continuous DeliveryXebiaLabs
 
Game Development Best Practices
Game Development Best PracticesGame Development Best Practices
Game Development Best PracticesPerforce
 
SQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & TricksSQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & TricksIke Ellis
 
Database automated build and test - SQL In The City Cambridge
Database automated build and test - SQL In The City CambridgeDatabase automated build and test - SQL In The City Cambridge
Database automated build and test - SQL In The City CambridgeRed Gate Software
 
SQL Server Tips & Tricks
SQL Server Tips & TricksSQL Server Tips & Tricks
SQL Server Tips & TricksIke Ellis
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportSencha
 
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good Server
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good ServerICONUK 2016: Back From the Dead: How Bad Code Kills a Good Server
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good ServerSerdar Basegmez
 

What's hot (20)

Best Practices for Database Deployments
Best Practices for Database DeploymentsBest Practices for Database Deployments
Best Practices for Database Deployments
 
Test Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaTest Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and Mocha
 
Releasing To Production Every Week
Releasing To Production Every WeekReleasing To Production Every Week
Releasing To Production Every Week
 
Software operability and run book collaboration - DevOps Summit, Bangalore
Software operability and run book collaboration - DevOps Summit, BangaloreSoftware operability and run book collaboration - DevOps Summit, Bangalore
Software operability and run book collaboration - DevOps Summit, Bangalore
 
Managing Continuous Delivery of Mobile Apps - for the Enterprise
Managing Continuous Delivery of Mobile Apps - for the EnterpriseManaging Continuous Delivery of Mobile Apps - for the Enterprise
Managing Continuous Delivery of Mobile Apps - for the Enterprise
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous Integration
 
Releasing To Production Every Week India
Releasing To Production Every Week   IndiaReleasing To Production Every Week   India
Releasing To Production Every Week India
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
 
The Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack WayThe Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack Way
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
 
Dan Cuellar
Dan CuellarDan Cuellar
Dan Cuellar
 
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorksPerformance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
 
5 Steps on the Way to Continuous Delivery
5 Steps on the Way to Continuous Delivery5 Steps on the Way to Continuous Delivery
5 Steps on the Way to Continuous Delivery
 
Game Development Best Practices
Game Development Best PracticesGame Development Best Practices
Game Development Best Practices
 
SQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & TricksSQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & Tricks
 
Extreme Makeover OnBase Edition
Extreme Makeover OnBase EditionExtreme Makeover OnBase Edition
Extreme Makeover OnBase Edition
 
Database automated build and test - SQL In The City Cambridge
Database automated build and test - SQL In The City CambridgeDatabase automated build and test - SQL In The City Cambridge
Database automated build and test - SQL In The City Cambridge
 
SQL Server Tips & Tricks
SQL Server Tips & TricksSQL Server Tips & Tricks
SQL Server Tips & Tricks
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research Report
 
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good Server
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good ServerICONUK 2016: Back From the Dead: How Bad Code Kills a Good Server
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good Server
 

Similar to Sailing through devlopment with legacy code

Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comAviran Mordo
 
Software Engineering in Startups
Software Engineering in StartupsSoftware Engineering in Startups
Software Engineering in StartupsDusan Omercevic
 
The Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentThe Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentTimothy Fitz
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013David Funaro
 
From Iterative to Continuous Delivery, PNSQC 2014
From Iterative to Continuous Delivery, PNSQC 2014From Iterative to Continuous Delivery, PNSQC 2014
From Iterative to Continuous Delivery, PNSQC 2014John Ruberto
 
From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]Dynatrace
 
SCM Transformation Challenges and How to Overcome Them
SCM Transformation Challenges and How to Overcome ThemSCM Transformation Challenges and How to Overcome Them
SCM Transformation Challenges and How to Overcome ThemCompuware
 
Architecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering CultureArchitecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering CultureSARCCOM
 
Architecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering CultureArchitecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering Cultureifnu bima
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using JenkinsRogue Wave Software
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersSPC Adriatics
 
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems SoftwareLessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems SoftwareDevOps for Enterprise Systems
 
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro's State of the Database Continuous Delivery Survey- Findings RevealedDBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro's State of the Database Continuous Delivery Survey- Findings RevealedDBmaestro - Database DevOps
 
Continuous Delivery at Wix, Yaniv Even Haim
Continuous Delivery at Wix, Yaniv Even HaimContinuous Delivery at Wix, Yaniv Even Haim
Continuous Delivery at Wix, Yaniv Even HaimDevOpsDays Tel Aviv
 
Securing the continuous integration
Securing the continuous integrationSecuring the continuous integration
Securing the continuous integrationIrene Michlin
 
Improving Quality through Continuous Integration - A case study of CollabNet
Improving Quality through Continuous Integration - A case study of CollabNetImproving Quality through Continuous Integration - A case study of CollabNet
Improving Quality through Continuous Integration - A case study of CollabNetVenkat Janardhanam, MS, MBA
 
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"Emerasoft, solutions to collaborate
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)Peter Kofler
 

Similar to Sailing through devlopment with legacy code (20)

DevOps Days Ohio
DevOps Days OhioDevOps Days Ohio
DevOps Days Ohio
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
 
Software Engineering in Startups
Software Engineering in StartupsSoftware Engineering in Startups
Software Engineering in Startups
 
The Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentThe Hard Problems of Continuous Deployment
The Hard Problems of Continuous Deployment
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
 
From Iterative to Continuous Delivery, PNSQC 2014
From Iterative to Continuous Delivery, PNSQC 2014From Iterative to Continuous Delivery, PNSQC 2014
From Iterative to Continuous Delivery, PNSQC 2014
 
From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]
 
SCM Transformation Challenges and How to Overcome Them
SCM Transformation Challenges and How to Overcome ThemSCM Transformation Challenges and How to Overcome Them
SCM Transformation Challenges and How to Overcome Them
 
Architecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering CultureArchitecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering Culture
 
Architecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering CultureArchitecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering Culture
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using Jenkins
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
 
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems SoftwareLessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
 
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro's State of the Database Continuous Delivery Survey- Findings RevealedDBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
 
Devops as a service
Devops as a serviceDevops as a service
Devops as a service
 
Continuous Delivery at Wix, Yaniv Even Haim
Continuous Delivery at Wix, Yaniv Even HaimContinuous Delivery at Wix, Yaniv Even Haim
Continuous Delivery at Wix, Yaniv Even Haim
 
Securing the continuous integration
Securing the continuous integrationSecuring the continuous integration
Securing the continuous integration
 
Improving Quality through Continuous Integration - A case study of CollabNet
Improving Quality through Continuous Integration - A case study of CollabNetImproving Quality through Continuous Integration - A case study of CollabNet
Improving Quality through Continuous Integration - A case study of CollabNet
 
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)
 

Recently uploaded

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 

Recently uploaded (20)

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 

Sailing through devlopment with legacy code

  • 1. Legacy code yet Agile way… A journey we started!!! Speakers:- Prasad Kunte @prasad_kunte Naresh Jain @nashjain
  • 3. About IDeaS 25+ YEARS 7000+ CLIENTS 1M+ ROOMS 94 COUNTRIES 95% + ago we started helping clients manage their revenue later we’re still finding the revenue opportunity in every situation around the world are priced every single day using IDeaS on 6 continents have hotels that now run on IDeaS Revenue Management Systems More than 95 percent of all our clients are still working with us today.
  • 4. • Developed & rolled out in 2007 • Mainly into maintenance untill last year • Conducive market to pick this business since last year CPRMS Product
  • 5. • New Specifications for Inbound Data – Transactional data instead of summry data • New Forecasting Methodology for better forecasting • Other New features Business Requirements
  • 6. & came the first surprise… • Crashed CVS Repo Server • An opportunity to migrate to SVN…. – We chose SVN http://cvs2svn.tigris.org/
  • 7. • 0 Running Test Cases • No CI/CD • Production Schema/Seed not base lined in code base • Old Stack – Junit 1.5 – Spring 2.0.5 – Ant The Legacy
  • 8. Agile engineering practices Safety Netting to Legacy Code Dev. Setup CI/CD Test Pyramid Clean Code
  • 9. Need to have all of it… Safety Netting to Legacy Code Dev. Setup CI/CD Env Test Pyramid Clean Code We need all of it Don’t Forget Mate, Business is waiting for new features!!!
  • 10. Ooops…… Which one to take first Safety Netting to Legacy Code Dev. Setup CI/CD Env Test Pyramid Clean Code 1 2 3 4 5 Just like Product Backlog, we have Agility Backlog
  • 11. Sprint 0 – Backlog Prioritization Safety Netting to Legacy Code Dev. Setup CI/CD Env Test Pyramid Clean Code 1 2 3 4 5 • Spiked out Workflow tests • Removed un-necessary out dated items from SVN – – Design Docs (HLD, LLD) – Prototype HTMLs – EAP project files – Multiple JBOSS file check-ins – MySQL cooked up data files Reduced the code base size (from 2.1 GB to 500 MB) • Spiked out Jenkins spin up and local build
  • 12. The most important!!! • Should we copy pase code for new specifications? --- Don’t think so • Workflow Tests for Old Specs – Ensured no existing functionality breaks – Still not database agnostic • Tests to run locally on a populated database Ensure support to existing client
  • 13. The 2nd most important… A feedback loop! • Jenkins I am here to help you guys!
  • 14. Build Jobs for Local and Jenkins Local Build CI Build CT Deploy Workflow Tests
  • 15. Jenkins is Ready to give quick feedback
  • 16. Next one – Safety Netting • Unit Tests – Independent isolated tests – Tests individual class/function/method • Business Logic Tests – – Validates a core business rule. – Might span across multiple domain objects/functions • Workflow Tests – 1 for each Scenario in New Spec Safety Netting as we move along • Refactor the code as we modify it • Write unit & business logic tests if they don’t exist • Don’t add 1 more if else to 10 existing if else(s)
  • 17. Next is Test Pyramid • Right Tests for getting right feedback • Avoiding test duplication • Avoid 100s of UI Tests – they are not needed as other layers can catch most of it
  • 19. 3 layers already there… • https://wiki.jenkins-ci.org/display/JENKINS/LabeledTestGroupsPublisher+Plugin • Test Groups: "unit", "smoke", "regression", "integration", "special", "misc“ Image source: http://www.ascendfinancialplanning.com/your-finances-are-like-the-game-of-football-do-you-have-a-game-plan Well!! Then, we need to monitor it! We do have a plugin • Unit, Business Logic, Integration, Workflow, End to End, UI • Code and hpi available @ https://github.com/prasadkunte/labeled-test-groups- publisher • Now, we can configure & see tests on Jenkins like this Lets change labels as per our pyramid
  • 20. Labelled Test Group – in Action
  • 21. You can keep business happy while we pay tech. debt. Safety Netting to Legacy Code Dev. Setup CI/CD Env Test Pyramid Clean Code & this is what we started already!!!!! Dev setup is the next You guys are meeting the business needs, that’s cool!!
  • 22. Dev. Setup • Dev. Setup pushed on to Artifact Repo. – Java, Jboss, MySQL • Baseline database – Structure copied from Prod – Seed data identified – Ant Script using dbdeploy to deploy base lined database
  • 23. Dev. Setup • Custom Tool to get trimmed DB – For Workflow Tests
  • 24. Workflow test cases – Not database agnostic
  • 25. Hackathon @ IDeaS • Restified the app exposing few apis • Workflow Test Cases Refactored – Database Agnostic Before After
  • 26. Dev setup in good shape too Safety Netting to Legacy Code Dev. Setup CI/CD Env Test Pyramid Clean Code We are going to improve further!!!
  • 27. JaCoCo wrapper for test results Clean Code - Sonar Integration
  • 28. Write Selenium UI tests only for important screens – The 4th Layer… • Integration with Jenkins pending • Taking around 1 min to cover 8 screens Another Layer in Test Pyramid - Selenium UI Test
  • 29. So far, what did we achieve? • From no safety net To some safety net for legacy code • From no CI/CD To Jenkins CI/CD • From no test pyramid To 4 layers of pyramid (3 integrated in CI) • From no standard dev set up To standard dev setup While committing to Business Requirements
  • 30. http://www.strongautomotive.com/everyone-good-plan-get-punched-nose/ Road ahead… Keep Improving:- 1. Increase Test Coverage % 2. Reduce Violations 3. Reduce build timings 4. Fully Automate Production Deployment
  • 31. Moving Forward | Test Coverage & Viloations – Sonar Violations - Spend 20 minutes a day, – 5 tests a week – Refactor as we move – 1 UI Test a week Page 31
  • 32. Earlier Latest Moving Forward | Reduce Build Timings – Faster Feedback Loop
  • 33. Moving Forward | Auto Deployments
  • 34. & the journey continues….
  • 35. © Copyright Integrated Decisions and Systems, Inc. (IDeaS – A SAS COMPANY) Visit IDeaS online at www.ideas.com Thank you so much! Speakers: Naresh Jain @nashjain Prasad Kunte @prasad_kunte
  • 36. © Copyright Integrated Decisions and Systems, Inc. (IDeaS – A SAS COMPANY) Visit IDeaS online at www.ideas.com Few References • http://blogs.agilefaqs.com/2011/02/01/inverting-the-testing-pyramid/ • https://prasadkunte.wordpress.com/2014/12/14/restifying-a-legacy-application- an-experience/ • http://blogs.agilefaqs.com/2011/03/09/big-upfront-test-creation-in-legacy- code-is-a-bad-idea/ • https://www.atlassian.com/company/about/shipit • http://www.mkyong.com/webservices/jax-rs/jersey-spring-integration-example/ • http://examples.javacodegeeks.com/enterprise-java/rest/jersey/json-example- with-jersey-jackson/
  • 37. © Copyright Integrated Decisions and Systems, Inc. (IDeaS – A SAS COMPANY) Visit IDeaS online at www.ideas.com

Editor's Notes

  1. 3/22/15 <number>
  2. 1. IDeaS background 3/22/15 <number>
  3. 1. CPRMS Product Background 3/22/15 <number>
  4. Recovered the code base from cvs server area Why SVN 0 learning curve if you are used to CVS Co located team Other code bases already into SVN so Maintenance and Management becomes smooth 3/22/15 <number>
  5. Restifying with this Spring version didn’t work Can’t simple migrate from 1.5 to 4.X withough changes 3/22/15 <number>
  6. Talk about change in specs Data points changed Would be getting Transaction data for future booking and cars that have checked-in Few enhancements around that Talk about new features coming up Slated this year are changes for Continuous Pricing Notification Module – Managed by Exception Etc. 3/22/15 <number>
  7. Let’s copy Production database (200+ GB) on each machine, as it is baseline scripts are not there Old Specs. - Copy, Paste code and move forward Pretty simple, let’s “try” and write test cases ONLY for newly written code & create Tech Debt stories for future iterations (2016 may be…) Nope let’s start with running local test cases first That’s crazy, it would take us 4/6 months just to build some pyramid. Anyways we are copy pasting for new spec, so let’s write some test cases only for new code 3/22/15 <number>
  8. Dev. Tools uploaded in repo so that everyone gets same copy of Eclipse, Java, Jboss, MySQL etc. From the production copy of db, we created empty schema and identified the seed scripts Ant script written for deploying the database with seed scripts Few data points identified for unit & business logic tests cases which would be required frequently A custom tool written that would pull the data of only 1 carpark into flat files. Another command would push the data in given database 3/22/15 <number>
  9. Will talk about Workflow test cases. Should be database agnostic and all. We identified the most critical workflows which are absolutely necessary for our system to work and wrote the workflow test cases around that… Just like feature first, we went ahead with having wftc to make sure that while we touch the code the core workflows doesn’t break. 3/22/15 <number>
  10. As a part of Ship-It day evaluated how to restify this legacy application – finally could achieve with Jersey implementation http://www.mkyong.com/webservices/jax-rs/jersey-spring-integration-example/ http://examples.javacodegeeks.com/enterprise-java/rest/jersey/json-example-with-jersey-jackson/ http://mvnrepository.com/artifact/com.sun.jersey.contribs/jersey-spring https://prasadkunte.wordpress.com/2014/12/14/restifying-a-legacy-application-an-experience/ Workflow tests refactored to consume rest there by making it db agnostic 3/22/15 <number>
  11. For code getting modified, unit test cases is a MUST UNIT TESTS to be written against empty seeded db Business Logic Tests to be written 3/22/15 <number>
  12. We chose Jenkins. Started with simple project which would take the build & run the Unit and BL tests Deploy in an environment Run the Spec1 workflow tests 3/22/15 <number>
  13. If code changes break Spec1 CI would alarm the same 3/22/15 <number>
  14. Will talk about different sections of test pyramid Will talk about fact that it would have been difficult to build the pyramid for existing code and business wouldn’t have accepted So we chose starting with 3 layers, Workflow Test, Unit, business Logic 3/22/15 <number>
  15. Will talk about different sections of test pyramid Will talk about fact that it would have been difficult to build the pyramid for existing code and business wouldn’t have accepted So we chose starting with 3 layers, Workflow Test, Unit, business Logic 3/22/15 <number>
  16. In the zest to see that our test cases/ safety net is getting built as a pyramid and not as a diamond, ice-cream cone, pentagon etc., we started looking out for plugin that would give us some view about how our tests are shaping Found one.. 3/22/15 <number>
  17. As we integrated, started looking @ a plugin that would segregate the test cases as per the pyramid. Could find one plugin Downloaded the plugin and tweaked it to have headings like "unit", "businesslogic", "integration", "workflow", "endtoend", "ui“ .hpi already uploaded @ XXX 3/22/15 <number>
  18. Current Jenkins state, showing the Tests by Groups 3/22/15 <number>