50
Performance Testing Durante y Después PhD. Federico Toledo @fltoledo

Meetup TestingAR 2016 - Performance testing durante y después

Embed Size (px)

Citation preview

Page 1: Meetup TestingAR 2016 - Performance testing durante y después

Performance Testing Durante y Después

PhD. Federico Toledo@fltoledo

Page 2: Meetup TestingAR 2016 - Performance testing durante y después

¿Cómo evitar este trabajo?

• Bomberos solucionando problemas en producción.

Page 3: Meetup TestingAR 2016 - Performance testing durante y después

• Introducción• Performance, testing, distintos enfoques

• A tener siempre en cuenta• Personas, tecnología y metodología

• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales

• Conclusiones

Agenda

Page 4: Meetup TestingAR 2016 - Performance testing durante y después

Agenda

• Introducción• Performance, testing, distintos enfoques

• A tener siempre en cuenta• Personas, tecnología y metodología

• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales

• Conclusiones

Page 5: Meetup TestingAR 2016 - Performance testing durante y después

¿Qué es performance

?

Page 6: Meetup TestingAR 2016 - Performance testing durante y después

TRABAJO ÚTIL

TIEMPO & RECURSOS

VS

Page 7: Meetup TestingAR 2016 - Performance testing durante y después

¿Qué es performanc

e testing?

Page 8: Meetup TestingAR 2016 - Performance testing durante y después

Simular

Sour

ce: h

ttp://

www.

min

iatu

r-wun

derla

nd.d

e/

Page 9: Meetup TestingAR 2016 - Performance testing durante y después

Medir

Page 10: Meetup TestingAR 2016 - Performance testing durante y después

Bottlenecks Punto de Quiebre

Page 11: Meetup TestingAR 2016 - Performance testing durante y después

• Usuarios concurrentes • Proceso

Tipos de Pruebas de Performance

Page 12: Meetup TestingAR 2016 - Performance testing durante y después

• Durante• Agile• Continuous integration • Unit, component• Feedback temprano• Ingeniería de Performance

• Después • Waterfall• Acceptance testing• Simulación de escenario de carga

Performance testing…

Page 13: Meetup TestingAR 2016 - Performance testing durante y después

Agenda

• Introducción• Performance, testing, distintos enfoques

• A tener siempre en cuenta• Personas, tecnología y metodología

• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales

• Conclusiones

Page 14: Meetup TestingAR 2016 - Performance testing durante y después

Agenda

• Introducción• Performance, testing, diferentes enfoques

• A tener siempre en cuenta• Personas, tecnología y metodología

• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales

• Conclusiones

Page 15: Meetup TestingAR 2016 - Performance testing durante y después

A tener siempre en cuenta

Page 16: Meetup TestingAR 2016 - Performance testing durante y después

• Scripting y programación

• Protocolos de comunicación

• Arquitecturas

• Herramientas de monitorización y métricas

• Administración de Redes y Sistemas Operativos

• Conocimiento del negocio y sus riesgos

Personas: hard-skills

Page 17: Meetup TestingAR 2016 - Performance testing durante y después

• Abstracción

• Comunicación

• Análisis

• Percepción

Personas: soft-skills

Page 18: Meetup TestingAR 2016 - Performance testing durante y después

Como dice Scott Barber:

A good performance tester should be a “mid-level” in everything.

http://www.perftestplus.com/resources/pt_for_managers_ppt.pdf

Personas

Page 19: Meetup TestingAR 2016 - Performance testing durante y después

A tener siempre en cuenta

Page 20: Meetup TestingAR 2016 - Performance testing durante y después

Technología

Page 21: Meetup TestingAR 2016 - Performance testing durante y después

• Simulación • JMeter (jmeter.apache.org)• Taurus (gettaurus.org)• BlazeMeter (blazemeter.com)• Gatling (gatling.io)• Usábamos OpenSTA (opensta.org) pero quedó sin

mantenimiento

• Medición • Profilers y similar (JVisualVM, JProfiler, dotTrace)• Herramientas a nivel de Sistema Operativo

(NMON, perfmon, Netdata)• APMs (AppDynamics, NewRelic, DataDog)

Technología – Server Side

Page 22: Meetup TestingAR 2016 - Performance testing durante y después

Technología

Page 23: Meetup TestingAR 2016 - Performance testing durante y después

• Web• Page Speed• Yslow• monkeytest.it• APMs

• Desktop• Perfmon o NMON • Profilers Java o .NET

• Mobile• Google Test Cloud / Testdroid / Perfecto• Xcode - Instruments / XCTest• APMs• Monkop

Technología – Client Side

Page 24: Meetup TestingAR 2016 - Performance testing durante y después
Page 25: Meetup TestingAR 2016 - Performance testing durante y después
Page 26: Meetup TestingAR 2016 - Performance testing durante y después
Page 27: Meetup TestingAR 2016 - Performance testing durante y después

Encuentro GeneXus Marca Fotocasa La Liga VivaVideo

Monkop - Exploraciones

Page 29: Meetup TestingAR 2016 - Performance testing durante y después
Page 30: Meetup TestingAR 2016 - Performance testing durante y después
Page 31: Meetup TestingAR 2016 - Performance testing durante y después

A tener siempre en cuenta

Page 32: Meetup TestingAR 2016 - Performance testing durante y después

• Diseño de prueba

• Automatización

• Ejecución y medición

Proceso / metodología

Page 33: Meetup TestingAR 2016 - Performance testing durante y después

• Plan de ejecución• Baseline (sin concurrencia)

• Para tener de referencia• Iterativo e incremental

• Problemas más graves se hacen visible primero

Servidor WebServidor Web

Servidor WebServidor Web

Proceso / metodología

Page 34: Meetup TestingAR 2016 - Performance testing durante y después

¿Cómo analizar problemas de performance?• Encontrar forma de reproducir• Asegurarse que el problema no es la prueba• Hacer un cambio a la vez• Changelog / bitácora para tener trazabilidad entre

cambios y cómo afectó

Tuning / ajuste

Bajan tiempos de respuesta x%

Cambio en una funcionalidad

Uso de CPU aumentó X%

Proceso / metodología

Icons by Gregor Črešnar, Jamie Wilson, Shmidt Sergey, Icon Fair. Source: https://thenounproject.com/

Page 35: Meetup TestingAR 2016 - Performance testing durante y después

• Los 5 ¿por qué? Para ir de síntomas a causas

• El Sistema anda lento• ¿Eso es síntoma o causa? ¿Por qué anda lento?

• Porque el Sistema tarda 15 segundos en completar• ¿Por qué?

• Porque el componente de acceso a datos está demorando todo ese tiempo

• ¿Por qué?• Porque hay SQL’s que tardan mucho

• ¿Por qué?• Porque en el entorno no se creó un índice

fundamental en esas consultas • Entonces, ¡crear el índice!

Proceso / metodología

Page 36: Meetup TestingAR 2016 - Performance testing durante y después

Agenda

• Introducción• Performance, testing, diferentes enfoques

• A tener siempre en cuenta• Personas, tecnología y metodología

• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales

• Conclusiones

Page 37: Meetup TestingAR 2016 - Performance testing durante y después

Agenda

• Introducción• Performance, testing, diferentes enfoques

• A tener siempre en cuenta• Personas, tecnología y metodología

• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales

• Conclusiones

Page 38: Meetup TestingAR 2016 - Performance testing durante y después

• La mayoría de nuestros clientes nos piden por “simulación de carga” justo antes de salir en producción.

• Principales motivaciones:• Nueva versión con nuevas funcionalidades • Nueva arquitectura (win to web, web to mobile)• Campañas de Marketing• Un banco que absorbe a otro

• Solo algunos piden acompañarlos durante el desarrollo (en los últimos años)

• Por eso decidimos comparar los dos enfoques

¿Qué es lo que se usa?

Page 39: Meetup TestingAR 2016 - Performance testing durante y después

PROS1.Más fácil de planificar2.Ambiente similar a producción3.Foco en un contexto específico

CONS4. Disponibilidad de la infraestructura5. Riesgo de altos costos por cambios

arquitectónicos

Performance Testing al Final

Page 40: Meetup TestingAR 2016 - Performance testing durante y después

PROS1. Minimizar riesgo2. Feedback temprano y constante

• Pruebas tempranas (unidades, componentes)• Integración continua

3. Aprendizaje continuo • Monitorización y análisis• Buenas y malas prácticas

CONS4. Mayor esfuerzo de automatización

• Prestar atención en qué nivel automatizamos5. Falacia de la Composición:

• Test(A)+Test(B)=Test(A+B)• Si se prueban los componentes entonces el

sistema integrado funcionará apropiadamente.

Performance Testing durante el desarrollo

Page 41: Meetup TestingAR 2016 - Performance testing durante y después

Agenda

• Introducción• Performance, testing, diferentes enfoques

• A tener siempre en cuenta• Personas, tecnología y metodología

• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales

• Conclusiones

Page 42: Meetup TestingAR 2016 - Performance testing durante y después

Agenda

• Introducción• Performance, testing, diferentes enfoques

• A tener siempre en cuenta• Personas, tecnología y metodología

• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales

• Conclusiones

Page 43: Meetup TestingAR 2016 - Performance testing durante y después

¿Qué enfoque es mejor?

Deberíamos cambiar la pregunta…

Conclusiones

Page 44: Meetup TestingAR 2016 - Performance testing durante y después

• ¿Necesitas verificar que el sistema soporta determinada carga?

• ¿Necesitas evidencia de prueba para tus clientes?

• ¿Querés analizar el impacto de un cambio en producción?

SIMULACIÓN DE CARGAAl final

WATERFALL

¿Qué enfoque es mejor?

Page 45: Meetup TestingAR 2016 - Performance testing durante y después

• ¿Querés optimizar costo y reducir riesgos de performance?

• ¿Querés incrementar el conocimiento del equipo y mejorar las prácticas y habilidades?

• ¿Querés incluir performance en tu integración continua?

INGENIERÍA DE PERFORMANCE Durante el desarrollo

AGILE

¿Qué enfoque es major?

Page 46: Meetup TestingAR 2016 - Performance testing durante y después

• Necesitamos los dos enfoques en distintos momentos.

• Comenzar temprano con ingeniería de performance y preparar una prueba de aceptación al final, justo antes de poner en producción.

¿Qué enfoque es mejor?

Page 47: Meetup TestingAR 2016 - Performance testing durante y después

¡Gracias!

PhD. Federico Toledo@fltoledo

Performance Testing Durante y Después

Page 50: Meetup TestingAR 2016 - Performance testing durante y después

• Certificación en testing de performance usando JMeter y BlazeMeter.

• Curso online de un mes de duración. • www.abstracta.us/performance-testing-certification

• 25% de descuento usando este cupón TESTINGAR-MEETUP este mes.

Abstracta Academy