SlideShare a Scribd company logo
1 of 42
Saturday, 26Saturday, 26thth
March, 2011March, 2011
Reducing build time
when patience is not a virtue
Aman King
Application Developer
ThoughtWorks
Recognize these?
Rank these
Did you choose this?
1 32
Or did you choose this?
1 23
Patience is not always a virtue!
Fail fast!
quick feedback
Rank these
 High functional coverage
 Short build time
Did you choose this?
a.High functional coverage
b.Short build time
Or did you choose this?
a.Short build time
b.High functional coverage
You can choose both!
a.Short build time
a.High functional coverage
But before we see how…
Project background
Content driven,
community oriented
website
Ruby on Rails
Cucumber
+
Capybara
+
Selenium
4 : 1 ratio of Dev : QA
Everyone writes functional
tests in a common automation
suite
Acceptance Test Driven
Development (ATDD)
Our problems
Long build time
~ 55 minutes
Non-deterministic failures
Manual reruns needed
Our solution:
Parallelization
Basic idea
Reduced build time
~ 5 minutes
Build time chart
What we did
Parallelization on a single
multicore machine
used Ruby library parallel_tests
Report generation in parallel
wrote custom report formatter
Isolating databases
each process needs its own database
database.yml
test: &test
adapter: mysql2
encoding: utf8
reconnect: false
database: myapp_test<%= ENV['TEST_ENV_NUMBER'] %>
pool: 5
username: root
password:
Isolating external dependencies
(Solr)
each process needs its own Solr instance
sunspot.yml
test:
solr:
hostname: localhost
port: <%= 8982 - ENV['TEST_ENV_NUMBER'].to_i %>
log_level: INFO #WARNING
log_file: <%= File.join(::Rails.root, 'log',
"solr_#{ENV['TEST_ENV_NUMBER'].to_i}.log") %>
data_path: <%= File.join(::Rails.root, 'solr',
'data’, "#{ENV['TEST_ENV_NUMBER'].to_i}") %>
pid_path: <%= File.join(::Rails.root, 'solr',
'pids', "#{ENV['TEST_ENV_NUMBER'].to_i}") %>
Handling multiple Firefox
instances
and
Selenium’s use of
shared ephemeral ports
Monitoring Memory and
CPU usage
adjust number of parallel process accordingly
Auto rerunning failed tests
non-deterministic failures are likelier with
the CPU under stress
Beyond parallelization…
Stubbing external calls
reduce dependency-related delays where
avoidable
Consolidating scenarios
combine similar test scenarios into single
runs instead of separate tests
Maintaining conventions when
writing automated tests
avoid time-based wait statements, use test
framework APIs that take lesser time, etc
Conclusion
Resources
http://cukes.info
http://rubygems.org/gems/capybara
http://seleniumhq.org/projects/remote-control
http://rubygems.org/gems/parallel_tests
http://selenium-grid.seleniumhq.org
http://test-load-balancer.github.com
http://github.com/bblimke/webmock
http://testing.thoughtworks.com
Thank you
king@thoughtworks.com
http://www.wikyblog.com/AmanKing

More Related Content

What's hot

Agile Testing Best Practices
Agile Testing Best PracticesAgile Testing Best Practices
Agile Testing Best PracticesStephen Ritchie
 
AgileMidwest2018-Haarmann-AcceleratingAgilityWithTech
AgileMidwest2018-Haarmann-AcceleratingAgilityWithTechAgileMidwest2018-Haarmann-AcceleratingAgilityWithTech
AgileMidwest2018-Haarmann-AcceleratingAgilityWithTechJason Tice
 
Agile planning and iterations with Scrum using Team Foundation Server 2013
Agile planning and iterations with Scrum using Team Foundation Server 2013Agile planning and iterations with Scrum using Team Foundation Server 2013
Agile planning and iterations with Scrum using Team Foundation Server 2013Allan Mangune
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous DeliveryMike McGarr
 
Implementing Continuous Product Delivery
Implementing Continuous Product DeliveryImplementing Continuous Product Delivery
Implementing Continuous Product DeliveryJeremy Horn
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integrationdrluckyspin
 
Why source control your Oracle Database?
Why source control your Oracle Database?Why source control your Oracle Database?
Why source control your Oracle Database?Red Gate Software
 
Continuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database ObjectsContinuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database ObjectsPrabhu Ramasamy
 
Agile engineering practices – a short overview
Agile engineering practices – a short overviewAgile engineering practices – a short overview
Agile engineering practices – a short overviewSerhiy Yevtushenko
 
Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updatedTharinda Liyanage
 
Keynote AST 2016
Keynote AST 2016Keynote AST 2016
Keynote AST 2016Kim Herzig
 
Continuous Integration and Builds
Continuous Integration and BuildsContinuous Integration and Builds
Continuous Integration and BuildsBhavin Javia
 
Continuous integration, delivery & deployment
Continuous integration,  delivery & deploymentContinuous integration,  delivery & deployment
Continuous integration, delivery & deploymentMartijn van der Kamp
 
Puppet camp 2015 phoenix david patterson
Puppet camp 2015 phoenix   david pattersonPuppet camp 2015 phoenix   david patterson
Puppet camp 2015 phoenix david pattersonPuppet
 
Using Crowdsourced Testing to Turbocharge your Development Team
Using Crowdsourced Testing to Turbocharge your Development TeamUsing Crowdsourced Testing to Turbocharge your Development Team
Using Crowdsourced Testing to Turbocharge your Development TeamRainforest QA
 
Test Strategies in Microservices
Test Strategies in MicroservicesTest Strategies in Microservices
Test Strategies in MicroservicesMesut Özen
 
Optimising Quality Assurance in an Agile World
Optimising Quality Assurance in an Agile WorldOptimising Quality Assurance in an Agile World
Optimising Quality Assurance in an Agile WorldOriginal Software
 
Agile_SDLC_Node.js@Paypal_ppt
Agile_SDLC_Node.js@Paypal_pptAgile_SDLC_Node.js@Paypal_ppt
Agile_SDLC_Node.js@Paypal_pptHitesh Kumar
 

What's hot (20)

Agile Testing Best Practices
Agile Testing Best PracticesAgile Testing Best Practices
Agile Testing Best Practices
 
AgileMidwest2018-Haarmann-AcceleratingAgilityWithTech
AgileMidwest2018-Haarmann-AcceleratingAgilityWithTechAgileMidwest2018-Haarmann-AcceleratingAgilityWithTech
AgileMidwest2018-Haarmann-AcceleratingAgilityWithTech
 
Agile planning and iterations with Scrum using Team Foundation Server 2013
Agile planning and iterations with Scrum using Team Foundation Server 2013Agile planning and iterations with Scrum using Team Foundation Server 2013
Agile planning and iterations with Scrum using Team Foundation Server 2013
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
 
Implementing Continuous Product Delivery
Implementing Continuous Product DeliveryImplementing Continuous Product Delivery
Implementing Continuous Product Delivery
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Why source control your Oracle Database?
Why source control your Oracle Database?Why source control your Oracle Database?
Why source control your Oracle Database?
 
Continuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database ObjectsContinuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database Objects
 
Agile engineering practices – a short overview
Agile engineering practices – a short overviewAgile engineering practices – a short overview
Agile engineering practices – a short overview
 
Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updated
 
How to Introduce Continuous Delivery
How to Introduce Continuous DeliveryHow to Introduce Continuous Delivery
How to Introduce Continuous Delivery
 
Keynote AST 2016
Keynote AST 2016Keynote AST 2016
Keynote AST 2016
 
Continuous Integration and Builds
Continuous Integration and BuildsContinuous Integration and Builds
Continuous Integration and Builds
 
Continuous integration, delivery & deployment
Continuous integration,  delivery & deploymentContinuous integration,  delivery & deployment
Continuous integration, delivery & deployment
 
Puppet camp 2015 phoenix david patterson
Puppet camp 2015 phoenix   david pattersonPuppet camp 2015 phoenix   david patterson
Puppet camp 2015 phoenix david patterson
 
Using Crowdsourced Testing to Turbocharge your Development Team
Using Crowdsourced Testing to Turbocharge your Development TeamUsing Crowdsourced Testing to Turbocharge your Development Team
Using Crowdsourced Testing to Turbocharge your Development Team
 
Code Reviews
Code ReviewsCode Reviews
Code Reviews
 
Test Strategies in Microservices
Test Strategies in MicroservicesTest Strategies in Microservices
Test Strategies in Microservices
 
Optimising Quality Assurance in an Agile World
Optimising Quality Assurance in an Agile WorldOptimising Quality Assurance in an Agile World
Optimising Quality Assurance in an Agile World
 
Agile_SDLC_Node.js@Paypal_ppt
Agile_SDLC_Node.js@Paypal_pptAgile_SDLC_Node.js@Paypal_ppt
Agile_SDLC_Node.js@Paypal_ppt
 

Viewers also liked

Javascript toolkit
Javascript toolkitJavascript toolkit
Javascript toolkitThoughtworks
 
Keynote: Tracking every move | Hind Hobeika, CEO, Instabeat
Keynote: Tracking every move | Hind Hobeika, CEO, InstabeatKeynote: Tracking every move | Hind Hobeika, CEO, Instabeat
Keynote: Tracking every move | Hind Hobeika, CEO, InstabeatThoughtworks
 
IATA-ThoughtWorks - Engaging in Change
IATA-ThoughtWorks - Engaging in ChangeIATA-ThoughtWorks - Engaging in Change
IATA-ThoughtWorks - Engaging in ChangeThoughtworks
 
The internet is broken, by Ola Bini
The internet is broken, by Ola BiniThe internet is broken, by Ola Bini
The internet is broken, by Ola BiniThoughtworks
 
Test Your Service Not Your UI
Test Your Service Not Your UITest Your Service Not Your UI
Test Your Service Not Your UIThoughtworks
 
Testes UI: Não aceite mais falso negativos
Testes UI: Não aceite mais falso negativosTestes UI: Não aceite mais falso negativos
Testes UI: Não aceite mais falso negativosThoughtworks
 
Quality without Heroics
Quality without HeroicsQuality without Heroics
Quality without HeroicsThoughtworks
 
Explore, Exploit, and Transform Your Way to a Digital Future- Leslie Barry, T...
Explore, Exploit, and Transform Your Way to a Digital Future- Leslie Barry, T...Explore, Exploit, and Transform Your Way to a Digital Future- Leslie Barry, T...
Explore, Exploit, and Transform Your Way to a Digital Future- Leslie Barry, T...Thoughtworks
 
National Society of Black Engineers (NBSE) - Defeating the Imposter Syndrome:...
National Society of Black Engineers (NBSE) - Defeating the Imposter Syndrome:...National Society of Black Engineers (NBSE) - Defeating the Imposter Syndrome:...
National Society of Black Engineers (NBSE) - Defeating the Imposter Syndrome:...Thoughtworks
 
Ownership Transfer of an IT Program
Ownership Transfer of an IT ProgramOwnership Transfer of an IT Program
Ownership Transfer of an IT ProgramThoughtworks
 

Viewers also liked (10)

Javascript toolkit
Javascript toolkitJavascript toolkit
Javascript toolkit
 
Keynote: Tracking every move | Hind Hobeika, CEO, Instabeat
Keynote: Tracking every move | Hind Hobeika, CEO, InstabeatKeynote: Tracking every move | Hind Hobeika, CEO, Instabeat
Keynote: Tracking every move | Hind Hobeika, CEO, Instabeat
 
IATA-ThoughtWorks - Engaging in Change
IATA-ThoughtWorks - Engaging in ChangeIATA-ThoughtWorks - Engaging in Change
IATA-ThoughtWorks - Engaging in Change
 
The internet is broken, by Ola Bini
The internet is broken, by Ola BiniThe internet is broken, by Ola Bini
The internet is broken, by Ola Bini
 
Test Your Service Not Your UI
Test Your Service Not Your UITest Your Service Not Your UI
Test Your Service Not Your UI
 
Testes UI: Não aceite mais falso negativos
Testes UI: Não aceite mais falso negativosTestes UI: Não aceite mais falso negativos
Testes UI: Não aceite mais falso negativos
 
Quality without Heroics
Quality without HeroicsQuality without Heroics
Quality without Heroics
 
Explore, Exploit, and Transform Your Way to a Digital Future- Leslie Barry, T...
Explore, Exploit, and Transform Your Way to a Digital Future- Leslie Barry, T...Explore, Exploit, and Transform Your Way to a Digital Future- Leslie Barry, T...
Explore, Exploit, and Transform Your Way to a Digital Future- Leslie Barry, T...
 
National Society of Black Engineers (NBSE) - Defeating the Imposter Syndrome:...
National Society of Black Engineers (NBSE) - Defeating the Imposter Syndrome:...National Society of Black Engineers (NBSE) - Defeating the Imposter Syndrome:...
National Society of Black Engineers (NBSE) - Defeating the Imposter Syndrome:...
 
Ownership Transfer of an IT Program
Ownership Transfer of an IT ProgramOwnership Transfer of an IT Program
Ownership Transfer of an IT Program
 

Similar to Reducing Build Time - Aman King

Agile principles and practices
Agile principles and practicesAgile principles and practices
Agile principles and practicesVipin Jose
 
VodQA_ParallelizingCukes_AmanKing
VodQA_ParallelizingCukes_AmanKingVodQA_ParallelizingCukes_AmanKing
VodQA_ParallelizingCukes_AmanKingpoojaelkunchwar
 
Reducing Build Time
Reducing Build TimeReducing Build Time
Reducing Build TimeAman King
 
VodQA_Parallelizingcukes_AmanKing
VodQA_Parallelizingcukes_AmanKingVodQA_Parallelizingcukes_AmanKing
VodQA_Parallelizingcukes_AmanKingvodQA
 
SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal infoSynapseindiappsdevelopment
 
Devops - why, what and how?
Devops - why, what and how?Devops - why, what and how?
Devops - why, what and how?Malinda Kapuruge
 
Making software development processes to work for you
Making software development processes to work for youMaking software development processes to work for you
Making software development processes to work for youAmbientia
 
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
 
Waterfallacies V1 1
Waterfallacies V1 1Waterfallacies V1 1
Waterfallacies V1 1Jorge Boria
 
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
 
你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?Jen-Chieh Ko
 
The challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automationThe challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automationDBmaestro - Database DevOps
 
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
 
Automating development-operations-v1
Automating development-operations-v1Automating development-operations-v1
Automating development-operations-v1Sumanth Vepa
 
HOW TO OPTIMIZE NON-CODING TIME, ORI KEREN, LinearB
HOW TO OPTIMIZE NON-CODING TIME, ORI KEREN, LinearBHOW TO OPTIMIZE NON-CODING TIME, ORI KEREN, LinearB
HOW TO OPTIMIZE NON-CODING TIME, ORI KEREN, LinearBDevOpsDays Tel Aviv
 
The Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the PipelineThe Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the PipelineDevOps.com
 
Selenium as a trend
Selenium as a trendSelenium as a trend
Selenium as a trendQA Club Kiev
 

Similar to Reducing Build Time - Aman King (20)

Agile principles and practices
Agile principles and practicesAgile principles and practices
Agile principles and practices
 
VodQA_ParallelizingCukes_AmanKing
VodQA_ParallelizingCukes_AmanKingVodQA_ParallelizingCukes_AmanKing
VodQA_ParallelizingCukes_AmanKing
 
Reducing Build Time
Reducing Build TimeReducing Build Time
Reducing Build Time
 
VodQA_Parallelizingcukes_AmanKing
VodQA_Parallelizingcukes_AmanKingVodQA_Parallelizingcukes_AmanKing
VodQA_Parallelizingcukes_AmanKing
 
SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal info
 
Agile
AgileAgile
Agile
 
Devops - why, what and how?
Devops - why, what and how?Devops - why, what and how?
Devops - why, what and how?
 
Making software development processes to work for you
Making software development processes to work for youMaking software development processes to work for you
Making software development processes to work for you
 
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)
 
CNUG TDD June 2014
CNUG TDD June 2014CNUG TDD June 2014
CNUG TDD June 2014
 
Waterfallacies V1 1
Waterfallacies V1 1Waterfallacies V1 1
Waterfallacies V1 1
 
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
 
你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?
 
The challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automationThe challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automation
 
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
 
Automating development-operations-v1
Automating development-operations-v1Automating development-operations-v1
Automating development-operations-v1
 
GitLab - Java User Group
GitLab - Java User GroupGitLab - Java User Group
GitLab - Java User Group
 
HOW TO OPTIMIZE NON-CODING TIME, ORI KEREN, LinearB
HOW TO OPTIMIZE NON-CODING TIME, ORI KEREN, LinearBHOW TO OPTIMIZE NON-CODING TIME, ORI KEREN, LinearB
HOW TO OPTIMIZE NON-CODING TIME, ORI KEREN, LinearB
 
The Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the PipelineThe Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the Pipeline
 
Selenium as a trend
Selenium as a trendSelenium as a trend
Selenium as a trend
 

More from Thoughtworks

Design System as a Product
Design System as a ProductDesign System as a Product
Design System as a ProductThoughtworks
 
Designers, Developers & Dogs
Designers, Developers & DogsDesigners, Developers & Dogs
Designers, Developers & DogsThoughtworks
 
Cloud-first for fast innovation
Cloud-first for fast innovationCloud-first for fast innovation
Cloud-first for fast innovationThoughtworks
 
More impact with flexible teams
More impact with flexible teamsMore impact with flexible teams
More impact with flexible teamsThoughtworks
 
Culture of Innovation
Culture of InnovationCulture of Innovation
Culture of InnovationThoughtworks
 
Developer Experience
Developer ExperienceDeveloper Experience
Developer ExperienceThoughtworks
 
When we design together
When we design togetherWhen we design together
When we design togetherThoughtworks
 
Hardware is hard(er)
Hardware is hard(er)Hardware is hard(er)
Hardware is hard(er)Thoughtworks
 
Customer-centric innovation enabled by cloud
 Customer-centric innovation enabled by cloud Customer-centric innovation enabled by cloud
Customer-centric innovation enabled by cloudThoughtworks
 
Amazon's Culture of Innovation
Amazon's Culture of InnovationAmazon's Culture of Innovation
Amazon's Culture of InnovationThoughtworks
 
When in doubt, go live
When in doubt, go liveWhen in doubt, go live
When in doubt, go liveThoughtworks
 
Don't cross the Rubicon
Don't cross the RubiconDon't cross the Rubicon
Don't cross the RubiconThoughtworks
 
Your test coverage is a lie!
Your test coverage is a lie!Your test coverage is a lie!
Your test coverage is a lie!Thoughtworks
 
Docker container security
Docker container securityDocker container security
Docker container securityThoughtworks
 
Redefining the unit
Redefining the unitRedefining the unit
Redefining the unitThoughtworks
 
Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Thoughtworks
 
A Tribute to Turing
A Tribute to TuringA Tribute to Turing
A Tribute to TuringThoughtworks
 
Rsa maths worked out
Rsa maths worked outRsa maths worked out
Rsa maths worked outThoughtworks
 

More from Thoughtworks (20)

Design System as a Product
Design System as a ProductDesign System as a Product
Design System as a Product
 
Designers, Developers & Dogs
Designers, Developers & DogsDesigners, Developers & Dogs
Designers, Developers & Dogs
 
Cloud-first for fast innovation
Cloud-first for fast innovationCloud-first for fast innovation
Cloud-first for fast innovation
 
More impact with flexible teams
More impact with flexible teamsMore impact with flexible teams
More impact with flexible teams
 
Culture of Innovation
Culture of InnovationCulture of Innovation
Culture of Innovation
 
Dual-Track Agile
Dual-Track AgileDual-Track Agile
Dual-Track Agile
 
Developer Experience
Developer ExperienceDeveloper Experience
Developer Experience
 
When we design together
When we design togetherWhen we design together
When we design together
 
Hardware is hard(er)
Hardware is hard(er)Hardware is hard(er)
Hardware is hard(er)
 
Customer-centric innovation enabled by cloud
 Customer-centric innovation enabled by cloud Customer-centric innovation enabled by cloud
Customer-centric innovation enabled by cloud
 
Amazon's Culture of Innovation
Amazon's Culture of InnovationAmazon's Culture of Innovation
Amazon's Culture of Innovation
 
When in doubt, go live
When in doubt, go liveWhen in doubt, go live
When in doubt, go live
 
Don't cross the Rubicon
Don't cross the RubiconDon't cross the Rubicon
Don't cross the Rubicon
 
Error handling
Error handlingError handling
Error handling
 
Your test coverage is a lie!
Your test coverage is a lie!Your test coverage is a lie!
Your test coverage is a lie!
 
Docker container security
Docker container securityDocker container security
Docker container security
 
Redefining the unit
Redefining the unitRedefining the unit
Redefining the unit
 
Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22
 
A Tribute to Turing
A Tribute to TuringA Tribute to Turing
A Tribute to Turing
 
Rsa maths worked out
Rsa maths worked outRsa maths worked out
Rsa maths worked out
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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.pptxEarley Information Science
 
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 Processorsdebabhi2
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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 WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Reducing Build Time - Aman King

Editor's Notes

  1. * Green icon represents a stable green CI build * Orange icon represents a CI build in progress * Red icon represents a broken CI build
  2. * It is good to immediately know where you stand: whether all is good or something is broken * That’d enable you to fix something almost as soon as you break it
  3. * High functional coverage implies that almost all functionality of the system is tested and any error introduced would be caught * Short CI build time implies that quick feedback is in place and any error introduced in the covered functionality would be immediately highlighted
  4. * A website with a lot of content that comes from various sources, with a focus on creating an online community of people with similar interests
  5. * Failures not caused by programmatic errors: possible reasons could include AJAX response delays, unpredictable browser responsiveness, network slowness, etc
  6. * If a build is broken on what appears to be non-deterministic failure, someone will have to manually trigger another build in hope of the error not reoccurring * A retriggered build will take long again, further delaying feedback
  7. * One main process will fork multiple sub-processes in parallel, each running only a subset of the original collection of test scenarios * When all sub-processes complete, the union of their results will be the final result of the entire test run * If the sub-processes are run on the same machine, a powerful multicore machine is desirable *Another approach is to run the sub-processes on different machines on a grid
  8. * Chart of build times vs build numbers: the drastic drop is when parallelization was implemented * Slight variances in build times, including minor drops, also occur based on memory and CPU load at the time
  9. * Used a Ruby library called parallel_tests to fork multiple Ruby processes, each running a subset of Cucumber features * This also involved coming up with custom rake tasks, including multiple pre-steps and post-steps * Instead of using parallel_tests to parallelize on the same machine, Selenium Grid is an alternate option to leverage grid computing
  10. * Capture each forked process’s results independently* Generate consolidated HTML report as after-step when all forked processes finish
  11. * Rails’ database.yml was modified to suffix process number to the name of the database
  12. * Sunspot gem’s sunspot.yml was modified to suffix process number to the paths that Solr was to use * Monkey-patched Sunspot code to allow above parameterization in sunspot.yml
  13. * Although each sub-process starts its independent Firefox instance, Selenium uses a shared set of ephemeral ports to communicate with the browsers * Contention occurs for these ephemeral ports which get locked when in use for a particular Firefox instance * Monkey-patched Capybara’s Selenium driver code to retry communicating with Firefox if a couple of attempts fail
  14. * A particular machine can only allow so much parallelization based on its hardware specifications * Beyond a certain number of sub-processes, the non-deterministic failures will increase * After a few tries, we stabilized on having 6 concurrent sub-processes on the machine we were using
  15. * Cucumber provides a rerun mode which retries all failed tests one more time before deciding the final status of the test suite run * Customized a rake task to invoke Cucumber’s rerun sequentially, after the parallel results come in
  16. * We stubbed some external calls to return known values to cut down on communication delays * Used a Ruby library called WebMock * Examples: authentication servers, email servers, Facebook, Twitter, etc
  17. * It helps to reduce the number of independent tests without reducing the functionality coverage * Example: if during sign up, email and zipcode are mandatory, they don’t need independent tests; there can be one test that begins by leaving email and zipcode empty, verifies that error messages are displayed for email and zipcode, and then adds email and zipcode, and proceeds with valid sign up scenarios * The above reduces browser clearing steps, visiting a certain page repeatedly without it contributing to the test steps, and so on
  18. * There are multiple benefits of having quick feedback; implementing parallelization is one approach to achieve that * A complementary approach is to introspect and work on improving performance and responsiveness of the app itself, reducing build time by reducing waiting time * Being aware of build times and improving the same continuously is a good habit; even with parallelization in place, as more functionality gets added, build times will creep up