Reverse engineering of gui models
Upcoming SlideShare
Loading in...5
×
 

Reverse engineering of gui models

on

  • 1,435 views

Reverse Engineering of GUI Models for Testing

Reverse Engineering of GUI Models for Testing

Statistics

Views

Total Views
1,435
Views on SlideShare
1,435
Embed Views
0

Actions

Likes
0
Downloads
13
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Aqui irá estar a estrutura da apresentação
  • Nowadays’ software systems GUIs. GUIs are the mediators between systems and usersquality is a crucial point in the users’ decision of using them. GUI testing is a critical activity aimed at finding defects in the GUI or in the overall applicationHowever, GUI testing is a very time consuming V&V activity. The application of model-based testing techniques and tools can be very helpful to systematize and automate GUI testing. Still, the effort required to construct a detailed and precise enough model for testing purposes, by an automated reverse engineering process.
  • An Automated Model-Based User Interface Testing Environment – AMBER iTestO meutrabalhoinsere-senumprojecto de maiorambito.Aplicação de Técnicas de Testes Baseados em Modelosaos testes de InterfacesQueresulta da parceria entre a Critical Sw e a FEUP
  • Os objectivos são dimnuir o esforço necessário para a contrução do modelo.Automatizar o processo de exploração Extrair as - Informações Estruturais das janelas da aplicação - Gravar os passos necessários para navegar entre diferentes janelas da aplicação - Descobrir diferentes conportamentos nas janelas da aplicação – isto é, descobrir as dependências entre objectos da interface gráficaComo output do meu trabalho Surge o modelo Spec#(Sharp) devido à utilização da ferrramenta Spec Explorer k permite uma automatização do processo de geração e execução de testes
  • Static Approach, in which the static representations of the system (source code) are analysed without executing the system. The static approach requires access to the source code of the system, which is not always available. Static approaches are particularly well suited for extracting information about the internal structure of the system and dependencies among structural elements;Dynamic approach, the system is executed and its external behaviour is analysed. Dynamic approaches are the only option when the source code is not available. They are well suited to extract the physical structure of the system GUI and some of its behaviour, but are more difficult to automate. We focus on dynamic approaches because our goal is to extract information for black-box testing purposes.
  • Conformeditoanteriormente o objectivo principal é diminuir o esforçopara a construção do modelo da GUI para testes baseados em modelos.A ferramentaapresentada é capaz de construir um modelopreliminar em Spec# atraves da interacção com a GUI. AS informaçõesobtidaspeloprocesso de engenhariareversa é guardado em XML sendo e seguidaconvertidopara Spec#(Sharp). Mas o facto de termos um códigointermédio do XML permite a exportaçãoparaoutraslinguagensmaisfacilmente. Começamosporcapturar as informaçõesestruturais da GUI (the hierarchical structure of windows and interactive controls within windows, their properties and navigation map) e tambemalgumainformaçãocomportamental. Em seguida o modelopreliminarobtido é completado e validadomanualmente.Dps é usadoparacriaruma suite de testes automaticamenteusando a ferramenta Spec Explorer. A execução de testes tb é suportadopelo Spec Explorer. Para os testesseremexecutado é ncessárioinformação de mapeamento entre as acções do modelo e as acçãoconcretas da aplicação. Estainformação é recolhidadurtante o processo deengenhariareversa e podesercompletamanualmentesendogravadanumficheiro XML. Na execução dos testes asacçõestantosaoexecutadasnaespecificaçãotantocomonaaplicação. Nummodo de “lock-step”comparandoosresultadosobtidos. Sempre k ocorraumainconsistencia, esta é reportada. Defeitosencontradossaocorrigidossendo em seguidaexecutadauma nova iteração do processo.
  • Explicar o Algoritmo
  • Explicar o Algoritmo
  • Explicar o Algoritmo
  • Algoritmo de Detecção das Dependencias
  • Em seguida um caso prático que valida a abordagem proposta.
  • Explicar o XML -> Identificar na Janela
  • Explicar o XML -> Identificar na Janela
  • Explicar o XML -> Identificar na Janela
  • Um extracto do Modelo gerado em Spec#
  • In our experiments, by using the REGUI tool, 50% (on average) of the Spec# model was generated automatically.
  • Uma ferramenta……
  • Implementação de novos algoritmos para aumentar o conjunto de dependências e controlos suportadosMelhorar o modelo produzido -> Tornando-o + completo.
  • Espero k a minha apresentação não tenha sido longaK não se tenham morrido de aborrecimento, e k não vos tenha passado pela cabeça destruir o projector E passamos agora para a fase da discussão …

Reverse engineering of gui models Reverse engineering of gui models Presentation Transcript

  • Reverse Engineering of GUI Models for Testing
    André M. P. Grilo, Ana C. R. Paiva, João Pascoal Faria
    CISTI 2010
  • Contents
    Introduction
    Reverse Engineering Approaches
    Reverse Engineering and Testing Process
    REGUI Tool
    Case Study
    Conclusions
    CISTI 2010
  • Motivation
    CISTI 2010
  • Context
    CISTI 2010
    AMBER iTest
    Visual modelling
    m()pre
    post
    {body}
    Visual to formal model translation
    UML visual model
    new
    oracle
    Model to implementation mapping
    Reverse Engineering
    Coverage information
    Test case
    generation
    GUI mapping code & data (adapter)
    Test coverage analysis
    SpecExplorer
    new
    new
    Test
    Execution
    REGUI Tool
    GUI Application
    Under Test
    Test
    suite (abstract)
    Spec Explorer
    Test results
  • Objectives
    CISTI 2010
    Diminish effort required to construct the model
    Automate the interactive exploratory process
    Extract:
    Structural Information
    Navigation Steps
    Behaviour
    Produce a Spec# Model
  • Static Approach
    Dynamic Approach
    CISTI 2010
    Reverse Engineering Approaches
  • Reverse Engineering and Testing Process
    CISTI 2010
  • Description of the Algorithm (1/2)
    CISTI 2010
    Phase One
  • Description of the Algorithm (2/2)
    CISTI 2010
    Phase Two
  • Description of the Algorithm (3/3)
    CISTI 2010
    Phase Three
  • Rules to Infer Behaviour
    CISTI 2010
  • REGUI Tool
    CISTI 2010
  • Case Study
    CISTI 2010
  • Structural Information
    CISTI 2010
  • Navigational Steps
    CISTI 2010
  • Inferring Dependencies
    CISTI 2010
  • Spec# Model
    //Notepad window
    [Action] void SetTextDocument(string typedText)
    modifies Document.text && MenuItemFind.IsEnabled;
    requiresIsEnabled("Notepad");
    { //TODO}
    [Action] void MenuItemFind()
    requires text!="" && IsEnabled("Notepad") ;
    ensuresIsOpen("Find"));
    { //TODO}

    //Find dialog
    [Action] void SetTextFindWhat(string str)
    modifies TextFindWhat.text && ButtonFindNext.IsEnabled;
    requiresIsEnabled("Find");{
    TextFindWhat.text = str;
    }
    [Action] void FindNext()
    requiresIsEnabled("Find");
    { //TODO}

    CISTI 2010
  • Conclusions
    Presented a new technique to obtain a model of the GUI’s structure and some of its behaviour.
    Model kept in a XML file Spec#
    The reverse engineering process
    combines automatic with manual exploration which solves some of the “blocking problems” found in the approaches
    Using the REGUI tool, the effort in the construction of the GUI model was reduced
    CISTI 2010
  • Main Contributions
    A New Reverse Engineering Approach
    A REGUI Tool
    CISTI 2010
  • Future Work
    Implement new algorithms to extend the set of dependencies among GUI objects found automatically by the tool;
    We also intend to validate the approach with more complex software applications.
    CISTI 2010
  • CISTI 2010
  • Thanks for your time
    CISTI 2010
  • CISTI 2010