SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
Automated
 performance testing
using Maven & JMeter
 George Barnett, Atlassian Software Systems
             @georgebarnett
• Create controllable JMeter tests
• Configure Maven to create a repeatable cycle
• Run this “build” in your CI server every 8 hours
• Find performance regressions faster
WHY?
• Catch regressions quickly
• Stop hunting for bugs
• Code with confidence
• Know the performance cost of features
• Fearless external dependency upgrades
• Go home on time
ATLASSIAN

• 15,000+ customers
• 100+ developers
• 8 software streams
• 1 performance engineer
ATLASSIAN

• JIRA - Issue management
• Confluence - Enterprise Wiki
• Bamboo - Continuous Integration
• FishEye, Crucible & Clover - Dev Tools
• Crowd - Single Sign-On.
BEFORE WE BEGIN
• Continuous Integration is critical
• Keep code working with Unit and Functional
  tests
• Broken or irregular builds means no code to
  performance test
• Performance testing is NOT a replacement
  for other testing (but it helps)
PROCESS
• Write code (1-6 months)
• Compile code
• Send it to QA (or Production?!)
• Performance Regression
• PANIC!
          No performance testing!
A BETTER WAY
• Write code
• CI compiles code and runs tests
• Send it to QA (or Production?!)
• Performance Regression
• PANIC!
          No performance testing!
A BETTER WAY 2.0

• Performance test artifacts as soon as they
  pass Unit and Functional testing
• Fast feedback for developers
• No Surprises
TOOLS

• JMeter
• Maven & plugins
• Bamboo & plugins
• A Profiler
JMETER

• Apache Project
• Java
• Supports HTTP, JDBC, SOAP, XML-RPC,
  FTP, SMTP, LDAP, JUnit & more.
MAVEN
• Apache Project
• Java
• Build Tool
• Dependency management
• Documentation
MAVEN CONCEPTS
• Project Object Model (POM)
• Standardised directory structure
• Build Lifecycle
• Reporting Lifecycle
• Plugins
MAVEN POM
<project>
 <groupid>com.atlassian.com.performance.jira</groupid>
 <artifactid>automated-performance</artifactid>

 <properties>
  <test.dataset>/opt/dataset/dataset1.zip</test.dataset>
 </properties>

 <build>
  <!--Main Lifecycle plugins configured here-->
 </build>

 <reporting>
  <!--Reporting Lifecycle here-->
 </reporting>
</project>
MAVEN PLUGINS
• Chronos
• Ant-run
• Cargo
• Maven Assembly plugin
• Maven Dependency plugin
BAMBOO

• Continuous Integration
• Can run builds on Amazon’s EC2
• JMeter Aggregator Plugin
A PROFILER
• Java Profiler
• CPU Snapshots
• GC & Memory information
• Thread usage and contention
• Triggers & offline sampling
STEP 1
        Package the JMeter test

• Maven Assembly plugin
• Create a .zip from project directories
• `mvn deploy` to repository as a SNAPSHOT
STEP 2
   Configure the Maven automated build

• Package application state into zip files
• Ant-run - application pre-setup
• Cargo - deploy container
• Chronos - configure the JMeter tests
MAVEN PROFILES
<project>
 ..
 <properties>
    <test.dataset>/opt/dataset/dataset1.zip</test.dataset>
 </properties>

 <profile>
  <id>dataset1</id>
  <properties>
     <test.dataset>/opt/dataset/dataset1.zip</test.dataset>
  ..

 <profile>
  <id>dataset2</id>
  <properties>
     <test.dataset>/opt/dataset/dataset2.zip</test.dataset>
  ..
MAVEN PROFILES
• Invoked on command line
  •   eg: mvn verify -Pmysql, tomcat5, dataset1

• Configuration in profile is added to build
• Use for a wider variation in test
  environments
• Use profiles for individual “work units”, eg
  JMeter
ADDING A PROFILER
$ export LD_LIBRARY_PATH=”$JPHOME/bin/linux-x64/

<global.jvm.args>-Xms2000m -Xloggc:${project.build.directory}/gc.log</global.jvm.args>
<jvm.args>${global.jvm.args}</jvm.args>

<profile>
 <id>jprofiler</id>
 <properties>
  <jvm.args>-agentlib:jprofilerti=offline,id=${jprofiler.profileid},config=${jprofiler.configfile} -
Xbootclasspath/a:${jprofiler.home}/bin/agent.jar ${global.jvm.args}</jvm.args>
 </properties>
</profile>
REPORTING
                 CHRONOS

• Available in maven
 •   eg: mvn site / mvn chronos:report

• Generates graphs and a numerical report
• Can compare to historical data
• Static :(
REPORTING
 CHRONOS
REPORTING
 CHRONOS
REPORTING
 CHRONOS
REPORTING
 CHRONOS
REPORTING
CHRONOS - HISTORY
REPORTING
CHRONOS - HISTORY
REPORTING
  BAMBOO JMETER AGGREGATOR


• Open source Bamboo plugin (supported!)
• James Roper (Atlassian) 20% time project
• Can graph JMeter .JTL and CSV files
• Dynamic
REPORTING
BAMBOO JMETER AGGREGATOR
TIPS
• Allocate time for fixing tests
• Your tests WILL break
• Work out a process for fixing bugs
• Gather as many artifacts from each test run
  as possible
• React sooner rather than later
Q&A
 gbarnett @ atlassian . com

      @georgebarnett

 Code samples online soon!
blogs.atlassian.com/developer

Meet Atlassian @ The Summit:
    May 31 - June 2 in SF
 www.atlassian.com/summit

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Jmeter Tester Certification
Jmeter Tester CertificationJmeter Tester Certification
Jmeter Tester Certification
 
Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeter
 
Load Test Drupal Site Using JMeter and Amazon AWS
Load Test Drupal Site Using JMeter and Amazon AWSLoad Test Drupal Site Using JMeter and Amazon AWS
Load Test Drupal Site Using JMeter and Amazon AWS
 
Apache Jmeter 3.2 Performance & Load Testing 2017
Apache Jmeter 3.2 Performance & Load Testing 2017Apache Jmeter 3.2 Performance & Load Testing 2017
Apache Jmeter 3.2 Performance & Load Testing 2017
 
JMeter Post-Processors
JMeter Post-ProcessorsJMeter Post-Processors
JMeter Post-Processors
 
Performance Testing With Jmeter
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With Jmeter
 
JMeter_ Cubet Seminar ppt
JMeter_ Cubet Seminar pptJMeter_ Cubet Seminar ppt
JMeter_ Cubet Seminar ppt
 
Jbehave- Basics to Advance
Jbehave- Basics to AdvanceJbehave- Basics to Advance
Jbehave- Basics to Advance
 
Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeter
 
Performance Testing using Jmeter and Capacity Testing
Performance Testing using Jmeter and Capacity TestingPerformance Testing using Jmeter and Capacity Testing
Performance Testing using Jmeter and Capacity Testing
 
Introduction to JMeter
Introduction to JMeterIntroduction to JMeter
Introduction to JMeter
 
Performance testing with Apache JMeter
Performance testing with Apache JMeterPerformance testing with Apache JMeter
Performance testing with Apache JMeter
 
JMeter
JMeterJMeter
JMeter
 
Presentation on Apache Jmeter
Presentation on Apache JmeterPresentation on Apache Jmeter
Presentation on Apache Jmeter
 
Jenkins/Jmeter Configuration - Colombo Performance Test Meetup - 2016 April
Jenkins/Jmeter Configuration - Colombo Performance Test Meetup - 2016 AprilJenkins/Jmeter Configuration - Colombo Performance Test Meetup - 2016 April
Jenkins/Jmeter Configuration - Colombo Performance Test Meetup - 2016 April
 
Load testing with J meter
Load testing with J meterLoad testing with J meter
Load testing with J meter
 
"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session
 
JMeter & ColdFusion
JMeter & ColdFusion JMeter & ColdFusion
JMeter & ColdFusion
 
Using JMeter for Performance Testing Live Streaming Applications
Using JMeter for Performance Testing Live Streaming ApplicationsUsing JMeter for Performance Testing Live Streaming Applications
Using JMeter for Performance Testing Live Streaming Applications
 
Load Runner
Load RunnerLoad Runner
Load Runner
 

Andere mochten auch

Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
Atul Pant
 
BlazeMeter Presents at the High Performance Drupal Meetup
BlazeMeter Presents at the High Performance Drupal MeetupBlazeMeter Presents at the High Performance Drupal Meetup
BlazeMeter Presents at the High Performance Drupal Meetup
BlazeMeter
 
Akka Http , Routes, Streams with Scala
Akka Http , Routes, Streams with ScalaAkka Http , Routes, Streams with Scala
Akka Http , Routes, Streams with Scala
Jerry Kuru
 

Andere mochten auch (20)

Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeter
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
 
Installing Groovy engine in Apache Jmeter
Installing Groovy engine in Apache JmeterInstalling Groovy engine in Apache Jmeter
Installing Groovy engine in Apache Jmeter
 
Load Testing using Continuous Integration tools
Load Testing using Continuous Integration toolsLoad Testing using Continuous Integration tools
Load Testing using Continuous Integration tools
 
Beanshell scripting in Apache JMeter
Beanshell scripting in Apache JMeterBeanshell scripting in Apache JMeter
Beanshell scripting in Apache JMeter
 
BlazeMeter Presents at the High Performance Drupal Meetup
BlazeMeter Presents at the High Performance Drupal MeetupBlazeMeter Presents at the High Performance Drupal Meetup
BlazeMeter Presents at the High Performance Drupal Meetup
 
JMeter workshop
JMeter workshopJMeter workshop
JMeter workshop
 
Jmeter From Scratch
Jmeter From ScratchJmeter From Scratch
Jmeter From Scratch
 
Load testing jmeter
Load testing jmeterLoad testing jmeter
Load testing jmeter
 
Custom deployments with sbt-native-packager
Custom deployments with sbt-native-packagerCustom deployments with sbt-native-packager
Custom deployments with sbt-native-packager
 
Unsucking Error Handling with Futures
Unsucking Error Handling with FuturesUnsucking Error Handling with Futures
Unsucking Error Handling with Futures
 
Ship your Scala code often and easy with Docker
Ship your Scala code often and easy with DockerShip your Scala code often and easy with Docker
Ship your Scala code often and easy with Docker
 
JMeter
JMeterJMeter
JMeter
 
Introduction to Jmeter
Introduction to JmeterIntroduction to Jmeter
Introduction to Jmeter
 
Continous delivery - lad koden flyde 2014
Continous delivery - lad koden flyde 2014Continous delivery - lad koden flyde 2014
Continous delivery - lad koden flyde 2014
 
Continous delivery with sbt
Continous delivery with sbtContinous delivery with sbt
Continous delivery with sbt
 
Scala, docker and testing, oh my! mario camou
Scala, docker and testing, oh my! mario camouScala, docker and testing, oh my! mario camou
Scala, docker and testing, oh my! mario camou
 
Web Performance Culture and Tools at Etsy
Web Performance Culture and Tools at EtsyWeb Performance Culture and Tools at Etsy
Web Performance Culture and Tools at Etsy
 
Performance Testing REST APIs
Performance Testing REST APIsPerformance Testing REST APIs
Performance Testing REST APIs
 
Akka Http , Routes, Streams with Scala
Akka Http , Routes, Streams with ScalaAkka Http , Routes, Streams with Scala
Akka Http , Routes, Streams with Scala
 

Ähnlich wie Automated Performance Testing With J Meter And Maven

SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
Fred Sauer
 
Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUG
slandelle
 
PHX Session #1: Development Best Practices And How Microsoft Helps
PHX Session #1: Development  Best  Practices And  How  Microsoft  HelpsPHX Session #1: Development  Best  Practices And  How  Microsoft  Helps
PHX Session #1: Development Best Practices And How Microsoft Helps
Steve Lange
 

Ähnlich wie Automated Performance Testing With J Meter And Maven (20)

Django 101
Django 101Django 101
Django 101
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
 
Sonar - the ring to rule them all
Sonar - the ring to rule them allSonar - the ring to rule them all
Sonar - the ring to rule them all
 
How the JDeveloper team test JDeveloper at UKOUG'08
How the JDeveloper team test JDeveloper at UKOUG'08How the JDeveloper team test JDeveloper at UKOUG'08
How the JDeveloper team test JDeveloper at UKOUG'08
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
WebTest - Efficient Functional Web Testing with HtmlUnit and BeyondWebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
 
Audit your reactive applications
Audit your reactive applicationsAudit your reactive applications
Audit your reactive applications
 
Dhanasekaran 2008-2009 Quick Test Pro Presentation
Dhanasekaran 2008-2009 Quick Test Pro PresentationDhanasekaran 2008-2009 Quick Test Pro Presentation
Dhanasekaran 2008-2009 Quick Test Pro Presentation
 
First QTP Tutorial
First QTP TutorialFirst QTP Tutorial
First QTP Tutorial
 
QTP Tutorial Slides Presentation.
QTP Tutorial Slides Presentation.QTP Tutorial Slides Presentation.
QTP Tutorial Slides Presentation.
 
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and MavenWebtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
 
Plugins 2.0: The Overview
Plugins 2.0: The OverviewPlugins 2.0: The Overview
Plugins 2.0: The Overview
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
 
Test
TestTest
Test
 
T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUG
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
 
KraQA #29 - Component level testing of react app, using enzyme
KraQA #29 - Component level testing of react app, using enzymeKraQA #29 - Component level testing of react app, using enzyme
KraQA #29 - Component level testing of react app, using enzyme
 
PHX Session #1: Development Best Practices And How Microsoft Helps
PHX Session #1: Development  Best  Practices And  How  Microsoft  HelpsPHX Session #1: Development  Best  Practices And  How  Microsoft  Helps
PHX Session #1: Development Best Practices And How Microsoft Helps
 

Mehr von PerconaPerformance

Drizzles Approach To Improving Performance Of The Server
Drizzles  Approach To  Improving  Performance Of The  ServerDrizzles  Approach To  Improving  Performance Of The  Server
Drizzles Approach To Improving Performance Of The Server
PerconaPerformance
 
E M T Better Performance Monitoring
E M T  Better  Performance  MonitoringE M T  Better  Performance  Monitoring
E M T Better Performance Monitoring
PerconaPerformance
 
Covering Indexes Ordersof Magnitude Improvements
Covering  Indexes  Ordersof Magnitude  ImprovementsCovering  Indexes  Ordersof Magnitude  Improvements
Covering Indexes Ordersof Magnitude Improvements
PerconaPerformance
 
Galera Multi Master Synchronous My S Q L Replication Clusters
Galera  Multi Master  Synchronous  My S Q L  Replication  ClustersGalera  Multi Master  Synchronous  My S Q L  Replication  Clusters
Galera Multi Master Synchronous My S Q L Replication Clusters
PerconaPerformance
 
My S Q L Replication Getting The Most From Slaves
My S Q L  Replication  Getting  The  Most  From  SlavesMy S Q L  Replication  Getting  The  Most  From  Slaves
My S Q L Replication Getting The Most From Slaves
PerconaPerformance
 
Performance Instrumentation Beyond What You Do Now
Performance  Instrumentation  Beyond  What  You  Do  NowPerformance  Instrumentation  Beyond  What  You  Do  Now
Performance Instrumentation Beyond What You Do Now
PerconaPerformance
 
Boost Performance With My S Q L 51 Partitions
Boost Performance With  My S Q L 51 PartitionsBoost Performance With  My S Q L 51 Partitions
Boost Performance With My S Q L 51 Partitions
PerconaPerformance
 
Trees And More With Postgre S Q L
Trees And  More With  Postgre S Q LTrees And  More With  Postgre S Q L
Trees And More With Postgre S Q L
PerconaPerformance
 
Database Performance With Proxy Architectures
Database  Performance With  Proxy  ArchitecturesDatabase  Performance With  Proxy  Architectures
Database Performance With Proxy Architectures
PerconaPerformance
 
Running A Realtime Stats Service On My Sql
Running A Realtime Stats Service On My SqlRunning A Realtime Stats Service On My Sql
Running A Realtime Stats Service On My Sql
PerconaPerformance
 
How To Think About Performance
How To Think About PerformanceHow To Think About Performance
How To Think About Performance
PerconaPerformance
 
Object Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And ApplicationsObject Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And Applications
PerconaPerformance
 
Your Disk Array Is Slower Than It Should Be
Your Disk Array Is Slower Than It Should BeYour Disk Array Is Slower Than It Should Be
Your Disk Array Is Slower Than It Should Be
PerconaPerformance
 

Mehr von PerconaPerformance (17)

Drizzles Approach To Improving Performance Of The Server
Drizzles  Approach To  Improving  Performance Of The  ServerDrizzles  Approach To  Improving  Performance Of The  Server
Drizzles Approach To Improving Performance Of The Server
 
E M T Better Performance Monitoring
E M T  Better  Performance  MonitoringE M T  Better  Performance  Monitoring
E M T Better Performance Monitoring
 
Covering Indexes Ordersof Magnitude Improvements
Covering  Indexes  Ordersof Magnitude  ImprovementsCovering  Indexes  Ordersof Magnitude  Improvements
Covering Indexes Ordersof Magnitude Improvements
 
Galera Multi Master Synchronous My S Q L Replication Clusters
Galera  Multi Master  Synchronous  My S Q L  Replication  ClustersGalera  Multi Master  Synchronous  My S Q L  Replication  Clusters
Galera Multi Master Synchronous My S Q L Replication Clusters
 
My S Q L Replication Getting The Most From Slaves
My S Q L  Replication  Getting  The  Most  From  SlavesMy S Q L  Replication  Getting  The  Most  From  Slaves
My S Q L Replication Getting The Most From Slaves
 
Performance Instrumentation Beyond What You Do Now
Performance  Instrumentation  Beyond  What  You  Do  NowPerformance  Instrumentation  Beyond  What  You  Do  Now
Performance Instrumentation Beyond What You Do Now
 
Boost Performance With My S Q L 51 Partitions
Boost Performance With  My S Q L 51 PartitionsBoost Performance With  My S Q L 51 Partitions
Boost Performance With My S Q L 51 Partitions
 
High Performance Erlang
High  Performance  ErlangHigh  Performance  Erlang
High Performance Erlang
 
Websites On Speed
Websites On  SpeedWebsites On  Speed
Websites On Speed
 
Trees And More With Postgre S Q L
Trees And  More With  Postgre S Q LTrees And  More With  Postgre S Q L
Trees And More With Postgre S Q L
 
Database Performance With Proxy Architectures
Database  Performance With  Proxy  ArchitecturesDatabase  Performance With  Proxy  Architectures
Database Performance With Proxy Architectures
 
Using Storage Class Memory
Using Storage Class MemoryUsing Storage Class Memory
Using Storage Class Memory
 
Websites On Speed
Websites On SpeedWebsites On Speed
Websites On Speed
 
Running A Realtime Stats Service On My Sql
Running A Realtime Stats Service On My SqlRunning A Realtime Stats Service On My Sql
Running A Realtime Stats Service On My Sql
 
How To Think About Performance
How To Think About PerformanceHow To Think About Performance
How To Think About Performance
 
Object Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And ApplicationsObject Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And Applications
 
Your Disk Array Is Slower Than It Should Be
Your Disk Array Is Slower Than It Should BeYour Disk Array Is Slower Than It Should Be
Your Disk Array Is Slower Than It Should Be
 

Kürzlich hochgeladen

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

Automated Performance Testing With J Meter And Maven

  • 1. Automated performance testing using Maven & JMeter George Barnett, Atlassian Software Systems @georgebarnett
  • 2. • Create controllable JMeter tests • Configure Maven to create a repeatable cycle • Run this “build” in your CI server every 8 hours • Find performance regressions faster
  • 3. WHY? • Catch regressions quickly • Stop hunting for bugs • Code with confidence • Know the performance cost of features • Fearless external dependency upgrades • Go home on time
  • 4. ATLASSIAN • 15,000+ customers • 100+ developers • 8 software streams • 1 performance engineer
  • 5. ATLASSIAN • JIRA - Issue management • Confluence - Enterprise Wiki • Bamboo - Continuous Integration • FishEye, Crucible & Clover - Dev Tools • Crowd - Single Sign-On.
  • 6. BEFORE WE BEGIN • Continuous Integration is critical • Keep code working with Unit and Functional tests • Broken or irregular builds means no code to performance test • Performance testing is NOT a replacement for other testing (but it helps)
  • 7. PROCESS • Write code (1-6 months) • Compile code • Send it to QA (or Production?!) • Performance Regression • PANIC! No performance testing!
  • 8. A BETTER WAY • Write code • CI compiles code and runs tests • Send it to QA (or Production?!) • Performance Regression • PANIC! No performance testing!
  • 9. A BETTER WAY 2.0 • Performance test artifacts as soon as they pass Unit and Functional testing • Fast feedback for developers • No Surprises
  • 10. TOOLS • JMeter • Maven & plugins • Bamboo & plugins • A Profiler
  • 11. JMETER • Apache Project • Java • Supports HTTP, JDBC, SOAP, XML-RPC, FTP, SMTP, LDAP, JUnit & more.
  • 12.
  • 13. MAVEN • Apache Project • Java • Build Tool • Dependency management • Documentation
  • 14. MAVEN CONCEPTS • Project Object Model (POM) • Standardised directory structure • Build Lifecycle • Reporting Lifecycle • Plugins
  • 15. MAVEN POM <project> <groupid>com.atlassian.com.performance.jira</groupid> <artifactid>automated-performance</artifactid> <properties> <test.dataset>/opt/dataset/dataset1.zip</test.dataset> </properties> <build> <!--Main Lifecycle plugins configured here--> </build> <reporting> <!--Reporting Lifecycle here--> </reporting> </project>
  • 16. MAVEN PLUGINS • Chronos • Ant-run • Cargo • Maven Assembly plugin • Maven Dependency plugin
  • 17. BAMBOO • Continuous Integration • Can run builds on Amazon’s EC2 • JMeter Aggregator Plugin
  • 18. A PROFILER • Java Profiler • CPU Snapshots • GC & Memory information • Thread usage and contention • Triggers & offline sampling
  • 19. STEP 1 Package the JMeter test • Maven Assembly plugin • Create a .zip from project directories • `mvn deploy` to repository as a SNAPSHOT
  • 20. STEP 2 Configure the Maven automated build • Package application state into zip files • Ant-run - application pre-setup • Cargo - deploy container • Chronos - configure the JMeter tests
  • 21. MAVEN PROFILES <project> .. <properties> <test.dataset>/opt/dataset/dataset1.zip</test.dataset> </properties> <profile> <id>dataset1</id> <properties> <test.dataset>/opt/dataset/dataset1.zip</test.dataset> .. <profile> <id>dataset2</id> <properties> <test.dataset>/opt/dataset/dataset2.zip</test.dataset> ..
  • 22. MAVEN PROFILES • Invoked on command line • eg: mvn verify -Pmysql, tomcat5, dataset1 • Configuration in profile is added to build • Use for a wider variation in test environments • Use profiles for individual “work units”, eg JMeter
  • 23. ADDING A PROFILER $ export LD_LIBRARY_PATH=”$JPHOME/bin/linux-x64/ <global.jvm.args>-Xms2000m -Xloggc:${project.build.directory}/gc.log</global.jvm.args> <jvm.args>${global.jvm.args}</jvm.args> <profile> <id>jprofiler</id> <properties> <jvm.args>-agentlib:jprofilerti=offline,id=${jprofiler.profileid},config=${jprofiler.configfile} - Xbootclasspath/a:${jprofiler.home}/bin/agent.jar ${global.jvm.args}</jvm.args> </properties> </profile>
  • 24. REPORTING CHRONOS • Available in maven • eg: mvn site / mvn chronos:report • Generates graphs and a numerical report • Can compare to historical data • Static :(
  • 31. REPORTING BAMBOO JMETER AGGREGATOR • Open source Bamboo plugin (supported!) • James Roper (Atlassian) 20% time project • Can graph JMeter .JTL and CSV files • Dynamic
  • 33. TIPS • Allocate time for fixing tests • Your tests WILL break • Work out a process for fixing bugs • Gather as many artifacts from each test run as possible • React sooner rather than later
  • 34. Q&A gbarnett @ atlassian . com @georgebarnett Code samples online soon! blogs.atlassian.com/developer Meet Atlassian @ The Summit: May 31 - June 2 in SF www.atlassian.com/summit