SlideShare una empresa de Scribd logo
1 de 27
Lessons Learned in Software DevelopmentQA Infrastructure – Maintaining Robustness in Commercial Software Marcus Lagergren Consulting Member of Technical Staff Oracle Corporation
About the Speaker Marcus Lagergren holds a master’s degree from KTH, major in Theoretical Computer Science Marcus was one of the founders of Appeal Virtual Machines that was acquired by BEA in 2002, which in turn was acquired by Oracle in 2008. Marcus has worked on almost all aspects of the JRockit Virtual Machine and is now working with Virtualization technology Marcus likes power tools and scuba diving.
Agenda Robustness in commercial apps with tight release schedules. Utopian vision: perpetual stable bits so we can spin off a release at any time Build Systems Source control and Development Tests Functionality Performance Regression testing
Agenda Result databases Automatic Testing Complex and not-so-standard testing Development aspects
Why listen to me? We’vespent the last 10 yearsdeveloping a JVM and the last 3 yearsdeveloping a Guest Operating system for twocommercial hypervisors. Hundreds of thousands on man hoursspent on robustnessalone Harder-to-debug software hardlyexists.  We’vehad to invent stuff from dayone. Ok, from day 365 or so, lessonslearned We’vemademanymistakesalong the way. No one gets to Utopia, but at leastwehave a reasonablygoodidea of in whichdirection to go
BEA Confidential.  |   6 QA infrastructure QA infrastructure is harder and probably even more important than development infrastructure. The most valuable lesson we have learned is that it must be developed parallel to the application and significant effort must be spent on it.  It is at least as important as the application itself. Sometimes the boundaries between app and test infrastructure aren’t even clear.
QA infrastructure QA and Dev, if separate deparments or roles, shouldalways work together.  Preferably as physicallyclose to eachother as possible Theyshould be able to fill in for eachother and be encouraged to doeachothers’ work. Verydangerous to have a separate QA department on anotherfloor. Verydangerous for QA to just do blackbox testing withoutunderstandingwhat’s in the box. QA staffshould be treated as anyotherdeveloper
Build System Build system, test system and sourcecontrol are parts of the same distributed system.  Mobility - Buildanythinganywhere, locally or globally (distributed) - ”Adistributed cross compiler” Build system should be selfcontained & part of sourcecontrol.  Do a sync on a fresh laptop, have all the details. We chose to putbinariesthere as well to producedeterministic bits and provide selfsufficience Not always a goodidea, butmostly a goodidea
Source Control and Development Needgood support for distributeddevelopment Should be able to handledirectories as separate sourcecontrolentitites. Gatekeepers of mainbranches, distributed team baseddevelopment. Sourcecontrol, builds and developmentshouldonlyrequire vi + prompt Morecomplexenvironments on top for ease of use. Easier to extend with different UIs.
Test System Also under sourcecontrol Distributed system – veryimportant. Virtualizeifpossible. Maximizeresourceusage. Local and remote test runspossible. Submitjobs ”crunchthroughthese tests” ”Check in ifpasses tests”.  Test Machines Performance test machines (dedicated) Functionality test machines (not necessarilydedicated) Anymachinecanvolounteer CPU cycles for functional testing.
Building Blocks – Tests Many tests, especially regression tests, for an appneedn’t be morethan a mainclass with a returnvalue. Keep it simple! ”I spent a fewhoursdistilling this huge program down to a reproducer for BUG123456” Claim:ifit’s simple enough to write and submit a test, > 50% of the bugscan get regression tests as part of the original bugfix.  I willaddress the other 50% later.
Building Blocks – Tests Easy-to-write tests make it possible for the test suite to grownaturally.  If 10 minutes of spare time canlead to a new test beingwritten, checked in and enabled as part of the global test suite, you havesucceeded.  Encouragedevelopers to check in unit tests for new functionalitytogether with the functionality. Need the infrastructure for it in the app Mightwant to enforce this strictly, but it might hinder developmenttoo.
Building Blocks – Result Database Store results in cheapdatabase with sensible layout somewhere. Any freeware is fine – get it up and running.  Easy to maintain and backup Query from localmachinesabouthistorical test results. ”Whenexactlydid this performance regression appear?”  ”List all benchmarkscores on this machine for this benchmarksinceJanuary 1” ”Has this functional test failedbefore? Whatwere the bugfixes?”
Building Blocks - Tests Use ”terror harnesses” that attack the cross sectionsbetweenmodules.  AllocAndRun RedefineClasses ExceptionInClinit
Building Blocks - Performance Anythingcaneffects performance. EVERYTHING affects performance. Weneedautomatic regression warnings. Anyone who submits a performance regression will get an e-mail from the test system. Continuously make it easy to addmorebenchmarks. Automation: Deviations, baselines, invariants.
Testing – The need for continuous automatic testing Needcontinuousautomatic testing. Example from real life: JRockit Solaris has beenmadeavailableoff and on over the years. Bit rot sets in immediatelywhenremoved from automated testing.  Release version may break debug version and vice versa. Linux version may break Windows version and vice versa. Useextremelystrict and pickycompilerflags.
Testing – So What About the Other 50%? Simple Java programs with main functions may not be enough for all the bugs. How do we test for a specific optimization bug in the code generator?  How do we test for a strange boundary case that crashes the GC, that happens after two weeks in production? Key observation: We need to export a state.
Testing – So What About the Other 50%? Examples: Create a very special heap with a fewobjects in nastyplaces.  Load it and trigger a garbagecollection. Save it and compare to reference. Serialize an IR from just before an offendingoptimization. Load it and trigger the optimization. Save the resulting IR and compare it to reference. Comparewould be more of an ”equals” than a ”memcmp” Weneed a level of modularizationthat’sgoodenough for this.  The collection of tests shouldgrownaturally, but the VM design shouldallow the ways of testing the VM to grownaturally as well.
Testing – So What About the Other 50%? But of courseit’s not as simple as that. Whataboutmultithreadedapps? Race conditions?  Plenty of threadsoperate on the same memory – e.g. Multithreaded GC. Howcanwe make test cases? Synchronization points.  Randomized input, randomizedsleeps. Try to cover the malicioussideeffects of parallelism.   ThingsliketheRaceTrackalgorithmcanfindsome (not all) races in staticcode, but the world is dynamic. Testing needs to be.
Testing – So What About the Other 50%? Disclaimer: Sometimeswe just need to crunch a lot of code for a long, long time. Nothingelsesuffices to reproduce a problem or the framework that would make it possibledoesn’texist. So make sure the distributed system burnsthosefree CPU cycles And make the dumps full and comprehensible.  Don’tlosethem, dammit! No wipingthem after 24h. Disk is cheap.  ”Phonehome” Suprisinglyeffectiveif you haveenough beta testers.
Testing – Retrofitting a framework	 You willprobablyhave to do this, sincepeopledon’tunderstand the importance of fundamental QA from day 1. Situation: Weneed the QA infrastructurebutdon’thave it. Our app has come a longway. Learn from history For example, go over 500 bug parade entries for HotSpot. Howmanycan be tested by small deterministicreproducers?  Whatabout the rest - brainstormwhatfunctionality the VM wouldneedifwehad to write a simple reproducer for each problem.
Development – The platform matrix Try to keep the amount of common code as large as possible. It is always a choice between platform specific features and test matrix growth. Initially, our performance critical code was native. As our JIT got better, we would write more and more in Java. Native is much worse.  ”premethods” Augmented Java – intrinsics, ”pd_addr”, preprocessed Java files.
Development – The platform matrix Otherseemlinglyplatformdependentthingscan be madeplatform independent. Example: Native stubs. The bulk of the work is parameter marshalling, the register allocatorcando that already.  Beware of ”falseabstraction”.  That extra parameter that is NULL on all platformsexcept IA64. Implementationlanguage: Debugging is an issue Powerful C/C++ debuggersexist. Meta-debugging is usuallyharder.
Development Don’tlosefocus. Modularity first. Example: ”the fastest server side JVM”, ”startup time is an issue”, ”clientapplications are an issue” ”weneedzero overhead runtime instrumentation”. Runfool! Run!  It is importantwhenoptimizing for performance not just too look at e.g.SPECjbb™and SPECjvm98™ Real world applicationsdo a lot of otherthings.  ”There is no genericcommutative plus operator”. At leastnobodycares.
Development - Policy Don’t be toomuch of a quality fascist whencode is written. If you spend all your time preventinglargercheckins or demand 100% testing on everythingnothingwillever get checked in. If you demand a strictlydocumented process with specifications for everything, all anyonewilleverdo is to writespecifications and holdmeetings. Both of the above are good in smalleramounts. It’smore of an awarenessthing. And the infrastructursshouldquickly and mercilesslyraise the alarm as soon as something breaks to preventfurtherdamage.
Lessons Learned  Summary – The important stuff to bring with you Build the test infrastructure in parallel with the application Start at the same time! Don’tput it off. It is part of the appdevelopment process and should be in the time budget.  IdeallyDevand QA teams should be fused and be able to doeachother’sjobs. No separate compartments. Don’t be afraid to couple it tightly in placesif that is what is required to maintainstability. Use all available CPU cycles for testing
Lessons Learned in Software Development: QA Infrastructure – Maintaining Robustness in Commercial Software

Más contenido relacionado

La actualidad más candente

Test driven development
Test driven developmentTest driven development
Test driven development
Shalabh Saxena
 
Continuous Integration using Cruise Control
Continuous Integration using Cruise ControlContinuous Integration using Cruise Control
Continuous Integration using Cruise Control
elliando dias
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven development
toteb5
 
Software Design for Testability
Software Design for TestabilitySoftware Design for Testability
Software Design for Testability
amr0mt
 
Everything you ever wanted to know about deployment but were afraid to ask
Everything you ever wanted to know about deployment but were afraid to askEverything you ever wanted to know about deployment but were afraid to ask
Everything you ever wanted to know about deployment but were afraid to ask
lauraxthomson
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
Babul Mirdha
 

La actualidad más candente (20)

Test Driven Development by Denis Lutz
Test Driven Development by Denis LutzTest Driven Development by Denis Lutz
Test Driven Development by Denis Lutz
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграции
 
Why Test Driven Development?
Why Test Driven Development?Why Test Driven Development?
Why Test Driven Development?
 
Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015
 
Continuous Integration using Cruise Control
Continuous Integration using Cruise ControlContinuous Integration using Cruise Control
Continuous Integration using Cruise Control
 
Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Continuous Delivery: The Dirty Details
Continuous Delivery: The Dirty DetailsContinuous Delivery: The Dirty Details
Continuous Delivery: The Dirty Details
 
Tccc10 tooling testingci-vs2010teamcity
Tccc10 tooling testingci-vs2010teamcityTccc10 tooling testingci-vs2010teamcity
Tccc10 tooling testingci-vs2010teamcity
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven development
 
Software Design for Testability
Software Design for TestabilitySoftware Design for Testability
Software Design for Testability
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Everything you ever wanted to know about deployment but were afraid to ask
Everything you ever wanted to know about deployment but were afraid to askEverything you ever wanted to know about deployment but were afraid to ask
Everything you ever wanted to know about deployment but were afraid to ask
 
AD208 - End to End Quality Processes for Top Notch XPages Apps
AD208 - End to End Quality Processes for Top Notch XPages AppsAD208 - End to End Quality Processes for Top Notch XPages Apps
AD208 - End to End Quality Processes for Top Notch XPages Apps
 
Automate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaSAutomate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaS
 
Deploying ML models to production (frequently and safely) - PYCON 2018
Deploying ML models to production (frequently and safely) - PYCON 2018Deploying ML models to production (frequently and safely) - PYCON 2018
Deploying ML models to production (frequently and safely) - PYCON 2018
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 

Destacado

Tjänstgöringsbetyg för Christin
Tjänstgöringsbetyg för ChristinTjänstgöringsbetyg för Christin
Tjänstgöringsbetyg för Christin
Christin Ljungqvist
 
Personligt Brev LaszloB 2016
Personligt Brev LaszloB 2016Personligt Brev LaszloB 2016
Personligt Brev LaszloB 2016
Laszlo Bodnar
 

Destacado (20)

BRAND WAR 2
BRAND WAR 2BRAND WAR 2
BRAND WAR 2
 
Programmatic — агентство — клиент
Programmatic — агентство — клиентProgrammatic — агентство — клиент
Programmatic — агентство — клиент
 
Matt Stauble Media 2013
Matt Stauble Media 2013Matt Stauble Media 2013
Matt Stauble Media 2013
 
A Guide to Mbeya Tanzania
A Guide to Mbeya TanzaniaA Guide to Mbeya Tanzania
A Guide to Mbeya Tanzania
 
MYportfolio2016
MYportfolio2016MYportfolio2016
MYportfolio2016
 
Early Experiences with the OpenMP Accelerator Model
Early Experiences with the OpenMP Accelerator ModelEarly Experiences with the OpenMP Accelerator Model
Early Experiences with the OpenMP Accelerator Model
 
Video Priming – How to Give Your Acquisition Campaigns an Unfair Advantage
Video Priming – How to Give Your Acquisition Campaigns an Unfair AdvantageVideo Priming – How to Give Your Acquisition Campaigns an Unfair Advantage
Video Priming – How to Give Your Acquisition Campaigns an Unfair Advantage
 
CV- M Nawaz
CV- M NawazCV- M Nawaz
CV- M Nawaz
 
Cv cover letter laura blanco gonzález
Cv cover letter laura blanco gonzálezCv cover letter laura blanco gonzález
Cv cover letter laura blanco gonzález
 
Tjänstgöringsbetyg för Christin
Tjänstgöringsbetyg för ChristinTjänstgöringsbetyg för Christin
Tjänstgöringsbetyg för Christin
 
IoTで畑を監視してみる
IoTで畑を監視してみるIoTで畑を監視してみる
IoTで畑を監視してみる
 
Personligt Brev LaszloB 2016
Personligt Brev LaszloB 2016Personligt Brev LaszloB 2016
Personligt Brev LaszloB 2016
 
Android Test Automation – one year later
Android Test Automation – one year laterAndroid Test Automation – one year later
Android Test Automation – one year later
 
Grimpeurs et managers : en prise directe sur le risque
Grimpeurs et managers : en prise directe sur le risqueGrimpeurs et managers : en prise directe sur le risque
Grimpeurs et managers : en prise directe sur le risque
 
Clinical Trials and the Disney Effect
Clinical Trials and the Disney EffectClinical Trials and the Disney Effect
Clinical Trials and the Disney Effect
 
Agilept
AgileptAgilept
Agilept
 
SXSW GAW Miners - Session Visual Aides
SXSW GAW Miners - Session Visual AidesSXSW GAW Miners - Session Visual Aides
SXSW GAW Miners - Session Visual Aides
 
Basics of Computer Science
Basics of Computer ScienceBasics of Computer Science
Basics of Computer Science
 
Newsletters : outil d'hier ou d'aujourd'hui
Newsletters : outil d'hier ou d'aujourd'huiNewsletters : outil d'hier ou d'aujourd'hui
Newsletters : outil d'hier ou d'aujourd'hui
 
El bullying
El bullyingEl bullying
El bullying
 

Similar a Lessons Learned in Software Development: QA Infrastructure – Maintaining Robustness in Commercial Software

Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
Enkitec
 
Automating development-operations-v1
Automating development-operations-v1Automating development-operations-v1
Automating development-operations-v1
Sumanth Vepa
 
Amol_Koshti_04May16
Amol_Koshti_04May16Amol_Koshti_04May16
Amol_Koshti_04May16
Amol Koshti
 
Java Tuning White Paper
Java Tuning White PaperJava Tuning White Paper
Java Tuning White Paper
white paper
 

Similar a Lessons Learned in Software Development: QA Infrastructure – Maintaining Robustness in Commercial Software (20)

[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
Virtualising Tier 1 Apps
Virtualising Tier 1 AppsVirtualising Tier 1 Apps
Virtualising Tier 1 Apps
 
Automating development-operations-v1
Automating development-operations-v1Automating development-operations-v1
Automating development-operations-v1
 
Testing 101
Testing 101Testing 101
Testing 101
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
 
Machine programming
Machine programmingMachine programming
Machine programming
 
How We Test Event-Driven Microservices
How We Test Event-Driven MicroservicesHow We Test Event-Driven Microservices
How We Test Event-Driven Microservices
 
Stress Test & Chaos Engineering
Stress Test & Chaos EngineeringStress Test & Chaos Engineering
Stress Test & Chaos Engineering
 
Amol_Koshti_04May16
Amol_Koshti_04May16Amol_Koshti_04May16
Amol_Koshti_04May16
 
How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16
How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16
How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16
 
How EVERFI Moved from No Automation to Continuous Test Generation in 9 Months
How EVERFI Moved from No Automation to Continuous Test Generation in 9 MonthsHow EVERFI Moved from No Automation to Continuous Test Generation in 9 Months
How EVERFI Moved from No Automation to Continuous Test Generation in 9 Months
 
Testing in a glance
Testing in a glanceTesting in a glance
Testing in a glance
 
Strata CA 2019: From Jupyter to Production Manu Mukerji
Strata CA 2019: From Jupyter to Production Manu MukerjiStrata CA 2019: From Jupyter to Production Manu Mukerji
Strata CA 2019: From Jupyter to Production Manu Mukerji
 
Gallio Crafting A Toolchain
Gallio Crafting A ToolchainGallio Crafting A Toolchain
Gallio Crafting A Toolchain
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the Trenches
 
Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyPrinciples and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at Etsy
 
Adrian marinica continuous integration in the visual studio world
Adrian marinica   continuous integration in the visual studio worldAdrian marinica   continuous integration in the visual studio world
Adrian marinica continuous integration in the visual studio world
 
Java Tuning White Paper
Java Tuning White PaperJava Tuning White Paper
Java Tuning White Paper
 

Más de Cωνσtantίnoς Giannoulis

Modeling Strategy Maps & Balanced Scorecards using i*
Modeling Strategy Maps & Balanced Scorecards using i*Modeling Strategy Maps & Balanced Scorecards using i*
Modeling Strategy Maps & Balanced Scorecards using i*
Cωνσtantίnoς Giannoulis
 

Más de Cωνσtantίnoς Giannoulis (8)

Model-driven Strategic Awareness: From a Unified Business Strategy Meta-model...
Model-driven Strategic Awareness: From a Unified Business Strategy Meta-model...Model-driven Strategic Awareness: From a Unified Business Strategy Meta-model...
Model-driven Strategic Awareness: From a Unified Business Strategy Meta-model...
 
Linking Strategic Innovation to Requirements: a look into Blue Ocean Strategy
Linking Strategic Innovation to Requirements: a look into Blue Ocean StrategyLinking Strategic Innovation to Requirements: a look into Blue Ocean Strategy
Linking Strategic Innovation to Requirements: a look into Blue Ocean Strategy
 
Modeling Business Strategy for Business-IT Alignment
Modeling Business Strategy for Business-IT AlignmentModeling Business Strategy for Business-IT Alignment
Modeling Business Strategy for Business-IT Alignment
 
Modeling Strategy Maps & Balanced Scorecards using i*
Modeling Strategy Maps & Balanced Scorecards using i*Modeling Strategy Maps & Balanced Scorecards using i*
Modeling Strategy Maps & Balanced Scorecards using i*
 
Modeling Competition-driven Business Strategy for Business IT Alignment
Modeling Competition-driven Business Strategy for Business IT AlignmentModeling Competition-driven Business Strategy for Business IT Alignment
Modeling Competition-driven Business Strategy for Business IT Alignment
 
Modeling Business Strategy: A meta-model of Strategy Maps and Balance Scorecards
Modeling Business Strategy: A meta-model of Strategy Maps and Balance ScorecardsModeling Business Strategy: A meta-model of Strategy Maps and Balance Scorecards
Modeling Business Strategy: A meta-model of Strategy Maps and Balance Scorecards
 
Towards a Unified Business Strategy Language: a Meta-model of Strategy Maps
Towards a Unified Business Strategy Language: a Meta-model of Strategy MapsTowards a Unified Business Strategy Language: a Meta-model of Strategy Maps
Towards a Unified Business Strategy Language: a Meta-model of Strategy Maps
 
The GM-VV
The GM-VVThe GM-VV
The GM-VV
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Lessons Learned in Software Development: QA Infrastructure – Maintaining Robustness in Commercial Software

  • 1. Lessons Learned in Software DevelopmentQA Infrastructure – Maintaining Robustness in Commercial Software Marcus Lagergren Consulting Member of Technical Staff Oracle Corporation
  • 2. About the Speaker Marcus Lagergren holds a master’s degree from KTH, major in Theoretical Computer Science Marcus was one of the founders of Appeal Virtual Machines that was acquired by BEA in 2002, which in turn was acquired by Oracle in 2008. Marcus has worked on almost all aspects of the JRockit Virtual Machine and is now working with Virtualization technology Marcus likes power tools and scuba diving.
  • 3. Agenda Robustness in commercial apps with tight release schedules. Utopian vision: perpetual stable bits so we can spin off a release at any time Build Systems Source control and Development Tests Functionality Performance Regression testing
  • 4. Agenda Result databases Automatic Testing Complex and not-so-standard testing Development aspects
  • 5. Why listen to me? We’vespent the last 10 yearsdeveloping a JVM and the last 3 yearsdeveloping a Guest Operating system for twocommercial hypervisors. Hundreds of thousands on man hoursspent on robustnessalone Harder-to-debug software hardlyexists. We’vehad to invent stuff from dayone. Ok, from day 365 or so, lessonslearned We’vemademanymistakesalong the way. No one gets to Utopia, but at leastwehave a reasonablygoodidea of in whichdirection to go
  • 6. BEA Confidential. | 6 QA infrastructure QA infrastructure is harder and probably even more important than development infrastructure. The most valuable lesson we have learned is that it must be developed parallel to the application and significant effort must be spent on it. It is at least as important as the application itself. Sometimes the boundaries between app and test infrastructure aren’t even clear.
  • 7. QA infrastructure QA and Dev, if separate deparments or roles, shouldalways work together. Preferably as physicallyclose to eachother as possible Theyshould be able to fill in for eachother and be encouraged to doeachothers’ work. Verydangerous to have a separate QA department on anotherfloor. Verydangerous for QA to just do blackbox testing withoutunderstandingwhat’s in the box. QA staffshould be treated as anyotherdeveloper
  • 8. Build System Build system, test system and sourcecontrol are parts of the same distributed system. Mobility - Buildanythinganywhere, locally or globally (distributed) - ”Adistributed cross compiler” Build system should be selfcontained & part of sourcecontrol. Do a sync on a fresh laptop, have all the details. We chose to putbinariesthere as well to producedeterministic bits and provide selfsufficience Not always a goodidea, butmostly a goodidea
  • 9. Source Control and Development Needgood support for distributeddevelopment Should be able to handledirectories as separate sourcecontrolentitites. Gatekeepers of mainbranches, distributed team baseddevelopment. Sourcecontrol, builds and developmentshouldonlyrequire vi + prompt Morecomplexenvironments on top for ease of use. Easier to extend with different UIs.
  • 10. Test System Also under sourcecontrol Distributed system – veryimportant. Virtualizeifpossible. Maximizeresourceusage. Local and remote test runspossible. Submitjobs ”crunchthroughthese tests” ”Check in ifpasses tests”. Test Machines Performance test machines (dedicated) Functionality test machines (not necessarilydedicated) Anymachinecanvolounteer CPU cycles for functional testing.
  • 11. Building Blocks – Tests Many tests, especially regression tests, for an appneedn’t be morethan a mainclass with a returnvalue. Keep it simple! ”I spent a fewhoursdistilling this huge program down to a reproducer for BUG123456” Claim:ifit’s simple enough to write and submit a test, > 50% of the bugscan get regression tests as part of the original bugfix. I willaddress the other 50% later.
  • 12. Building Blocks – Tests Easy-to-write tests make it possible for the test suite to grownaturally. If 10 minutes of spare time canlead to a new test beingwritten, checked in and enabled as part of the global test suite, you havesucceeded. Encouragedevelopers to check in unit tests for new functionalitytogether with the functionality. Need the infrastructure for it in the app Mightwant to enforce this strictly, but it might hinder developmenttoo.
  • 13. Building Blocks – Result Database Store results in cheapdatabase with sensible layout somewhere. Any freeware is fine – get it up and running. Easy to maintain and backup Query from localmachinesabouthistorical test results. ”Whenexactlydid this performance regression appear?” ”List all benchmarkscores on this machine for this benchmarksinceJanuary 1” ”Has this functional test failedbefore? Whatwere the bugfixes?”
  • 14. Building Blocks - Tests Use ”terror harnesses” that attack the cross sectionsbetweenmodules. AllocAndRun RedefineClasses ExceptionInClinit
  • 15. Building Blocks - Performance Anythingcaneffects performance. EVERYTHING affects performance. Weneedautomatic regression warnings. Anyone who submits a performance regression will get an e-mail from the test system. Continuously make it easy to addmorebenchmarks. Automation: Deviations, baselines, invariants.
  • 16. Testing – The need for continuous automatic testing Needcontinuousautomatic testing. Example from real life: JRockit Solaris has beenmadeavailableoff and on over the years. Bit rot sets in immediatelywhenremoved from automated testing. Release version may break debug version and vice versa. Linux version may break Windows version and vice versa. Useextremelystrict and pickycompilerflags.
  • 17. Testing – So What About the Other 50%? Simple Java programs with main functions may not be enough for all the bugs. How do we test for a specific optimization bug in the code generator? How do we test for a strange boundary case that crashes the GC, that happens after two weeks in production? Key observation: We need to export a state.
  • 18. Testing – So What About the Other 50%? Examples: Create a very special heap with a fewobjects in nastyplaces. Load it and trigger a garbagecollection. Save it and compare to reference. Serialize an IR from just before an offendingoptimization. Load it and trigger the optimization. Save the resulting IR and compare it to reference. Comparewould be more of an ”equals” than a ”memcmp” Weneed a level of modularizationthat’sgoodenough for this. The collection of tests shouldgrownaturally, but the VM design shouldallow the ways of testing the VM to grownaturally as well.
  • 19. Testing – So What About the Other 50%? But of courseit’s not as simple as that. Whataboutmultithreadedapps? Race conditions? Plenty of threadsoperate on the same memory – e.g. Multithreaded GC. Howcanwe make test cases? Synchronization points. Randomized input, randomizedsleeps. Try to cover the malicioussideeffects of parallelism. ThingsliketheRaceTrackalgorithmcanfindsome (not all) races in staticcode, but the world is dynamic. Testing needs to be.
  • 20. Testing – So What About the Other 50%? Disclaimer: Sometimeswe just need to crunch a lot of code for a long, long time. Nothingelsesuffices to reproduce a problem or the framework that would make it possibledoesn’texist. So make sure the distributed system burnsthosefree CPU cycles And make the dumps full and comprehensible. Don’tlosethem, dammit! No wipingthem after 24h. Disk is cheap. ”Phonehome” Suprisinglyeffectiveif you haveenough beta testers.
  • 21. Testing – Retrofitting a framework You willprobablyhave to do this, sincepeopledon’tunderstand the importance of fundamental QA from day 1. Situation: Weneed the QA infrastructurebutdon’thave it. Our app has come a longway. Learn from history For example, go over 500 bug parade entries for HotSpot. Howmanycan be tested by small deterministicreproducers? Whatabout the rest - brainstormwhatfunctionality the VM wouldneedifwehad to write a simple reproducer for each problem.
  • 22. Development – The platform matrix Try to keep the amount of common code as large as possible. It is always a choice between platform specific features and test matrix growth. Initially, our performance critical code was native. As our JIT got better, we would write more and more in Java. Native is much worse. ”premethods” Augmented Java – intrinsics, ”pd_addr”, preprocessed Java files.
  • 23. Development – The platform matrix Otherseemlinglyplatformdependentthingscan be madeplatform independent. Example: Native stubs. The bulk of the work is parameter marshalling, the register allocatorcando that already. Beware of ”falseabstraction”. That extra parameter that is NULL on all platformsexcept IA64. Implementationlanguage: Debugging is an issue Powerful C/C++ debuggersexist. Meta-debugging is usuallyharder.
  • 24. Development Don’tlosefocus. Modularity first. Example: ”the fastest server side JVM”, ”startup time is an issue”, ”clientapplications are an issue” ”weneedzero overhead runtime instrumentation”. Runfool! Run! It is importantwhenoptimizing for performance not just too look at e.g.SPECjbb™and SPECjvm98™ Real world applicationsdo a lot of otherthings. ”There is no genericcommutative plus operator”. At leastnobodycares.
  • 25. Development - Policy Don’t be toomuch of a quality fascist whencode is written. If you spend all your time preventinglargercheckins or demand 100% testing on everythingnothingwillever get checked in. If you demand a strictlydocumented process with specifications for everything, all anyonewilleverdo is to writespecifications and holdmeetings. Both of the above are good in smalleramounts. It’smore of an awarenessthing. And the infrastructursshouldquickly and mercilesslyraise the alarm as soon as something breaks to preventfurtherdamage.
  • 26. Lessons Learned Summary – The important stuff to bring with you Build the test infrastructure in parallel with the application Start at the same time! Don’tput it off. It is part of the appdevelopment process and should be in the time budget. IdeallyDevand QA teams should be fused and be able to doeachother’sjobs. No separate compartments. Don’t be afraid to couple it tightly in placesif that is what is required to maintainstability. Use all available CPU cycles for testing