+ All Categories
Home > Documents > Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf ·...

Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf ·...

Date post: 24-Jun-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
20
Tanja E. J. Vos (Urko Rueda, Francisco Almenar , Mirella Oreto, Anna Esparcia) Software Testing and Quality Group (StaQ) Research center for Software Production Methods (PROS) Universidad Politecnica de Valencia Spain Test Automation at the useR interface level
Transcript
Page 1: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

Tanja E. J. Vos

(Urko Rueda, Francisco Almenar, Mirella Oreto, Anna Esparcia)

Software Testing and Quality Group (StaQ)Research center for Software Production Methods (PROS)

Universidad Politecnica de ValenciaSpain

Test Automation at the useR interface level

Page 2: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

• TESTAR

– Una herramienta para el testeo automatizado a nivel de interfaz de usuario

• NO ES Capture/Replay– Captura la interacción del usuario con la IU y almacena un script que puede ser reproducido

durante el testeo de regresión– Cambios en la IU (en tiempo de desarrollo y de ejecución)– Ruptura de tests de regresión automatizados– Gran problema de mantenimiento

• NO ES testeo Visual– Basado en reconocimiento de imágenes– Fácil de entender, habilidades de programación no requeridas– Resuelve la mayoría de los problemas de mantenimiento– Introduce problemas adicionales

• Rendimiento de procesamiento de imágenes• Falsos positivos y falsos negativos

– La ambigüedad asociada con los localizadores de imágenes– Imprecisión de reconocimiento de imágenes alimentada en los oráculos

Resultado de I+D de la UPV centro PROS

Page 3: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

Resultados de I+D de la UPV centro PROS

• Testing basado en Modelos -- TESTAR– Basado en inferencia automática de modelos en árbol de la IU

– Secuencias de test derivadas automáticamente desde el modelo

– Las secuencias ejecutadas pueden ser reproducidas

– Si la IU cambia también lo hace el modelo/tests -> se elimina el problema demantenimiento de los tests

– Necesario: habilidades de programación para definir oráculos potentes

• Más investigación si esto supone realmente un problema …

• ¿Queremos que los testeadores tengan habilidades de programación?

type: TButton

...rect: [15, 25, 65, 55]

hasFocus: trueenabled: falsetitle: "Button"

Window

Button Text SliderMenu

MI MI MI MI

type: TMenuItem

...title: "File"

ABC

Page 4: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

• La IU es donde se concentra toda la funcionalidad

– Testeo de Integración / Sistema

• La mayoría de aplicaciones tienen IUs

– Ordenadores, tabletas, smartphones, ….

• Fallos que aparecen a nivel de IU son importantes

– Estos son los que encuentra tu cliente -> testea desde su perspectiva!

• Sin necesidad de código fuente

– Pero si lo tenemos, tanto mejor ;-)

¿Por qué es útil?

Page 5: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

5

STARTSUT

SCAN GUI +OBTAIN

WIDGET TREE

moreactions?

Domain Experts

DERIVE SETOF USERACTIONS

EXECUTEACTION

calculatefitness of test

sequence

No

Yes

ActionDefinitions

OracleDefinition

STOPSUT

SUT

optionalinstrumentation

Replayable Erroneous Sequences

ORACLEFAULT?

Yes

No

more sequences?

SELECTACTION

Cómofunciona ...

Page 6: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

6

Widget Tree

Page 7: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

Basicamente: TODOS

Applicaciones que respetan laAPI de accessibilidad delsistema operativo en que seejecuta el spftwar

¿Que tipo de software?

GUI state, FaultsRuntime data Test Suites

ABSTRACTION LAYER

Te

st

Ex

ec

utio

n

Te

st

Ev

alu

ati

on

Te

st

Ex

ec

utio

n

Test

Eva

luati

on

Te

st

Ex

ec

utio

n

Test

Eva

luati

on

Te

st

Ex

ec

utio

n

Test

Eva

luati

on

What do youneed??

Test Suite Generator

Abstract Representation(WIDGET TREE)

AbstractOracles

CheapOracles

FreeOracles

Page 8: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

How to set it up for a specific SUT

8

1) Planning Phase:a) Implementation of Test Environment: Recognize all the UI elements

b) Anticipate and identify potential fault patterns: what errors do we wantto find:

• Detect crashes is for free and automatically

• Suspicious output or messages is easy (regular expression)

• Functionality as defined in the specifications (need oracle programming)

Test the SUTTest the SUT

ImplementImplement

PlanPlan

Page 9: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

How to set it up for a specific SUT

9

2) Implementation Phase:a) Oracle Implementation

• Implement the detection of the errors defined in the previous step.

b) Action Definition Implementation

c) Implementation of stopping criteria

Test the SUTTest the SUT

ImplementImplement

PlanPlan

Page 10: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

How to set it up for a specific SUT

10

3) Testing Phase: run the test to find errors in the SUT

Test the SUTTest the SUT

ImplementImplement

PlanPlan

Page 11: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

Herramienta TESTARREADY

11

Establecer cómo se iniciala aplicación a probar

Page 12: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

Herramienta TESTARSET

12

Filtro:

1) Acciones no deseadas,p.e. cierre de la aplicación

2) Procesos no deseados,p.e. Paneles de ayuda enAcrobat, etc…….

Page 13: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

13

GO!

Page 14: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

100% Automatico – no effort

• Crashes

• Bloqueos de programa

Page 15: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

15

Expresión Regular

• Diálogos de mensajecríticos

• Output sospechoso

Page 16: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

Expresion regular – muy poco effort

• Simplemente con expresiones regulares

• Por ejemplo:

.*NullPointerException

.*|[Ee]rror|[Pp]roblem

Page 17: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

Más sofisticación necesita trabajo

• Acciones– Detección de acciones

– Selección de acciones

– A veces, un proceso de prueba y error

• Selección aleatoria = como un niño, pero mucho más rápido

• Imprimiendo, copiando ficheros / moviendo / borrando

• Lanza otros Procesos

• Gestión de permisos, cuentas de usuario dedicadas, acciones denegadas

• Oráculos que necesitan programación

Page 18: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

¡Ya lo hemos usado con éxito!

• Para varias aplicaciones de Microsoft Office

• Para probar TESTONA (Testeo Basado en Árboles Combinatorios) enBerner&Mattner (Alemania)

• Para PINEA/Clavei (Alicante) y su Enterprise Resource Planning (ERP)systems for SMEs (versión de escritorio)

• Aplicación web en PHP (back-end de Modelio Modeller) de SOFTEAM(Francia)

Page 19: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

It can automaticallygenerate tests that find

interesting errors!

TESTARin working environment

ACADEMIA

DEPLOY

ASSIST

ADOPT

What if company hasno knowledge of TESTAR and we deal

with mature software?

TESTARfor mature software product

ACADEMIA

ASSIST

DEPLOY

It can automaticallygenerate tests that find

interesting errors!

ADOPT

Can the company do it by its own?

DEVELOP

ACADEMIA

Trainingmaterial

TESTARfor mature software productACADEMIA

DEPLOY

TRAIN

ADOPT

ACADEMIC

IMPROVE

Tool &Trainingmaterial

InternalInnovation

transfer withincompany thatwas part of

development

ExternalInnovation

Transfer basedon close

academia-industry

collaboration

ExternalInnovation

Transfer whereacademia role is

reduced totraining thetechnology

DE

CR

EA

SIN

GIN

VO

LVE

ME

NT

OF

TE

CH

NO

LO

GY

DE

VE

LO

PE

RS

B&M

CLAVEi

SOFTEAM

B&M

CLAVEi

SOFTEAM

It can automaticallygenerate tests that findinteresting errors andthe learning curve is

acceptable!

Page 20: Test Automation at the useR interface leveliwt2.org/wp-content/uploads/2015/05/2-UPV-TESTAR.pdf · Button Text Menu Slider MI MI MI MI typ e: TMenuI m... title: "File" ABC • La

• Tanja E. J. Vos

• correo: [email protected]

• twitter/skype: tanja_vos

• web: http://staq.dsic.upv.es/

• teléfono: +34 690 917 971


Recommended