How execute perfomance tests in a continuous delivery environment
1. ROME 11-12 april 2014ROME 11-12 april 2014
How to execute the performance tests during a build in a
Continuous delivery environment
andrea.bozzoni@gmail.com
it.linkedin.com/pub/andrea-bozzoni/3/2b/911/
Andrea Bozzoni
2. ROME 11-12 april 2014 - Andrea Bozzoni
A few words about me
• Developer with a special passion for architectures,
continuous integration and delivery
• Fifteen years of experience in the development of
applications for the some Italian Public Administrations
(INPS, Poste Italiane, Consip, Ministero del Lavoro, etc…)
• Now working for the European Commission in Bruxelles
3. ROME 11-12 april 2014 - Andrea Bozzoni
Un tipico scenario di progetto
Continuous Integration
Jenkins
Perfomance
JMeter
Gatling
Live Demo
4. ROME 11-12 april 2014 - Speaker’s name
Scenario alla consegna di un progetto software
5. ROME 11-12 april 2014 - Speaker’s name
Quello di cui aveva bisogno
6. ROME 11-12 april 2014 - Speaker’s name
Quello che gli abbiamo consegnato
14. ROME 11-12 april 2014 - Andrea Bozzoni
Continuous integration
Continuous Integration (CI) is a software development practice where
members of a team integrate their work frequently, usually each person
integrates at least daily - leading to multiple integrations per day.
Each integration is verified by an automated build (including test) to
detect integration errors as quickly as possible.
Many teams find that this approach leads to significantly reduced
integration problems and allows a team to develop cohesive software
more rapidly.
Martin Fowler, http://martinfowler.com/articles/continuousIntegration.html
15. ROME 11-12 april 2014 - Andrea Bozzoni
Continuous integration
• Vantaggi
• Verifica costante di eventuali problemi di
integrazione
• Verifica costante dei test unitari
• Verifica costante della qualità del codice
• Disponibilità costante di una build (test, demo e
release)
• Svantaggi
• Occorre un investimento iniziale (individuazione
degli steps da automatizzare, cambio di cultura
nel team)
• Occorre un’ottima suite di test
16. ROME 11-12 april 2014 - Andrea Bozzoni
Continuous integration environment
17. ROME 11-12 april 2014 - Andrea Bozzoni
Integrazioni complesse senza sforzo
18. ROME 11-12 april 2014 - Andrea Bozzoni
• Continuous integration server open source scritto in java
• Supporta la maggior parte dei linguaggi (NET, Ruby, Groovy,
Grails, PHP, …)
• Esistono distribuzioni per la maggior parte degli ambienti
• Ha un’interfaccia semplice ed intuitiva (bassa curva di
apprendimento)
• Architettura estendibie (plugins)
• Consente di effettuare build distribuite
19. ROME 11-12 april 2014 - Andrea Bozzoni
Project delivery pipeline
20. ROME 11-12 april 2014 - Andrea Bozzoni
Performance
In software engineering, performance testing is in general testing
performed to determine how a system performs in terms of
responsiveness and stability under a particular workload. It can also serve
to investigate, measure, validate or verify other quality attributes of the
system, such as scalability, reliability and resource usage.
Load testing
Is the simplest form of performance testing. A load test is usually conducted to
understand the behavior of the system under a specific expected load. This load
can be the expected concurrent number of users on the application performing a
specific number of transactions within the set duration.
Stress testing
Is normally used to understand the upper limits of capacity within the system.
Wikipedia, http://http://en.wikipedia.org/wiki/Software_performance_testing
23. ROME 11-12 april 2014 - Andrea Bozzoni
Performance - Development
24. ROME 11-12 april 2014 - Andrea Bozzoni
Performance
• Definire gli obiettivi
• Velocità
• Stabilità
• Efficienza rispetto alle risorse
• Verificare l’aderenza agli obiettivi
• Acquisizione dati (SO, JVM, Network,
Stress tool)
25. ROME 11-12 april 2014 - Andrea Bozzoni
Performance
• Scenari di business con l’utente
26. ROME 11-12 april 2014 - Andrea Bozzoni
Performance
• Scenari di business con l’utente
28. ROME 11-12 april 2014 - Andrea Bozzoni
• Dotato di una semplice GUI
• Consente in modo semplice di effettuare test su diverse
tipologie di server:
• Web (HTTP/S), Database, SOAP, JMS, Mail
• Portabile (scritto interamente in java)
• Recorder scenario (HTTP Recorder)
• Facilmente estendibile
• Visualizzazione in tempo reale dei test
29. ROME 11-12 april 2014 - Andrea Bozzoni
• DSL specifico per la scrittura degli scenari di tests
• Recorder scenario (HTTP Recorder)
• Consente l’esecuzione di più scenari in un singolo test
• HTML reports per la visualizzazione dei risultati dei tests
• Implementato in Scala
• Usa Async Http Client and Netty for non blocking HTTP
• Usa Akka for actions (requests, pauses, assertions, etc...)
modeling and orchestration
30. ROME 11-12 april 2014 - Andrea Bozzoni
Dotati entrambi di HTTP Recorder