testingtools (sector financiero) · pdf fileiso8583 trn01_comprascuotas trn02_comprascontado...

37
Testing Tools (Sector Financiero) María Elisa Presto Matías Nassi {mpresto, mnassi}@ces.com.uy Testing Day, Mayo 2011

Upload: dangbao

Post on 13-Mar-2018

231 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Testing Tools (Sector Financiero)

María Elisa PrestoMatías Nassi

{mpresto, mnassi}@ces.com.uy

Testing Day, Mayo 2011

Page 2: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Agenda

Pruebas Pruebas de

Testing Day, Mayo 2011

ContextoPruebas

funcionalesPruebas de performance

Page 3: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Agenda

Pruebas Pruebas de

Testing Day, Mayo 2011

ContextoPruebas

funcionalesPruebas de performance

Page 4: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

En dónde estamos…

Testing Day, Mayo 2011

Local de cobranza

ContextoPruebas

funcionalesPruebas de performance

Page 5: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

ISO 8583

� Provee reglas para definir transacciones financieras:� Compras

� Pagos

Testing Day, Mayo 2011

� Pagos

� Devoluciones

� …

� Más que un protocolo, una familia de protocolos…

ContextoPruebas

funcionalesPruebas de performance

Page 6: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Pruebas Pruebas de

Testing Day, Mayo 2011

ContextoPruebas

funcionalesPruebas de performance

Page 7: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Protest

PlanificaciónDiseño de las Pruebas

Configuración Evaluación y Cierre

Ejecución

Ciclo de Prueba

Seguimiento y Control

Page 8: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Pruebas funcionales

� Objetivo

� Confiabilidad (Reliability)

� Robustez (Robustness)

� Funcionalidad� Funcionalidad

Testing Day, Mayo 2011

ContextoPruebas

funcionalesPruebas de performance

Page 9: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Diseño de pruebas

� Ejemplo

� Ingresar un pago

� 400 $u

� Tarjeta nº 491XX54X0XX13X95� Tarjeta nº 491XX54X0XX13X95

� Vencimiento mayo 11

� …

Testing Day, Mayo 2011

Armar el mensaje ISO 8583, enviarlo, recibir la respuesta

ContextoPruebas

funcionalesPruebas de performance

Page 10: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Mensaje ISO 8583 (2)<field id="0" value="0200"/>

<field id="2" value=“491XX54X0XX13X95"/>

<field id="3" value="000000004000000000"/>

<field id="4" value=""/>

<field id="7" value="0515065709"/>

<field id="11" value="002485"/>

<field id="14" value="1105"/>

<field id="18" value="5541"/>

Pago

MontoNro de tarjeta

<field id="19" value="858"/>

<field id="22" value="9010"/>

<field id="25" value="00"/>

<field id="32" value="491954"/>

<field id="35" value=" 491XX54X0XX13X95=110510118611143"/>

<field id="37" value="013506002485"/>

<field id="41" value="20900027"/>

<field id="42" value="0001358001 "/>

<field id="43" value=“COMERCIO LAGOMARLAGOMARUY"/>

<field id="45" value="B49155542010895186110143000000"/>

<field id="49" value="858"/>

Testing Day, Mayo 2011

Moneda de la transacción

ContextoPruebas

funcionalesPruebas de performance

Page 11: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Enviar y recibir

� No se cuenta con una interfaz gráfica

� Alternativas

� Codificar cada caso de prueba

� Construir una herramienta a medida

Testing Day, Mayo 2011

� Construir una herramienta a medida

ContextoPruebas

funcionalesPruebas de performance

Page 12: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

ISO Test tool (1)

� Configurable

Testing Day, Mayo 2011

ContextoPruebas

funcionalesPruebas de performance

Page 13: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

ISO Test tool (2)

� Interfaz gráfica

Mensaje ISO respuesta

Testing Day, Mayo 2011

ContextoPruebas

funcionalesPruebas de performance

Page 14: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

ISO Test tool (3)

� Interfaz gráfica “amigable”

Testing Day, Mayo 2011

ContextoPruebas

funcionalesPruebas de performance

Page 15: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Pruebas Pruebas de

Testing Day, Mayo 2011

ContextoPruebas

funcionalesPruebas de performance

Page 16: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Pruebas de Performance

� Objetivos

� Problemas

� Metodología• Relevamiento

Testing Day, Mayo 2011

• Relevamiento

• Automatización� Herramientas

• Armado de infraestructura

• Ejecución� Herramientas

ContextoPruebas

funcionalesPruebas de performance

Page 17: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Objetivos

� Analizar performance de switch financiero• Ejecutar carga

� Basada en throughput esperado

• Simular la realidad

Testing Day, Mayo 2011

• Simular la realidad� Diferentes tarjetas

� Infraestructura de producción

• Recopilar� Tiempos de respuesta

� Throughput real (empírico)

• Analizar resultadosContexto

Pruebas funcionales

Pruebas de performance

Page 18: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Problemas

� Simulación manual impracticable • Necesitamos

� Gran cantidad de ATM/POS• PC fácil de conseguir, ATM no tanto…

� Tarjetas válidas

Testing Day, Mayo 2011

� Tarjetas válidas

� Personas que realicen trx

� Sincronización de las pruebas

� Repetibilidad de las pruebas

� Incremento de carga

� Simulación automatizada• No hay herramientas Open Source

ContextoPruebas

funcionalesPruebas de performance

Page 19: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Metodología

� Etapas• Relevamiento

• Automatización

• Infraestructura

Testing Day, Mayo 2011

• Infraestructura

• Ejecución de pruebas

Relevamiento Automatización Infraestructura Ejecución

ContextoPruebas

funcionalesPruebas de performance

Page 20: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Relevamiento

� Definir subconjunto transacciones• Compras

� Cuotas

� Contado

• Retiros

Testing Day, Mayo 2011

• Retiros

• Depósitos

• …

ContextoPruebas

funcionalesPruebas de performance

Page 21: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Relevamiento

� Definir escenario (1h)

Escenario 100%

71200

Testing Day, Mayo 2011

Throughput (tps) % # Iteraciones

ComprasCuotas20

85 61200

ComprasContado 10 7200

Retiros 5 3600

ContextoPruebas

funcionalesPruebas de performance

Page 22: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Automatización

� Generalmente generación de scripts

� En este caso• Automatización por datos

� Desarrollo herramienta

Testing Day, Mayo 2011

� Desarrollo herramienta• Message Generator

• Genera flujo de paquetes en base a� Plantilla ISO8583 con “huecos”

� Datos que rellenan esos huecos

ContextoPruebas

funcionalesPruebas de performance

Page 23: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Automatización

� Plantilla de paquete ISO8583

Testing Day, Mayo 2011

ContextoPruebas

funcionalesPruebas de performance

Page 24: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Automatización

� Datos a utilizar• Provistos por el cliente

• Rellenarán variables en plantilla

Testing Day, Mayo 2011

ContextoPruebas

funcionalesPruebas de performance

Page 25: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Automatización

+

� Flujo de paquetes ISO8583

Testing Day, Mayo 2011

� Flujo de paquetes ISO8583• Serán entrada de generadora de carga

ContextoPruebas

funcionalesPruebas de performance

Page 26: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Automatización

Message

(Plantilla ISO,Datos) Flujos

ISO8583TRN01_ComprasCuotas

TRN02_ComprasContado

Testing Day, Mayo 2011

MessageGenerator

ContextoPruebas

funcionalesPruebas de performance

TRN02_ComprasContado

TRN03_Retiross

Page 27: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Infraestructura

� Analizar la infraestructura• JPos

• HSM (Hardware Security Module)

• Tandem

Testing Day, Mayo 2011

• Tandem

ContextoPruebas

funcionalesPruebas de performance

Page 28: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Infraestructura

� Donde apuntar la carga?

� Lo ideal• Involucrar todos los componentes

Testing Day, Mayo 2011

� No siempre es posible…• Componentes no disponibles

� Configuración

� Adquisición

� Utilización

• Diferentes formatos de entradaContexto

Pruebas funcionales

Pruebas de performance

Page 29: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Ejecución

� Desarrollo herramienta• ISO Load Generator

• Características deseables� Generación de carga con throughput configurable

Testing Day, Mayo 2011

� Generación de carga con throughput configurable

� Adaptable al contexto/proyecto

� Medir tiempos

� Verificar respuestas

• Importante testearla!� Propia herramienta no puede ser cuello de botella

ContextoPruebas

funcionalesPruebas de performance

Page 30: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Ejecución

� Fichero de configuración de escenario• Para cada trx

� Throughput (TPS)

� Cantidad de iteraciones

� (Host,Puerto)

Testing Day, Mayo 2011

� (Host,Puerto)

� Fichero ISO8583

� …

ContextoPruebas

funcionalesPruebas de performance

Page 31: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Ejecución

Testing Day, Mayo 2011

� Cada tarea representa una txn a testear

� Funcionamiento• Consume paquetes ISO de los flujos generados

• Envía paquetes contra el switch

• Obtiene respuesta y tiempos de la misma

ContextoPruebas

funcionalesPruebas de performance

Page 32: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Ejecución

TRN01_ComprasCuotas

Flujos de paquetes ISO8583

17/s

Testing Day, Mayo 2011

TRN02_ComprasContado

TRN03_Retiros

2/s

1/s

ISOLoad

Generator

ContextoPruebas

funcionalesPruebas de performance

Page 33: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Resumen

� Contexto

� Pruebas Funcionales

� Pruebas de Performance

Testing Day, Mayo 2011

Page 34: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Links y contacto

� Sitio del CES• http://www.ces.com.uy/

� Blog del CES• http://blog.ces.com.uy

� Twitter� Twitter• @ces_com_uy

� Contactos• María Elisa Presto

[email protected]

• Matias Nassi� [email protected]

Page 35: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Otras charlas

� 10:30 hs

• Presentación de la Carrera de Testing

� 16:10 hs

• Contratando a un tester• Contratando a un tester

� 18:30 hs

• Mesa Redonda: Perspectiva

Page 36: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

Testing Day, Mayo 2011

Page 37: TestingTools (Sector Financiero) · PDF fileISO8583 TRN01_ComprasCuotas TRN02_ComprasContado Testing Day, Mayo 2011 Generator Contexto Pruebas funcionales Pruebas de

¡MUCHAS GRACIAS!

{mpresto, mnassi}@ces.com.uy