SlideShare a Scribd company logo
1 of 64
Download to read offline
Automated Test Hell
Wojciech Seliga
wojciech.seliga@spartez.com
@wseliga
Our Journey
About me
• Coding for 30 years, now only in "free time"
• Agile Practices (inc.TDD) since 2003
• Dev Nerd,Tech Leader,Agile Coach,
Speaker, PHB
• 6 years with Atlassian (JIRA Dev Manager)
• Spartez Co-founder & CEO
XP Promise
CostofChange
Time
Waterfall
XP
1.5 year ago
Almost 10 years
of accumulating
garbage automatic tests
About 20 000 tests
on all levels of abstraction
Very slow (even hours)
and fragile feedback loop
Serious performance and
reliability issues
Dispirited devs
accepting RED as a norm
Feedback
Speed
`
Test
Quality
Test Code is Not
Trash
Design
Maintain
Refactor
Share
Review
Prune
Respect
Discuss
Restructure
Test Pyramid
Unit Tests (including QUnit)
REST / HTML Tests
Selenium
Optimum Balance
Isolation Speed Coverage Level Access Effort
Dangerous to temper with
MaintainabilityQuality / Determinism
Now
People - Motivation
Making GREEN the norm
Shades of Red
Shades of Green
Pragmatic CI Health
Build Tiers and Policy
Tier A1 - green soon after all commits
Tier A2 - green at the end of the day
Tier A3 - green at the end of the iteration
unit tests and functional* tests
WebDriver and bundled plugins tests
supported platforms tests, compatibility tests
Wallboards:
Constant
Awareness
Extensive Training
• assertThat over assertTrue/False and
assertEquals
• avoiding races - Atlassian Selenium with its
TimedElement
• Favouring unit tests over functional tests
• Promoting Page Objects
• Brownbags, blogs, code reviews
Quality
Automatic Flakiness Detection
Quarantine
Re-run failed tests and see if they pass
Quarantine - Healing
SlowMo - expose races
Selenium 1
Selenium ditching
Sky did not fall in
Ditching - benefits
• Freed build agents - better system throughput
• Boosted morale
• Gazillion of developer hours saved
• Money saved on infrastructure
Ditching - due diligence
• conducting the audit - analysis of the
coverage we lost
• determining which tests needs to rewritten
(e.g. security related)
• rewriting some of the tests (good job for
new hires + a senior mentor)
Flaky Browser-based Tests
Races between test code and asynchronous page logic
Playing with "loading" CSS class does not really help
Races Removal with Tracing
// in the browser:
function mySearchClickHandler() {
    doSomeXhr().always(function() {
        // This executes when the XHR has completed (either success or failure)
        JIRA.trace("search.completed");
    });
}
// In production code JIRA.trace is a no-op
// in my page object:
@Inject
TraceContext traceContext;
 
public SearchResults doASearch() {
    Tracer snapshot = traceContext.checkpoint();
    getSearchButton().click(); // causes mySearchClickHandler to be invoked
    // This waits until the "search.completed"
// event has been emitted, *after* previous snapshot    
    traceContext.waitFor(snapshot, "search.completed");
    return pageBinder.bind(SearchResults.class);
}
Can we halve our build times?
Speed
Parallel Execution - Theory
End of Build
Batches
Start of Build Time
Parallel Execution
End of Build
Batches
Start of Build Time
Parallel Execution -
Reality Bites
End of Build
Batches
Start of Build
Agent
availability
Time
Dynamic Test Execution
Dispatch - Hallelujah
"You can't manage what
you can't measure."
not by W. Edwards Deming
If you believe just in it
you are doomed.
You can't improve something
if you can't measure it
Profiler, Build statistics, Logs, statsd → Graphite
Anatomy of Build*
Compilation
Packaging
Executing Tests
Fetching Dependencies
*Any resemblance to maven build is entirely accidental
SCM Update
Agent Availability/Setup
Publishing Results
JIRA Unit Tests Build
Compilation (7min)
Packaging (0min)
Executing Tests (7min)
Fetching Dependencies (1.5min)
SCM Update (2min)
Agent Availability/Setup (mean 10min)
Publishing Results (1min)
Decreasing
Test Execution Time
to ZERRO
alone would not let us
achieve our goal!
Agent Availability/Setup
• starved builds due to
busy agents building
very long builds
• time synchronization
issue - NTPD problem
Fixes applied
• Proximity of SCM repo
• shallow git clones are not so fast and lightweight +
generating extra git server CPU load
• git clone per agent/plan + git pull + git clone per build
(hard links!)
• Atlassian Stash was thankful (queue)
SCM Update - Checkout time
2 min → 5 seconds
Trade disk space
for speed
• Fix Predator
• Sandboxing/isolation agent trade-off:
rm -rf $HOME/.m2/repository/com/atlassian/*
into
find $HOME/.m2/repository/com/atlassian/
-name “*SNAPSHOT*” | xargs rm
• Network hardware failure found
(dropping packets)
Fetching Dependencies
1.5 min → 10 seconds
Compilation
• Restructuring multi-pom maven project
and dependencies
• Maven 3 parallel compilation FTW
-T 1.5C
*optimal factor thanks to scientific trial and error research
7 min → 1 min
Unit Test Execution
• Splitting unit tests into 2 buckets: good and
legacy (much longer)
• Maven 3 parallel test execution (-T 1.5C)
7 min → 5 min
3000 poor tests
(5min)
11000 good tests
(1.5min)
Functional Tests
• Selenium 1 removal did help
• Faster reset/restore (avoid unnecessary
stuff, intercepting SQL operations for debug
purposes - building stacktraces is costly)
• Restoring via Backdoor REST API
• Using REST API for common setup/
teardown operations
Functional Tests
We like this trend
Publishing Results
• Server log allocation per test → using now
Backdoor REST API (was Selenium)
• Bamboo DB performance degradation for
rich build history - to be addressed
1 min → 40 s
Unexpected Problem
• Stability issues with our CI server
• The bottleneck changed from I/O to CPU
• Too many agents per physical machine
JIRA Unit Tests Build Improved
Compilation (1min)
Packaging (0min)
Executing Tests (5min)
Fetching Dependencies (10sec)
SCM Update (5sec)
Agent Availability/Setup (3min)*
Publishing Results (40sec)
Improvements Summary
Tests Before After Improvement %
Unit tests 29 min 17 min 41%
Functional tests 56 min 34 min 39%
WebDriver tests 39 min 21 min 46%
Overall 124 min 72 min 42%
* Additional ca. 5% improvement expected once new git clone
strategy is consistently rolled-out everywhere
The Quality Follows
But that's still bad
We want CI feedback loop in a few minutes maximum
Splitting The Codebase
Codebase Split - Problems
• Organizational concerns - understanding,
managing, integrating, releasing
• Mindset change - if something worked for
10 years why to change it?
• We damned ourselves with big buckets for
all tests - where do they belong to?
Splitting code base
• Step 0 - JIRA Importers Plugin (3.5 years ago)
• Step 1- New IssueView and Navigator
JIRA 6.0
We are still escaping hell.
Hell sucks in your soul.
Conclusions
• Visibility and problem awareness help
• Maintaing huge testbed is difficult and costly
• Measure the problem, measure improvements
• No prejudice - no sacred cows
• Automated tests are not one-off investment,
it's a continuous journey
• Performance is a damn important feature
Revised XP Promise
CostofChange
Time
Waterfall
XP
Sad Reality
Interested in such stuff?
Talk to me at the conference or visit http://www.spartez.com/careers
We are hiring in Gdańsk
• Turtle - by Jonathan Zander, CC-BY-SA-3.0
• Loading - by MatthewJ13, CC-SA-3.0
• Magic Potion - by Koolmann1, CC-BY-SA-2.0
• Merlin Tool - by By L. Mahin, CC-BY-SA-3.0
• Choose Pills - by *rockysprings, CC-BY-SA-3.0
• Flashing Red Light - bt Chris Phan, CC BY 2.0
Images - Credits
ThankYou!
Tweet your feedback at @wseliga

More Related Content

What's hot

Continuous Delivery: The Dirty Details
Continuous Delivery: The Dirty DetailsContinuous Delivery: The Dirty Details
Continuous Delivery: The Dirty DetailsMike Brittain
 
10 Reasons Your Software Sucks 2014 - Tax Day Edition!
10 Reasons Your Software Sucks 2014 - Tax Day Edition!10 Reasons Your Software Sucks 2014 - Tax Day Edition!
10 Reasons Your Software Sucks 2014 - Tax Day Edition!Caleb Jenkins
 
Agile Infrastructure Velocity 09
Agile Infrastructure Velocity 09Agile Infrastructure Velocity 09
Agile Infrastructure Velocity 09Andrew Shafer
 
Web Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas VersionWeb Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas VersionDave Olsen
 
Dev and Ops Collaboration and Awareness at Etsy and Flickr
Dev and Ops Collaboration and Awareness at Etsy and FlickrDev and Ops Collaboration and Awareness at Etsy and Flickr
Dev and Ops Collaboration and Awareness at Etsy and FlickrJohn Allspaw
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jestpksjce
 
Automation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and BeyondAutomation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and BeyondAlan Richardson
 
Resilience Engineering: A field of study, a community, and some perspective s...
Resilience Engineering: A field of study, a community, and some perspective s...Resilience Engineering: A field of study, a community, and some perspective s...
Resilience Engineering: A field of study, a community, and some perspective s...John Allspaw
 
Web Test Automation Framework - IndicThreads Conference
Web Test Automation Framework  - IndicThreads ConferenceWeb Test Automation Framework  - IndicThreads Conference
Web Test Automation Framework - IndicThreads ConferenceIndicThreads
 
Selenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web ApplicationsSelenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web Applicationsqooxdoo
 
Continuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIContinuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIwajrcs
 
Getting By Without "QA"
Getting By Without "QA"Getting By Without "QA"
Getting By Without "QA"Dave King
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternSargis Sargsyan
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
 
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Steven Smith
 
A. De Biase/C. Quatrini/M. Barsocchi - API Release Process: how to make peopl...
A. De Biase/C. Quatrini/M. Barsocchi - API Release Process: how to make peopl...A. De Biase/C. Quatrini/M. Barsocchi - API Release Process: how to make peopl...
A. De Biase/C. Quatrini/M. Barsocchi - API Release Process: how to make peopl...Codemotion
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)Dave Haeffner
 
Current Testing Challenges Ireland
Current Testing Challenges IrelandCurrent Testing Challenges Ireland
Current Testing Challenges IrelandDavid O'Dowd
 
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Automate testing with behat, selenium, phantom js and nightwatch.js (5)Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Automate testing with behat, selenium, phantom js and nightwatch.js (5)Faichi Solutions
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application TestingYnon Perek
 

What's hot (20)

Continuous Delivery: The Dirty Details
Continuous Delivery: The Dirty DetailsContinuous Delivery: The Dirty Details
Continuous Delivery: The Dirty Details
 
10 Reasons Your Software Sucks 2014 - Tax Day Edition!
10 Reasons Your Software Sucks 2014 - Tax Day Edition!10 Reasons Your Software Sucks 2014 - Tax Day Edition!
10 Reasons Your Software Sucks 2014 - Tax Day Edition!
 
Agile Infrastructure Velocity 09
Agile Infrastructure Velocity 09Agile Infrastructure Velocity 09
Agile Infrastructure Velocity 09
 
Web Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas VersionWeb Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas Version
 
Dev and Ops Collaboration and Awareness at Etsy and Flickr
Dev and Ops Collaboration and Awareness at Etsy and FlickrDev and Ops Collaboration and Awareness at Etsy and Flickr
Dev and Ops Collaboration and Awareness at Etsy and Flickr
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jest
 
Automation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and BeyondAutomation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and Beyond
 
Resilience Engineering: A field of study, a community, and some perspective s...
Resilience Engineering: A field of study, a community, and some perspective s...Resilience Engineering: A field of study, a community, and some perspective s...
Resilience Engineering: A field of study, a community, and some perspective s...
 
Web Test Automation Framework - IndicThreads Conference
Web Test Automation Framework  - IndicThreads ConferenceWeb Test Automation Framework  - IndicThreads Conference
Web Test Automation Framework - IndicThreads Conference
 
Selenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web ApplicationsSelenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web Applications
 
Continuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIContinuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CI
 
Getting By Without "QA"
Getting By Without "QA"Getting By Without "QA"
Getting By Without "QA"
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
 
A. De Biase/C. Quatrini/M. Barsocchi - API Release Process: how to make peopl...
A. De Biase/C. Quatrini/M. Barsocchi - API Release Process: how to make peopl...A. De Biase/C. Quatrini/M. Barsocchi - API Release Process: how to make peopl...
A. De Biase/C. Quatrini/M. Barsocchi - API Release Process: how to make peopl...
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
Current Testing Challenges Ireland
Current Testing Challenges IrelandCurrent Testing Challenges Ireland
Current Testing Challenges Ireland
 
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Automate testing with behat, selenium, phantom js and nightwatch.js (5)Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application Testing
 

Similar to Escaping Test Hell - Our Journey - XPDays Ukraine 2013

Heavenly hell – automated tests at scale wojciech seliga
Heavenly hell – automated tests at scale   wojciech seligaHeavenly hell – automated tests at scale   wojciech seliga
Heavenly hell – automated tests at scale wojciech seligaAtlassian
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Wojciech Seliga
 
Escaping Automated Test Hell - One Year Later
Escaping Automated Test Hell - One Year LaterEscaping Automated Test Hell - One Year Later
Escaping Automated Test Hell - One Year LaterWojciech Seliga
 
Performance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle CoherencePerformance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle Coherencearagozin
 
What is this agile thing anyway
What is this agile thing anywayWhat is this agile thing anyway
What is this agile thing anywayLisa Van Gelder
 
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.comAdvanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.comDevOpsDays Tel Aviv
 
Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Ford Prior
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the TrenchesYan Cui
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to realityDaniel Gallego Vico
 
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!Andreas Grabner
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comAviran Mordo
 
Continuous Testing 2016
Continuous Testing 2016Continuous Testing 2016
Continuous Testing 2016Karim Fanadka
 
Test Driven Development & CI/CD
Test Driven Development & CI/CDTest Driven Development & CI/CD
Test Driven Development & CI/CDShanmuga S Muthu
 
Cloudstack Continuous Delivery
Cloudstack Continuous DeliveryCloudstack Continuous Delivery
Cloudstack Continuous Deliverybuildacloud
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfullyTEST Huddle
 
Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonIneke Scheffers
 
Системный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестовСистемный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестовCOMAQA.BY
 

Similar to Escaping Test Hell - Our Journey - XPDays Ukraine 2013 (20)

Heavenly hell – automated tests at scale wojciech seliga
Heavenly hell – automated tests at scale   wojciech seligaHeavenly hell – automated tests at scale   wojciech seliga
Heavenly hell – automated tests at scale wojciech seliga
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014
 
Escaping Automated Test Hell - One Year Later
Escaping Automated Test Hell - One Year LaterEscaping Automated Test Hell - One Year Later
Escaping Automated Test Hell - One Year Later
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
 
Performance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle CoherencePerformance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle Coherence
 
What is this agile thing anyway
What is this agile thing anywayWhat is this agile thing anyway
What is this agile thing anyway
 
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.comAdvanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
 
Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)
 
33rd degree
33rd degree33rd degree
33rd degree
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the Trenches
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
 
Continuous Testing 2016
Continuous Testing 2016Continuous Testing 2016
Continuous Testing 2016
 
Test Driven Development & CI/CD
Test Driven Development & CI/CDTest Driven Development & CI/CD
Test Driven Development & CI/CD
 
Cloudstack Continuous Delivery
Cloudstack Continuous DeliveryCloudstack Continuous Delivery
Cloudstack Continuous Delivery
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 
Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomon
 
Системный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестовСистемный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестов
 

More from Wojciech Seliga

Sprzedawanie własnego biznesu IT - Confitura 2023.pdf
Sprzedawanie własnego biznesu IT - Confitura 2023.pdfSprzedawanie własnego biznesu IT - Confitura 2023.pdf
Sprzedawanie własnego biznesu IT - Confitura 2023.pdfWojciech Seliga
 
Jak być zarąbistym developerem w oczach szefa i ... klienta
Jak być zarąbistym developerem w oczach szefa i ... klientaJak być zarąbistym developerem w oczach szefa i ... klienta
Jak być zarąbistym developerem w oczach szefa i ... klientaWojciech Seliga
 
How to impress your boss and your customer in a modern software development c...
How to impress your boss and your customer in a modern software development c...How to impress your boss and your customer in a modern software development c...
How to impress your boss and your customer in a modern software development c...Wojciech Seliga
 
Developer plantations - colonialism of XXI century (GeeCON 2017)
Developer plantations - colonialism of XXI century (GeeCON 2017)Developer plantations - colonialism of XXI century (GeeCON 2017)
Developer plantations - colonialism of XXI century (GeeCON 2017)Wojciech Seliga
 
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...Wojciech Seliga
 
Ten lessons I painfully learnt while moving from software developer
to entrep...
Ten lessons I painfully learnt while moving from software developer
to entrep...Ten lessons I painfully learnt while moving from software developer
to entrep...
Ten lessons I painfully learnt while moving from software developer
to entrep...Wojciech Seliga
 
Ten lessons I painfully learnt while moving from software developer to entrep...
Ten lessons I painfully learnt while moving from software developer to entrep...Ten lessons I painfully learnt while moving from software developer to entrep...
Ten lessons I painfully learnt while moving from software developer to entrep...Wojciech Seliga
 
10 bezcennych lekcji dla software developera stającego się szefem firmy
10 bezcennych lekcji dla software developera stającego się szefem firmy10 bezcennych lekcji dla software developera stającego się szefem firmy
10 bezcennych lekcji dla software developera stającego się szefem firmyWojciech Seliga
 
5-10-15 years of Java developer career - Warszawa JUG 2015
5-10-15 years of Java developer career - Warszawa JUG 20155-10-15 years of Java developer career - Warszawa JUG 2015
5-10-15 years of Java developer career - Warszawa JUG 2015Wojciech Seliga
 
Devoxx Poland 2015: 5-10-15 years with Java
Devoxx Poland 2015: 5-10-15 years with Java Devoxx Poland 2015: 5-10-15 years with Java
Devoxx Poland 2015: 5-10-15 years with Java Wojciech Seliga
 
Spartez Open Day March 13th 2015
Spartez Open Day March 13th 2015Spartez Open Day March 13th 2015
Spartez Open Day March 13th 2015Wojciech Seliga
 
Software Development Innovation in Practice - 33rd Degree 2014
Software Development Innovation in Practice - 33rd Degree 2014Software Development Innovation in Practice - 33rd Degree 2014
Software Development Innovation in Practice - 33rd Degree 2014Wojciech Seliga
 
Innowacja w praktyce - Infoshare 2014
Innowacja w praktyce - Infoshare 2014Innowacja w praktyce - Infoshare 2014
Innowacja w praktyce - Infoshare 2014Wojciech Seliga
 
Confitura 2013 Software Developer Career Unplugged
Confitura 2013 Software Developer Career UnpluggedConfitura 2013 Software Developer Career Unplugged
Confitura 2013 Software Developer Career UnpluggedWojciech Seliga
 
Software Developer Career Unplugged - GeeCon 2013
Software Developer Career Unplugged - GeeCon 2013Software Developer Career Unplugged - GeeCon 2013
Software Developer Career Unplugged - GeeCon 2013Wojciech Seliga
 
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKitAtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKitWojciech Seliga
 
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)Wojciech Seliga
 
InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]
InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]
InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]Wojciech Seliga
 
Better Front-end Development in Atlassian Plugins
Better Front-end Development in Atlassian PluginsBetter Front-end Development in Atlassian Plugins
Better Front-end Development in Atlassian PluginsWojciech Seliga
 
Bringing Effectiveness and Sanity to Highly Distributed Agile Teams
Bringing Effectiveness and Sanity  to Highly Distributed Agile TeamsBringing Effectiveness and Sanity  to Highly Distributed Agile Teams
Bringing Effectiveness and Sanity to Highly Distributed Agile TeamsWojciech Seliga
 

More from Wojciech Seliga (20)

Sprzedawanie własnego biznesu IT - Confitura 2023.pdf
Sprzedawanie własnego biznesu IT - Confitura 2023.pdfSprzedawanie własnego biznesu IT - Confitura 2023.pdf
Sprzedawanie własnego biznesu IT - Confitura 2023.pdf
 
Jak być zarąbistym developerem w oczach szefa i ... klienta
Jak być zarąbistym developerem w oczach szefa i ... klientaJak być zarąbistym developerem w oczach szefa i ... klienta
Jak być zarąbistym developerem w oczach szefa i ... klienta
 
How to impress your boss and your customer in a modern software development c...
How to impress your boss and your customer in a modern software development c...How to impress your boss and your customer in a modern software development c...
How to impress your boss and your customer in a modern software development c...
 
Developer plantations - colonialism of XXI century (GeeCON 2017)
Developer plantations - colonialism of XXI century (GeeCON 2017)Developer plantations - colonialism of XXI century (GeeCON 2017)
Developer plantations - colonialism of XXI century (GeeCON 2017)
 
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...
 
Ten lessons I painfully learnt while moving from software developer
to entrep...
Ten lessons I painfully learnt while moving from software developer
to entrep...Ten lessons I painfully learnt while moving from software developer
to entrep...
Ten lessons I painfully learnt while moving from software developer
to entrep...
 
Ten lessons I painfully learnt while moving from software developer to entrep...
Ten lessons I painfully learnt while moving from software developer to entrep...Ten lessons I painfully learnt while moving from software developer to entrep...
Ten lessons I painfully learnt while moving from software developer to entrep...
 
10 bezcennych lekcji dla software developera stającego się szefem firmy
10 bezcennych lekcji dla software developera stającego się szefem firmy10 bezcennych lekcji dla software developera stającego się szefem firmy
10 bezcennych lekcji dla software developera stającego się szefem firmy
 
5-10-15 years of Java developer career - Warszawa JUG 2015
5-10-15 years of Java developer career - Warszawa JUG 20155-10-15 years of Java developer career - Warszawa JUG 2015
5-10-15 years of Java developer career - Warszawa JUG 2015
 
Devoxx Poland 2015: 5-10-15 years with Java
Devoxx Poland 2015: 5-10-15 years with Java Devoxx Poland 2015: 5-10-15 years with Java
Devoxx Poland 2015: 5-10-15 years with Java
 
Spartez Open Day March 13th 2015
Spartez Open Day March 13th 2015Spartez Open Day March 13th 2015
Spartez Open Day March 13th 2015
 
Software Development Innovation in Practice - 33rd Degree 2014
Software Development Innovation in Practice - 33rd Degree 2014Software Development Innovation in Practice - 33rd Degree 2014
Software Development Innovation in Practice - 33rd Degree 2014
 
Innowacja w praktyce - Infoshare 2014
Innowacja w praktyce - Infoshare 2014Innowacja w praktyce - Infoshare 2014
Innowacja w praktyce - Infoshare 2014
 
Confitura 2013 Software Developer Career Unplugged
Confitura 2013 Software Developer Career UnpluggedConfitura 2013 Software Developer Career Unplugged
Confitura 2013 Software Developer Career Unplugged
 
Software Developer Career Unplugged - GeeCon 2013
Software Developer Career Unplugged - GeeCon 2013Software Developer Career Unplugged - GeeCon 2013
Software Developer Career Unplugged - GeeCon 2013
 
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKitAtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
 
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)
 
InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]
InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]
InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]
 
Better Front-end Development in Atlassian Plugins
Better Front-end Development in Atlassian PluginsBetter Front-end Development in Atlassian Plugins
Better Front-end Development in Atlassian Plugins
 
Bringing Effectiveness and Sanity to Highly Distributed Agile Teams
Bringing Effectiveness and Sanity  to Highly Distributed Agile TeamsBringing Effectiveness and Sanity  to Highly Distributed Agile Teams
Bringing Effectiveness and Sanity to Highly Distributed Agile Teams
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
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 MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
[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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure 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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
[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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

Escaping Test Hell - Our Journey - XPDays Ukraine 2013

  • 1. Automated Test Hell Wojciech Seliga wojciech.seliga@spartez.com @wseliga Our Journey
  • 2. About me • Coding for 30 years, now only in "free time" • Agile Practices (inc.TDD) since 2003 • Dev Nerd,Tech Leader,Agile Coach, Speaker, PHB • 6 years with Atlassian (JIRA Dev Manager) • Spartez Co-founder & CEO
  • 5. Almost 10 years of accumulating garbage automatic tests
  • 6. About 20 000 tests on all levels of abstraction
  • 7. Very slow (even hours) and fragile feedback loop
  • 11. Test Code is Not Trash Design Maintain Refactor Share Review Prune Respect Discuss Restructure
  • 12. Test Pyramid Unit Tests (including QUnit) REST / HTML Tests Selenium
  • 13. Optimum Balance Isolation Speed Coverage Level Access Effort
  • 14. Dangerous to temper with MaintainabilityQuality / Determinism
  • 15. Now
  • 16. People - Motivation Making GREEN the norm
  • 19. Build Tiers and Policy Tier A1 - green soon after all commits Tier A2 - green at the end of the day Tier A3 - green at the end of the iteration unit tests and functional* tests WebDriver and bundled plugins tests supported platforms tests, compatibility tests
  • 21. Extensive Training • assertThat over assertTrue/False and assertEquals • avoiding races - Atlassian Selenium with its TimedElement • Favouring unit tests over functional tests • Promoting Page Objects • Brownbags, blogs, code reviews
  • 23. Automatic Flakiness Detection Quarantine Re-run failed tests and see if they pass
  • 28. Ditching - benefits • Freed build agents - better system throughput • Boosted morale • Gazillion of developer hours saved • Money saved on infrastructure
  • 29. Ditching - due diligence • conducting the audit - analysis of the coverage we lost • determining which tests needs to rewritten (e.g. security related) • rewriting some of the tests (good job for new hires + a senior mentor)
  • 30. Flaky Browser-based Tests Races between test code and asynchronous page logic Playing with "loading" CSS class does not really help
  • 31. Races Removal with Tracing // in the browser: function mySearchClickHandler() {     doSomeXhr().always(function() {         // This executes when the XHR has completed (either success or failure)         JIRA.trace("search.completed");     }); } // In production code JIRA.trace is a no-op // in my page object: @Inject TraceContext traceContext;   public SearchResults doASearch() {     Tracer snapshot = traceContext.checkpoint();     getSearchButton().click(); // causes mySearchClickHandler to be invoked     // This waits until the "search.completed" // event has been emitted, *after* previous snapshot         traceContext.waitFor(snapshot, "search.completed");     return pageBinder.bind(SearchResults.class); }
  • 32. Can we halve our build times? Speed
  • 33. Parallel Execution - Theory End of Build Batches Start of Build Time
  • 34. Parallel Execution End of Build Batches Start of Build Time
  • 35. Parallel Execution - Reality Bites End of Build Batches Start of Build Agent availability Time
  • 37. "You can't manage what you can't measure." not by W. Edwards Deming If you believe just in it you are doomed.
  • 38. You can't improve something if you can't measure it Profiler, Build statistics, Logs, statsd → Graphite
  • 39. Anatomy of Build* Compilation Packaging Executing Tests Fetching Dependencies *Any resemblance to maven build is entirely accidental SCM Update Agent Availability/Setup Publishing Results
  • 40. JIRA Unit Tests Build Compilation (7min) Packaging (0min) Executing Tests (7min) Fetching Dependencies (1.5min) SCM Update (2min) Agent Availability/Setup (mean 10min) Publishing Results (1min)
  • 41. Decreasing Test Execution Time to ZERRO alone would not let us achieve our goal!
  • 42. Agent Availability/Setup • starved builds due to busy agents building very long builds • time synchronization issue - NTPD problem Fixes applied
  • 43. • Proximity of SCM repo • shallow git clones are not so fast and lightweight + generating extra git server CPU load • git clone per agent/plan + git pull + git clone per build (hard links!) • Atlassian Stash was thankful (queue) SCM Update - Checkout time 2 min → 5 seconds Trade disk space for speed
  • 44.
  • 45. • Fix Predator • Sandboxing/isolation agent trade-off: rm -rf $HOME/.m2/repository/com/atlassian/* into find $HOME/.m2/repository/com/atlassian/ -name “*SNAPSHOT*” | xargs rm • Network hardware failure found (dropping packets) Fetching Dependencies 1.5 min → 10 seconds
  • 46. Compilation • Restructuring multi-pom maven project and dependencies • Maven 3 parallel compilation FTW -T 1.5C *optimal factor thanks to scientific trial and error research 7 min → 1 min
  • 47. Unit Test Execution • Splitting unit tests into 2 buckets: good and legacy (much longer) • Maven 3 parallel test execution (-T 1.5C) 7 min → 5 min 3000 poor tests (5min) 11000 good tests (1.5min)
  • 48. Functional Tests • Selenium 1 removal did help • Faster reset/restore (avoid unnecessary stuff, intercepting SQL operations for debug purposes - building stacktraces is costly) • Restoring via Backdoor REST API • Using REST API for common setup/ teardown operations
  • 50. Publishing Results • Server log allocation per test → using now Backdoor REST API (was Selenium) • Bamboo DB performance degradation for rich build history - to be addressed 1 min → 40 s
  • 51. Unexpected Problem • Stability issues with our CI server • The bottleneck changed from I/O to CPU • Too many agents per physical machine
  • 52. JIRA Unit Tests Build Improved Compilation (1min) Packaging (0min) Executing Tests (5min) Fetching Dependencies (10sec) SCM Update (5sec) Agent Availability/Setup (3min)* Publishing Results (40sec)
  • 53. Improvements Summary Tests Before After Improvement % Unit tests 29 min 17 min 41% Functional tests 56 min 34 min 39% WebDriver tests 39 min 21 min 46% Overall 124 min 72 min 42% * Additional ca. 5% improvement expected once new git clone strategy is consistently rolled-out everywhere
  • 55. But that's still bad We want CI feedback loop in a few minutes maximum
  • 57. Codebase Split - Problems • Organizational concerns - understanding, managing, integrating, releasing • Mindset change - if something worked for 10 years why to change it? • We damned ourselves with big buckets for all tests - where do they belong to?
  • 58. Splitting code base • Step 0 - JIRA Importers Plugin (3.5 years ago) • Step 1- New IssueView and Navigator JIRA 6.0
  • 59. We are still escaping hell. Hell sucks in your soul.
  • 60. Conclusions • Visibility and problem awareness help • Maintaing huge testbed is difficult and costly • Measure the problem, measure improvements • No prejudice - no sacred cows • Automated tests are not one-off investment, it's a continuous journey • Performance is a damn important feature
  • 62. Interested in such stuff? Talk to me at the conference or visit http://www.spartez.com/careers We are hiring in Gdańsk
  • 63. • Turtle - by Jonathan Zander, CC-BY-SA-3.0 • Loading - by MatthewJ13, CC-SA-3.0 • Magic Potion - by Koolmann1, CC-BY-SA-2.0 • Merlin Tool - by By L. Mahin, CC-BY-SA-3.0 • Choose Pills - by *rockysprings, CC-BY-SA-3.0 • Flashing Red Light - bt Chris Phan, CC BY 2.0 Images - Credits