SlideShare uma empresa Scribd logo
1 de 52
Baixar para ler offline
#jenkinsconf
Footer
How to Optimize Automated Testing with Everyone's
Favorite Butler
Viktor Clerc, Product Manager & Jenkins Fan, XebiaLabs
#jenkinsconf
Agenda
•  The World of Testing is Changing
•  Testing = Automation
•  Test Automation and CD: Execution and Analysis
•  Focus on the Basics
•  Best Practices for Test Execution using Jenkins
•  Supporting Test Analysis
2
#jenkinsconf
Footer
But first…a bit about me
•  Product Manager XL TestView for XebiaLabs
•  Traversed through all phases of the software
development lifecycle
•  Supported major organization in setting up a
test strategy and test automation strategy
•  Is eager to flip the way (most) organizations do
testing
3
#jenkinsconf
Footer
…and about XebiaLabs
•  We build tools to solve problems around
DevOps and Continuous Delivery at scale
4
#jenkinsconf
The World of Testing is
Changing
5
#jenkinsconf
Introducing Test Automation For Real
SPECIFY DESIGN BUILD TEST INTEGRATE REGRESSION
USER
ACCEPTANCE
RELEASE
Acceptance 

Driven Testing
Development = Test
Test = Development
Automate ALL
User Acceptance
Test
effort
INTEGRATE REGRESSION
USER
ACCEPTANCE
#jenkinsconf
Testing = Automation
7
#jenkinsconf
Testing = Automation: Implications
•  Developers are becoming testers
–  Maintain test code as source code
•  Need to set up on-demand pipelines and
environments
•  Infrastructure as code
–  X-browser tests, Selenium grids, dedicated
performance environments, mobile etc.
•  Hosted services
#jenkinsconf
Testing = Automation: Challenges
•  Many test tools for each of the test levels, but no
single place to answer “Good enough to go live?”
•  Requirements coverageis not available
–  “Did we test enough?”
–  Minimize the mean time to repair
–  Support for failure analysis
JUnit, FitNesse, JMeter, YSlow,
Vanity Check, WireShark, SOAP-
UI, Jasmine, Karma, Speedtrace,
Selenium, WebScarab, TTA,
DynaTrace, HP Diagnostics, ALM
stack AppDynamics, Code Tester
for Oracle, Arachnid, Fortify,
Sonar, …
#jenkinsconf
Testing = Automation: Challenges
•  Thousands of tests makes test sets hard to manage:
–  “Where is my subset?”
–  “What tests add most value, what tests are superfluous?”
–  “When to run what tests?”
•  Running all tests all the time takes too long, feedback is
too late
•  Quality control of the tests themselves and maintenance
of testware
#jenkinsconf
Testing = Automation: Challenges
•  Tooling overstretch
#jenkinsconf
Testing = Automation: Challenges
•  Tooling overstretch
•  Poor butler!
#jenkinsconf
Test Automation and CD:
Execution and Analysis
13
#jenkinsconf
The Two Faces of CD
•  A lot of focus right now is on pipeline execution
•  …but there’s no point delivering at light speed if
everything starts breaking
•  Testing (= quality/risk) needs to be a first-class citizen
of your CD initiative!
#jenkinsconf
The Two Faces of CD
•  CD = Execution + Analysis
#jenkinsconf
The Two Faces of CD
•  CD = Execution + Analysis
•  = Speed + Quality
#jenkinsconf
The Two Faces of CD
•  CD = Execution + Analysis
•  = Speed + Quality
•  = Pipeline orchestration + ..?
#jenkinsconf
Focus on the Basics
18
#jenkinsconf
Quick Review
19
1.  Cohn’s pyramid
–  Unit tests
–  Service tests (under the GUI)
–  (graphical) User Interface tests
2.  And even further downstream
–  Integration Tests
–  Performance Tests
#jenkinsconf
“Modern Testing” 101
1.  Testers are developers
20
#jenkinsconf
“Modern Testing” 101
1.  Testers are developers
2.  Test code equals production code
–  Conway’s Law
–  Measure quality
21
#jenkinsconf
“Modern Testing” 101
1.  Testers are developers
2.  Test code equals production code
–  Conway’s Law
–  Measure quality
3.  Linking tests to use cases
22
#jenkinsconf
“Modern Testing” 101
1.  Testers are developers
2.  Test code equals production code
–  Conway’s Law
–  Measure quality
3.  Linking tests to use cases
4.  Slice and dice
–  Labeling
23
#jenkinsconf
“Modern Testing” 101
1.  Testers are developers
2.  Test code equals production code
–  Conway’s Law
–  Measure quality
3.  Linking tests to use cases
4.  Slice and dice
–  Labeling
5.  Radical parallelization24
Fail FASTer!
“Kill the nightlies”
#jenkinsconf
Dealing With Growing Tests
•  Conway’s Law for test code
–  Let the test code mimic the production code
–  Organize tests under the project/system under test
•  Suite.App.UseCase.TestCase
•  Cut the suite at UseCase: now you have
independent chunks which you can run massively in
parallel
25
#jenkinsconf
Dealing With Growing Tests
•  Tests should not depend on other tests
–  Setup and tear down of test data done within each test
–  Share test components (as you would do with ‘real’
production code)
–  Trade-off between:
•  No code duplication yet somewhat more complex fixtures
•  Easy-to-grab simple fixtures but a lot of them (and
duplication)
26
#jenkinsconf
Keep It Manageable
•  Focus on functional coverage, not technical coverage
•  Say 40 user stories, 400 tests
–  Do I have relatively more tests for the more important user
stories?
–  How do I link tests to user stories/features/fixes?
•  Metrics
–  Number of tests
–  Number of tests that have not passed in <time>
–  Flaky tests
–  Duration
27
#jenkinsconf
Slice and Dice
•  Use appropriate labels in your test code
–  Responsible team
–  Topic
–  Functional area
–  Flaky
–  Known issue
–  etc.
28
#jenkinsconf
Best Practices for Test
Execution in Jenkins
29
#jenkinsconf
Jenkins Testing Basics
30
•  Tilt the pyramid …
•  … and use this as the guiding principle to set up your
Jenkins test jobs “left to right”
#jenkinsconf
Organizing Test Jobs in Jenkins
1.  Create unique artifacts and fingerprints to monitor
what you are pushing across your pipeline
2.  Treat different platforms (e.g. browsers) as different
tests, handled by different jobs
3.  Well-known plugins:
–  Multi-job
–  Copy Artifact
–  Workflow
31
#jenkinsconf
Organizing Test Jobs in Jenkins
4.  Keep Jenkins jobs sane and simple
–  Ergo: execute shell scripts from your Jenkins jobs
5.  Shell scripts are parameterized
6.  Parameters are fed to individual test tools
–  FitNesse labels, Cucumber labels, etc. etc.
7.  Shell scripts placed under version control
–  Managed by the team as any other source code
#jenkinsconf
Example Job Distribution
33
Build Deploy Int. Tests Test Test Test Perf. Tests
Build Deploy Int. Tests Test
Test
Test
Perf. Tests
Beware of scattered result qualification
#jenkinsconf
Distributing Tests Across Jobs
34
•  Radical parallelization using cheap and
cheerful throw-away environments
–  Especially when environments (e.g. containers)
lie at your fingertips
•  Jobs should not depend on other jobs
•  Test jobs are your “eyes and ears” – optimize for
them!
#jenkinsconf
Example Job Distribution
35
Build Deploy
Int. Tests
Test
Test
Test
Perf. Tests
?
#jenkinsconf
Challenge: Scattered Results
36
#jenkinsconf
Supporting Test Analysis
37
#jenkinsconf
Footer
Making Sense of Test Results
•  Real go/no go decisions are non-trivial
–  No failing tests
–  5 % of failing tests
–  No regression (tests that currently fail but passed
previously)
–  List of tests-that-should-not-fail
•  Need historical context
•  One integrated view
•  Data to guide improvement
#jenkinsconf
Footer
Making Sense of Test Results
Executing tests from Jenkins is great, but…
•  Different testing jobs have their share of Jenkins
plugins
•  Historic view merely available per job, not across
jobs
•  Pass/Unstable/Fail is too coarse
–  How to do “Passed, but with known failures”?
#jenkinsconf
Footer
Making Sense of Test Results
•  Ultimate analysis question (“are we good to go live?”)
is difficult to answer
•  No obvious solution for now, unless all your tests are
running through one service
40
#jenkinsconf
Example Case Study
#jenkinsconf
•  Started with 1 project containing all tests
•  Sharing knowledge
•  Structured the same as our use cases, i.e.
•  WebshopSuite.BusinessAccountSuite.UseCase1500
•  Nightly runs from the beginning
•  Indication by labels (“nightly”)
•  First sequential per application
•  WebshopSuite
•  Later parallel, split by functional area
•  WebshopSuite.BusinessAccountSuite.*
42
FitNesse Implementation
#jenkinsconf
Check-inStep
Tools
Environment git-server
Build Unit tests Build EAR Deploy
Jenkins-server
Smoke Test
Dedicated Team Server
Build Deploy
Code
review
Example Pipeline
#jenkinsconf
System TestStep
Tools
Production
Acc. Test
Deploy to
Chain
Chain Test
Security
TestStep
Tools
Environment Jenkins server and Sonar server
Remarks
Source Code Quality
TestStep
Tools
Dedicated
Team Server
Chain {1-5} Chain {1-5}
Testing
Environment
Dedicated Team ServerEnvironment
End to End Testing
Smoke Test
Chain {1-5}
#jenkinsconf
45
Test Analysis: Homebrew
#jenkinsconf
46
Test Analysis: Custom Reporting
#jenkinsconf
47
Test Analysis: Custom Reporting
#jenkinsconf
Summary
•  Testing = Automation
–  Testers are developers
•  Structure and annotate tests
–  Conway’s Law for Tests
–  Link to functions/features/use cases
•  Radical parallelization
–  Throwaway environments
48
#jenkinsconf
Summary
•  Keep Jenkins jobs simple
•  Keep Jenkins jobs independent
•  Track SUT with fingerprints
•  Invoke test tools via plugins or version-controlled
scripts
•  Parameterization!
•  Parallelize & optimize
49
#jenkinsconf
Summary
•  CD = Speed + Quality = Execution + Analysis
•  Making sense of scattered test results is still a
challenge
•  Need to figure out how to address real world go/no
go decisions
50
#jenkinsconf
What’s Next?
•  Visit http://tiny.cc/webinar-xebialabs for a webinar by
CloudBees and XebiaLabs demonstrating the key
value of CD and go-live decisions
•  Read more on the testing challenges in CD
–  http://tiny.cc/ta-and-cd
•  Try XebiaLabs’ XL TestView solution to bring
quality into the heart of your CD initiative
–  http://tiny.cc/xl-testview
51
#jenkinsconf
Please Share Your Feedback
•  Did you find this session valuable?
•  Please share your thoughts in the
Jenkins User Conference Mobile App.
•  Find the session in the app and click
on the feedback area.
52

Mais conteúdo relacionado

Mais procurados

Continuous Performance Testing
Continuous Performance TestingContinuous Performance Testing
Continuous Performance Testing
Mairbek Khadikov
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
amscanne
 
Continuous delivery @åf consult
Continuous delivery @åf consultContinuous delivery @åf consult
Continuous delivery @åf consult
Tomas Riha
 

Mais procurados (20)

Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
 
Database automated build and test - SQL In The City Cambridge
Database automated build and test - SQL In The City CambridgeDatabase automated build and test - SQL In The City Cambridge
Database automated build and test - SQL In The City Cambridge
 
Effective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpecEffective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpec
 
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaWhat is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
 
Continuous Performance Testing
Continuous Performance TestingContinuous Performance Testing
Continuous Performance Testing
 
Introduction to Test Kitchen and InSpec
Introduction to Test Kitchen and InSpecIntroduction to Test Kitchen and InSpec
Introduction to Test Kitchen and InSpec
 
Leandro Melendez - Switching Performance Left & Right
Leandro Melendez - Switching Performance Left & RightLeandro Melendez - Switching Performance Left & Right
Leandro Melendez - Switching Performance Left & Right
 
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
 
Continuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous DeploymentContinuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous Deployment
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research Report
 
#speakgell - Continuous Integration in iconnect360
#speakgell - Continuous Integration in iconnect360#speakgell - Continuous Integration in iconnect360
#speakgell - Continuous Integration in iconnect360
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 
The Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack WayThe Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack Way
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
Continuous delivery @åf consult
Continuous delivery @åf consultContinuous delivery @åf consult
Continuous delivery @åf consult
 
Jenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous Delivery
 
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using Jenkins
 

Destaque

Destaque (7)

JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
 
JUC Europe 2015: Plugin Development with Gradle and Groovy
JUC Europe 2015: Plugin Development with Gradle and GroovyJUC Europe 2015: Plugin Development with Gradle and Groovy
JUC Europe 2015: Plugin Development with Gradle and Groovy
 
Cd syd
Cd sydCd syd
Cd syd
 
JUC Europe 2015: Scaling Your Jenkins Master with Docker
JUC Europe 2015: Scaling Your Jenkins Master with DockerJUC Europe 2015: Scaling Your Jenkins Master with Docker
JUC Europe 2015: Scaling Your Jenkins Master with Docker
 
JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...
JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...
JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...
 
JUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache Mesos
JUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache MesosJUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache Mesos
JUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache Mesos
 
JUC Europe 2015: Evolving the Jenkins UI
JUC Europe 2015: Evolving the Jenkins UIJUC Europe 2015: Evolving the Jenkins UI
JUC Europe 2015: Evolving the Jenkins UI
 

Semelhante a JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite Butler

QA in DevOps: Transformation thru Automation via Jenkins
QA in DevOps:  Transformation thru Automation via JenkinsQA in DevOps:  Transformation thru Automation via Jenkins
QA in DevOps: Transformation thru Automation via Jenkins
Tatyana Kravtsov
 
Jenkins User Conference: Building Your Continuous Delivery Toolkit
Jenkins User Conference: Building Your Continuous Delivery ToolkitJenkins User Conference: Building Your Continuous Delivery Toolkit
Jenkins User Conference: Building Your Continuous Delivery Toolkit
XebiaLabs
 
Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
BestBrains
 
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
NaviAningi
 

Semelhante a JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite Butler (20)

QA in DevOps: Transformation thru Automation via Jenkins
QA in DevOps:  Transformation thru Automation via JenkinsQA in DevOps:  Transformation thru Automation via Jenkins
QA in DevOps: Transformation thru Automation via Jenkins
 
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
 
Jenkins User Conference: Building Your Continuous Delivery Toolkit
Jenkins User Conference: Building Your Continuous Delivery ToolkitJenkins User Conference: Building Your Continuous Delivery Toolkit
Jenkins User Conference: Building Your Continuous Delivery Toolkit
 
Introduction to Automated Testing
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated Testing
 
Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
 
Building your Continuous Delivery Toolkit @ JUC SF 2014
Building your Continuous Delivery Toolkit @ JUC SF 2014Building your Continuous Delivery Toolkit @ JUC SF 2014
Building your Continuous Delivery Toolkit @ JUC SF 2014
 
JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...
JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...
JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...
 
Why NXTware Remote for Jenkins
Why NXTware Remote for JenkinsWhy NXTware Remote for Jenkins
Why NXTware Remote for Jenkins
 
Context Driven Automation Gtac 2008
Context Driven Automation Gtac 2008Context Driven Automation Gtac 2008
Context Driven Automation Gtac 2008
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
Building High Quality Android Applications
Building High Quality Android ApplicationsBuilding High Quality Android Applications
Building High Quality Android Applications
 
MyHeritage - QA Automations in a Continuous Deployment environment
MyHeritage -  QA Automations in a Continuous Deployment environmentMyHeritage -  QA Automations in a Continuous Deployment environment
MyHeritage - QA Automations in a Continuous Deployment environment
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 
Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomon
 
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
 
KKSD_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
KKSD_Testbirds_Selenium_eclipsecon_FINAL_0.pptKKSD_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
KKSD_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 

Mais de CloudBees

Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014
CloudBees
 

Mais de CloudBees (20)

JUC Europe 2015: Multi-Node Environment as a Jenkins Slave (Compound-Slave)
JUC Europe 2015: Multi-Node Environment as a Jenkins Slave (Compound-Slave)JUC Europe 2015: Multi-Node Environment as a Jenkins Slave (Compound-Slave)
JUC Europe 2015: Multi-Node Environment as a Jenkins Slave (Compound-Slave)
 
JUC Europe 2015: Jenkins Made Easy
JUC Europe 2015: Jenkins Made EasyJUC Europe 2015: Jenkins Made Easy
JUC Europe 2015: Jenkins Made Easy
 
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and MaintenanceJUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
 
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
 
JUC Europe 2015: Hey! What Did We Just Release?
JUC Europe 2015: Hey! What Did We Just Release?JUC Europe 2015: Hey! What Did We Just Release?
JUC Europe 2015: Hey! What Did We Just Release?
 
JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...
JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...
JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...
 
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data ProjectsJUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
 
JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...
JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...
JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...
 
JUC Europe 2015: Enabling Continuous Delivery for Major Retailers
JUC Europe 2015: Enabling Continuous Delivery for Major RetailersJUC Europe 2015: Enabling Continuous Delivery for Major Retailers
JUC Europe 2015: Enabling Continuous Delivery for Major Retailers
 
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
 
JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...
JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...
JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...
 
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
JUC Europe 2015: Configuration as Code: The Job DSL PluginJUC Europe 2015: Configuration as Code: The Job DSL Plugin
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
 
JUC Europe 2015: A Reproducible Build Environment with Jenkins
JUC Europe 2015: A Reproducible Build Environment with JenkinsJUC Europe 2015: A Reproducible Build Environment with Jenkins
JUC Europe 2015: A Reproducible Build Environment with Jenkins
 
Pimp your jenkins platform with docker - Devops.com 2015/11
Pimp your jenkins platform with docker - Devops.com 2015/11Pimp your jenkins platform with docker - Devops.com 2015/11
Pimp your jenkins platform with docker - Devops.com 2015/11
 
Analyze This! CloudBees Jenkins Cluster Operations and Analytics
Analyze This! CloudBees Jenkins Cluster Operations and AnalyticsAnalyze This! CloudBees Jenkins Cluster Operations and Analytics
Analyze This! CloudBees Jenkins Cluster Operations and Analytics
 
Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014
 
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
 
From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...
From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...
From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...
 
Rethinking Application Design for the Cloud
Rethinking Application Design for the CloudRethinking Application Design for the Cloud
Rethinking Application Design for the Cloud
 

Ú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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
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
Enterprise Knowledge
 

Ú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
 
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
 
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...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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?
 
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
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite Butler

  • 1. #jenkinsconf Footer How to Optimize Automated Testing with Everyone's Favorite Butler Viktor Clerc, Product Manager & Jenkins Fan, XebiaLabs
  • 2. #jenkinsconf Agenda •  The World of Testing is Changing •  Testing = Automation •  Test Automation and CD: Execution and Analysis •  Focus on the Basics •  Best Practices for Test Execution using Jenkins •  Supporting Test Analysis 2
  • 3. #jenkinsconf Footer But first…a bit about me •  Product Manager XL TestView for XebiaLabs •  Traversed through all phases of the software development lifecycle •  Supported major organization in setting up a test strategy and test automation strategy •  Is eager to flip the way (most) organizations do testing 3
  • 4. #jenkinsconf Footer …and about XebiaLabs •  We build tools to solve problems around DevOps and Continuous Delivery at scale 4
  • 5. #jenkinsconf The World of Testing is Changing 5
  • 6. #jenkinsconf Introducing Test Automation For Real SPECIFY DESIGN BUILD TEST INTEGRATE REGRESSION USER ACCEPTANCE RELEASE Acceptance 
 Driven Testing Development = Test Test = Development Automate ALL User Acceptance Test effort INTEGRATE REGRESSION USER ACCEPTANCE
  • 8. #jenkinsconf Testing = Automation: Implications •  Developers are becoming testers –  Maintain test code as source code •  Need to set up on-demand pipelines and environments •  Infrastructure as code –  X-browser tests, Selenium grids, dedicated performance environments, mobile etc. •  Hosted services
  • 9. #jenkinsconf Testing = Automation: Challenges •  Many test tools for each of the test levels, but no single place to answer “Good enough to go live?” •  Requirements coverageis not available –  “Did we test enough?” –  Minimize the mean time to repair –  Support for failure analysis JUnit, FitNesse, JMeter, YSlow, Vanity Check, WireShark, SOAP- UI, Jasmine, Karma, Speedtrace, Selenium, WebScarab, TTA, DynaTrace, HP Diagnostics, ALM stack AppDynamics, Code Tester for Oracle, Arachnid, Fortify, Sonar, …
  • 10. #jenkinsconf Testing = Automation: Challenges •  Thousands of tests makes test sets hard to manage: –  “Where is my subset?” –  “What tests add most value, what tests are superfluous?” –  “When to run what tests?” •  Running all tests all the time takes too long, feedback is too late •  Quality control of the tests themselves and maintenance of testware
  • 11. #jenkinsconf Testing = Automation: Challenges •  Tooling overstretch
  • 12. #jenkinsconf Testing = Automation: Challenges •  Tooling overstretch •  Poor butler!
  • 13. #jenkinsconf Test Automation and CD: Execution and Analysis 13
  • 14. #jenkinsconf The Two Faces of CD •  A lot of focus right now is on pipeline execution •  …but there’s no point delivering at light speed if everything starts breaking •  Testing (= quality/risk) needs to be a first-class citizen of your CD initiative!
  • 15. #jenkinsconf The Two Faces of CD •  CD = Execution + Analysis
  • 16. #jenkinsconf The Two Faces of CD •  CD = Execution + Analysis •  = Speed + Quality
  • 17. #jenkinsconf The Two Faces of CD •  CD = Execution + Analysis •  = Speed + Quality •  = Pipeline orchestration + ..?
  • 19. #jenkinsconf Quick Review 19 1.  Cohn’s pyramid –  Unit tests –  Service tests (under the GUI) –  (graphical) User Interface tests 2.  And even further downstream –  Integration Tests –  Performance Tests
  • 20. #jenkinsconf “Modern Testing” 101 1.  Testers are developers 20
  • 21. #jenkinsconf “Modern Testing” 101 1.  Testers are developers 2.  Test code equals production code –  Conway’s Law –  Measure quality 21
  • 22. #jenkinsconf “Modern Testing” 101 1.  Testers are developers 2.  Test code equals production code –  Conway’s Law –  Measure quality 3.  Linking tests to use cases 22
  • 23. #jenkinsconf “Modern Testing” 101 1.  Testers are developers 2.  Test code equals production code –  Conway’s Law –  Measure quality 3.  Linking tests to use cases 4.  Slice and dice –  Labeling 23
  • 24. #jenkinsconf “Modern Testing” 101 1.  Testers are developers 2.  Test code equals production code –  Conway’s Law –  Measure quality 3.  Linking tests to use cases 4.  Slice and dice –  Labeling 5.  Radical parallelization24 Fail FASTer! “Kill the nightlies”
  • 25. #jenkinsconf Dealing With Growing Tests •  Conway’s Law for test code –  Let the test code mimic the production code –  Organize tests under the project/system under test •  Suite.App.UseCase.TestCase •  Cut the suite at UseCase: now you have independent chunks which you can run massively in parallel 25
  • 26. #jenkinsconf Dealing With Growing Tests •  Tests should not depend on other tests –  Setup and tear down of test data done within each test –  Share test components (as you would do with ‘real’ production code) –  Trade-off between: •  No code duplication yet somewhat more complex fixtures •  Easy-to-grab simple fixtures but a lot of them (and duplication) 26
  • 27. #jenkinsconf Keep It Manageable •  Focus on functional coverage, not technical coverage •  Say 40 user stories, 400 tests –  Do I have relatively more tests for the more important user stories? –  How do I link tests to user stories/features/fixes? •  Metrics –  Number of tests –  Number of tests that have not passed in <time> –  Flaky tests –  Duration 27
  • 28. #jenkinsconf Slice and Dice •  Use appropriate labels in your test code –  Responsible team –  Topic –  Functional area –  Flaky –  Known issue –  etc. 28
  • 29. #jenkinsconf Best Practices for Test Execution in Jenkins 29
  • 30. #jenkinsconf Jenkins Testing Basics 30 •  Tilt the pyramid … •  … and use this as the guiding principle to set up your Jenkins test jobs “left to right”
  • 31. #jenkinsconf Organizing Test Jobs in Jenkins 1.  Create unique artifacts and fingerprints to monitor what you are pushing across your pipeline 2.  Treat different platforms (e.g. browsers) as different tests, handled by different jobs 3.  Well-known plugins: –  Multi-job –  Copy Artifact –  Workflow 31
  • 32. #jenkinsconf Organizing Test Jobs in Jenkins 4.  Keep Jenkins jobs sane and simple –  Ergo: execute shell scripts from your Jenkins jobs 5.  Shell scripts are parameterized 6.  Parameters are fed to individual test tools –  FitNesse labels, Cucumber labels, etc. etc. 7.  Shell scripts placed under version control –  Managed by the team as any other source code
  • 33. #jenkinsconf Example Job Distribution 33 Build Deploy Int. Tests Test Test Test Perf. Tests Build Deploy Int. Tests Test Test Test Perf. Tests Beware of scattered result qualification
  • 34. #jenkinsconf Distributing Tests Across Jobs 34 •  Radical parallelization using cheap and cheerful throw-away environments –  Especially when environments (e.g. containers) lie at your fingertips •  Jobs should not depend on other jobs •  Test jobs are your “eyes and ears” – optimize for them!
  • 35. #jenkinsconf Example Job Distribution 35 Build Deploy Int. Tests Test Test Test Perf. Tests ?
  • 38. #jenkinsconf Footer Making Sense of Test Results •  Real go/no go decisions are non-trivial –  No failing tests –  5 % of failing tests –  No regression (tests that currently fail but passed previously) –  List of tests-that-should-not-fail •  Need historical context •  One integrated view •  Data to guide improvement
  • 39. #jenkinsconf Footer Making Sense of Test Results Executing tests from Jenkins is great, but… •  Different testing jobs have their share of Jenkins plugins •  Historic view merely available per job, not across jobs •  Pass/Unstable/Fail is too coarse –  How to do “Passed, but with known failures”?
  • 40. #jenkinsconf Footer Making Sense of Test Results •  Ultimate analysis question (“are we good to go live?”) is difficult to answer •  No obvious solution for now, unless all your tests are running through one service 40
  • 42. #jenkinsconf •  Started with 1 project containing all tests •  Sharing knowledge •  Structured the same as our use cases, i.e. •  WebshopSuite.BusinessAccountSuite.UseCase1500 •  Nightly runs from the beginning •  Indication by labels (“nightly”) •  First sequential per application •  WebshopSuite •  Later parallel, split by functional area •  WebshopSuite.BusinessAccountSuite.* 42 FitNesse Implementation
  • 43. #jenkinsconf Check-inStep Tools Environment git-server Build Unit tests Build EAR Deploy Jenkins-server Smoke Test Dedicated Team Server Build Deploy Code review Example Pipeline
  • 44. #jenkinsconf System TestStep Tools Production Acc. Test Deploy to Chain Chain Test Security TestStep Tools Environment Jenkins server and Sonar server Remarks Source Code Quality TestStep Tools Dedicated Team Server Chain {1-5} Chain {1-5} Testing Environment Dedicated Team ServerEnvironment End to End Testing Smoke Test Chain {1-5}
  • 48. #jenkinsconf Summary •  Testing = Automation –  Testers are developers •  Structure and annotate tests –  Conway’s Law for Tests –  Link to functions/features/use cases •  Radical parallelization –  Throwaway environments 48
  • 49. #jenkinsconf Summary •  Keep Jenkins jobs simple •  Keep Jenkins jobs independent •  Track SUT with fingerprints •  Invoke test tools via plugins or version-controlled scripts •  Parameterization! •  Parallelize & optimize 49
  • 50. #jenkinsconf Summary •  CD = Speed + Quality = Execution + Analysis •  Making sense of scattered test results is still a challenge •  Need to figure out how to address real world go/no go decisions 50
  • 51. #jenkinsconf What’s Next? •  Visit http://tiny.cc/webinar-xebialabs for a webinar by CloudBees and XebiaLabs demonstrating the key value of CD and go-live decisions •  Read more on the testing challenges in CD –  http://tiny.cc/ta-and-cd •  Try XebiaLabs’ XL TestView solution to bring quality into the heart of your CD initiative –  http://tiny.cc/xl-testview 51
  • 52. #jenkinsconf Please Share Your Feedback •  Did you find this session valuable? •  Please share your thoughts in the Jenkins User Conference Mobile App. •  Find the session in the app and click on the feedback area. 52