Testes de Software em Sistemas Multi-Agentes

Slides:



Advertisements
Apresentações semelhantes
RCAAP Project João Mendes Moreira, FCCN Berlin 7, Paris, 04/12/2009.
Advertisements

Laboratório de Sistemas Distribuídos (LSD) – Universidade Federal de Campina Grande (UFCG)EELA Grid School – December 04, 2006 Enhancing SegHidro/BRAMS.
Euro IT Technology Car Rental Management Software
Chapter Six Pipelining
INPAs insights on LBA (and its role as the coordinating institution): (based on and the message from INPAs General Director, Dr Adalberto Val, and on former.
Novas Tecnologias Microsoft.
Copyright no direito americano: o caso Leslie Kelly v. Arriba Soft Corp. 1.
1 O direito americano A análise das excepções concentra-se no fair use: o direito americano permite a um utilizador exigir o acesso à obra e a sua reprodução.
Engenharia de Software Prof ª. Isabel Sofia de Brito Prof ª. Maria Fernanda Pedro.
Projeto Maven AcademicNet Grupo DGMR Daniel Isidoro Born Guilherme Amaral Márcio Percilio Roberto Rutz.
Projeto de Sistemas de Software Luana Lachtermacher
Andrew Diniz da Costa Trabalhos de Pesquisa Andrew Diniz da Costa
The use of Interaction Laws on Air Traffic Control for Specifying Dependable Interactions Rodrigo Paes
Agent Reputation Trust (ART) Testbed Andrew Diniz da Costa
Engineering Law-Governed Approaches Maintainability Concerns - Interaction Laws Gustavo Carvalho, Carlos Lucena Seminar Dependability.
A Framework to Implement Self-Adaptive Agents that Apply Self-Test Andrew Diniz da Costa
Multi-Agent System Modeling Language (MAS-ML) Viviane Torres da Silva Ricardo Choren Carlos J. P. de Lucena Palestrante: Andrew Diniz da Costa.
Java RMI Alcides Calsavara. Objetivos Permitir que um método de uma classe Java em execução em uma máquina virtual JVM chame um método de um objeto (instância.
Arquitetura de Aplicações Web
MC Prof. Paulo Cesar Centoducatte MC542 Organização de Computadores Teoria e Prática.
MC Prof. Paulo Cesar Centoducatte MC542 Organização de Computadores Teoria e Prática.
Work Breakdown Structure - Exemplos orientados a Deliverables
April 05 Prof. Ismael H. F. Santos - 1 Basic OO Programming with C++ Prof. Ismael H F Santos.
April 05 Prof. Ismael H. F. Santos - 1 Advanced OO Programming with C++ Prof. Ismael H F Santos.
Técnicas e Projeto de Sistemas André Mesquita Rincon Processo de Software Técnico Subsequente – Módulo III.
SQL Procedural Junho/2006.
Trac é uma ferramenta open source e de interface web para controle de projetos de desenvolvimento de software. O objetivo do software é ajudar o desenvolvedor.
Modelando com UML CMP 231 – Sistemas Embarcados
Servidores e Programação Web Redes de Computadores.
Supply Chain Management
O Fluxo de Testes © Alexandre Vasconcelos
Curso de Engenharia Industrial Madeireira – UFPR Prof. Umberto Klock
"Tudo o que acontece, acontece em algum lugar." Gilberto Câmara - INPE Gilberto Câmara - INPE.
GT Processo Eletrônico SG Documentos Eletrônicos Segunda reunião – 28/08/2009 Interlegis.
II – Gestão da Infraestrutura Tecnológica Tecnologias de Informação e Comunicação em Desenvolvimento de Produtos II – Gestão da Infraestrutura Tecnológica.
Building a fuzzy ontology plugin for Protégé
Data Mining: Ferramenta JAVA
Uniform Resource Identifier (URI). Uniform Resource Identifiers Uniform Resource Identifiers (URI) ou Identificador de Recursos Uniforme provê um meio.
Protocolo HTTP.
Seminário Final – Módulo Algoritmo de Merge
Seminário Final Lab. de Gerência de Configuração Grupo 5 André Ribeiro Coelho Rafael de Souza Santos.
SECEX SECRETARIA DE COMÉRCIO EXTERIOR MINISTÉRIO DO DESENVOLVIMENTO, INDUSTRIA E COMÉRCIO EXTERIOR BRAZILIAN EXPORTS STATISTICAL DEPURATION SYSTEM Presentation.
Usando Java no Oracle Por Edson Almeida Junior
OER LIFE CYCLE Andrew Moore and Tessa Welch.
Tópicos Especiais em Aprendizagem Reinaldo Bianchi Centro Universitário da FEI 2012.
Uma Introdução à Modelação de Processos com UML... José Borbinha.
Curso Gestão Estratégica de Dívida Pública para os Estados Workshop on Debt Management Strategies for Brazilian Subnationals Jorge Luís Tonetto CONFAZ/GEFIN.
INPE / CAP-315 Airam J. Preto, Celso L. Mendes Aula 30 (1) Empacotamento de Dados em MPI Tópicos: Buffer de Mensagem Empacotamento/Desempacotamento.
Webots Pedro Pinheiro 12 de Novembro de Webots Pedro Pinheiro 12 de Novembro de 2004 Prepared by: Pedro Pinheiro.
Definição do MoC Subjacente a Aplicação Prof. Dr. César Augusto Missio Marcon Parcialmente extraído de trabalhos de Axel Jantch, Edward Lee e Alberto Sangiovanni-Vincentelli.
Java em Redes de Computadores
Knowledge Extraction from the Web (ISEWO)
Quality Management (J07) Overview BR
CEManTIKA Framework Overview Vaninha Vieira Ana Carolina Salgado Patricia Tedesco
Metodologia de Desenvolvimento de Software Hermano Moura Alexandre Vasconcelos, André Santos, Augusto Sampaio, Hermano Moura, Paulo.
Cursor Professor Esp. Diego André Sant’Ana
Instituto de Engenharia de Sistemas e Computadores Investigação e Desenvolvimento em Lisboa Ontology Building Process: The Wine Domain João Graça, Márcio.
Instituto de Engenharia de Sistemas e Computadores Investigação e Desenvolvimento em Lisboa Understanding Epidemic Quorum Systems INESC-ID Lisbon/Technical.
1 Test Driven Development John Jonathan da Silva /
Soluções usando Microsoft conteúdo Management Server 2002 Connector for SharePoint Technologies - MVP Exchange Server
Using innovation models to grow the GLP business Kip Garland innovationSEED October 9 th, 2009.
Cigré/Brasil CE B5 – Proteção e Automação Seminário Interno de Preparação para a Bienal 2006 Rio de Janeiro, setembro/06.
Lei de Cotas: Looking at the Implementation of the Brazilian Employment Quota in São Paulo, Brazil Anna C. O’Kelly.
Software Engineering for Self-Adaptive Systems. Self-Adaptation The complexity of current software-based systems has led the software engineering community.
Motivação A difícil tarefa de encontrar o conteúdo certo que preciso para as diferentes situações de trabalho…
IEEE PES General Meeting, Tampa FL June 24-28, 2007 Conferência Brasileira de Qualidade de Energia Santos, São Paulo, Agosto 5-8, Chapter 8: Procedure.
Administração e Exploração Avançada de Bases de Dados Mestrado em Engenharia de Sistemas Braga, 2014.
JAAF+T: A Framework to Implement Self-Adaptive Agents that Apply Self-Test (Extension) Andrew Diniz da Costa
CEManTIKA Framework Overview
Transcrição da apresentação:

Testes de Software em Sistemas Multi-Agentes Andrew Diniz da Costa andrew@les.inf.puc-rio.br

Por quê testar? Manter alta qualidade Prevenir e encontrar defeitos Ganhar confiança sobre o nível de qualidade e prover informações.

Tipos de teste Teste de unidade/componente Teste funcional Testes não funcionais É o teste de “como” o sistema trabalha. Teste de performance Teste de carga Teste de portabilidade Teste de usabilidade ...

Função do Analista de Teste/Testador Identificar quais testes devem ser feitos Saber lidar com o esforço dos testes Criar o design Criar o script automatizado, quando necessário. Quais são os teste de regressão, novos e impactados? Cadastrar/Atualizar Bugs Aplicar “psicologia para testes”

Criação de designs

Modelagem em Testes Há diversas abordagens que propõem formas de modelar testes UML Testing Profile (padrão da OMG)* AGEDIS modeling language (AML) Unified Test Modeling Language UML Testing Profile Define um profile para ser aplicado em UML Atributos + estereótipos 1) OMG - Object Management Group, UML Testing Profile, version 1, http://www.omg.org/cgi-bin/doc?formal/05-07-07 2) AGEDIS - Automated Generation and Execution of Test Suites for DIstributed Component based Software, http://www.agedis.de 3) UTML - The Unified Test Modeling Language for Pattern-Oriented Test Design, http://www.fokus.fraunhofer.de/en/motion/ueber_motion/technologien/utml/index.html21.

UML Testing Profile

Sistemas Multi-Agentes Sistemas com agentes devem ser testados Tipos de teste? Testes triviais Testes complexos Thread © LES/PUC-Rio

JAT: A Test Automation Framework for Multi-Agent Systems Roberta Coelho, Elder Cirilo, Uirá Kulesza Arndt von Staa, Awais Rashid , Carlos Lucena

Agents – A new Level of Abstraction Problem Domain R1 R3 R5 R7 R2 R4 R6 Agent Oriented Agent Roles Messages Organization Protocols Which agents? R8 functions files modules Procedural How? Object Oriented Object Attribute Method Class What? If we are using a procediral paradigm to build a software we will look at the problem and think about how it can be implemented. We will end up with a set of files modules and funciotns. According to the Procedural Paradigm we look at the problem and think obout How we can solve it? Thus we implement a set of modules and functions to adress all requirements. According to oo paradigm we should look at the problem that extract the main elements (classes) that take part in it. So we devise a set of classes, relations, attrubutes from it. We look at the same problem but in dferent levels of abstraction.

Agent-related new abstractions  new sources of bugs Fault Model Message ordering Message content Increases on message delay Faults in agents beliefs Faults in internal procedures Agent-related new abstractions  new sources of bugs

 Agent Definition Agent: is an autonomous entity that executes a plan to achieve a goal based on its beliefs (attributes) communicates asynchronously (message based) Autonomy –> certo grau de não-determinismo Different set of actions may achieve the same goal System Garcia, A., Lucena, C., Cowan D. Agents in Object-Oriented Software Engineering. Software Practice & Experience, Elsevier, 34 (5), pp. 489-521, 2004.  An agent is an autonomous, adaptive and interactive element that has a mental state. The mental state of an agent is comprised by: beliefs, goals, plans and actions. Every agent of the MAS plays at least one role in an organization. One of the attributes of a role is a number of protocols, which define the way that it can interact with other roles. The interface consists in the set of messagens that I can receive and the set of messages that I can receive. An agent is an autonomous and interactive element. The agent’s beliefs include what the agent knows (internal attributes) and its perceptions about what happens in MAS. Plans define a sequence of actions that is executed by an agent to achieve goals. Agents are goal oriented. Each agent in a MAS has one responsibility. This responsibility is represented by the roles it should play in the system.

We defined an approach for building and running MAS tests. The Approach We defined an approach for building and running MAS tests. It relies on Aspect Oriented Programming to: Control the test input Observe the output units under test It was implemented on top of JADE: Middleware for agent-based applications developed in Java.

JADE Agent Testing (JAT) Framework JAT enables: the creation of JUnit-style tests for JADE systems. JAT is used: as a generic testing framework for JADE developers same as JUnit is for Java developers

Using Agents to test Agents: Ideas Using Agents to test Agents: Mock Agent a fake implementation of a real agent sends messages to an agent under test (AUT) and checks its response: content, delay, type, ordering.

Ideas Monitoring Agents Agents are autonomous The developer need to know agents state ex: to answer: output == expected output? Monitor Aspect observes and stores information about agents state transitions (ex: running, dead). Agent state machine is a crosscutting abstraction public aspect AgentStateMachine { pointcut created():call(public ContainerController.createNewAgent(..)); pointcut from_created_to_running(Agent o): execution(protected void Agent.setup()) && target(o); pointcut from_running_to_dead (Agent o): execution(public void Agent.doDelete()) ... } running created waiting dead

JAT Framework: The Architecture JADE Middleware JUnit Framework <<crosscuts>> <<crosscuts>> A Aspects <<uses>> <<crosscuts>> M <<crosscuts>> S JAT Framework Legend: M Monitoring Concern A Agent State Machine Concern S Synchronization Concern

JAT Framework: Dynamics AgentStateMachineXPI

JAT Framework: Dynamics AgentStateMachineXPI 1

JADETestCase: Code Example public class BookTradingTesteCase extends JADETestCase { public void testBookTradingScena1(){ //Load Data Repositories … startAUT("seller","BookSeller"); startMockAgent("buyer1","BookBuyerMockAgent",FIRST); startMockAgent("buyer2","BookBuyerMockAgent",SECOND); //Blocks until interaction finishes Monitor.aspectOf(). waitUntilTestHasFinished("buyer1"); Monitor.aspectOf(). waitUntilTestHasFinished("buyer2"); //Check Expected Result: assertInteractionOK("buyer1"); assertInteractionOK("buyer2"); Object belief= getBelief(“seller”,“catalogue”); assertEquals(expectedBelief,belief); } ...

JAT Framework: Dynamics Monitoring DataRepository :Synchronizer :Monitor JADETestCase : JADEMockAgent : AUT: JADEAtent 1. testMethod () 2. loadInteraction Order( ) 3. start(params ) 4. start(params ) 5. state = crosscuts ( ) 6. add(state) 7. waitUntilTestFinishes ( ) 8. send(msg ) 9. send(msg ) 10.check(msg) 11. setResult ( ) 12. state = crosscuts ( ) 13. add(state) 14. notifyTestFinished () 16. assertions( ) Legend: join point intercepted join point intercepted object by Monitor aspect by Synchronizer aspect aspect

A Framework to Implement Self-Adaptive Agents that Apply Self-Test Andrew Diniz da Costa Viviane Torres da Silva Carlos José Pereira de Lucena

Motivação Sistemas Auto-adaptativos Testar adaptações quando realizada por agentes Agentes podem ter funções que necessitem de adaptações Decision Execution Analyze Monitor IBM, An architectural blueprint for autonomic computing. Technical Report., IBM, 2003.

Main Idea New control loop of self-test. Description files (XML) Test Language (TL) Casos de teste que poderão ser executados Data Language (DL) Dados a serem usados nos testes Control Flow Language (CFL) Fluxo de execução dos casos de teste Case Study: Petroleum system.

New Control Loop Johansson, C., Bucanac, C., The V-Model, April 1999. Graham, D.; Veenendaal, E.; Evans, I.; Black, R.; book: Foudantions of Software Testing - ISTQB Certification

Estudo de Caso: Sistema de Petróleo Domínio: Controle de estoque e suprimento de petróleo e produtos derivados do petróleo. Encontrar rotas que atendam um ponto do Brasil. Rota Destino Origem Produto Quantidade desejada Custo

Estudo de Caso: Sistema de Petróleo Dados de Entrada: Destino: TT1 Produto: Gasolina Origem desejada: TA Quantidade: 10 mil t TT 1 (Gasolina) TA 2 3 mil t TA 1 2 mil t REF 1 10 mil t

Modelo Conceitual Manager Agent User Interface Terminal Agent Delivery Local Agent Refinary Agent

Escritório de Qualidade - LES

Nossos Objetivos Garantir alta qualidade para os sistemas testados. Preparação de Novos Profissionais Trabalho em equipe Desenvolvimento em Java 6 Acompanhamento Desenvolvimento para Banco Tarefas DBUnit Criação de queries SQL, procedures. Acompanhamento para tirar dúvidas Estudos de caso para projetos finais, dissertações e teses. Motivar criação de novas ferramentas JAAF+T: A Framework to Implement Self-Adaptive Agents that Apply Self-Test ASF: Agent Society Framework – www.les.inf.puc-rio.br/frameworkasf JAT: A Test Automation Framework for Multi-Agent Systems - http://www.inf.puc-rio.br/~ecirilo/jat GearDB: Ferramenta para Geração de Dados Ferramenta para auxiliar o desenvolvimento em DBUnit

Divulgação do Nosso Trabalho Divulgação do nosso trabalho de qualidade Quem somos Experiência, atividades realizadas Cursos oferecidos Ferramentas desenvolvidas pelo LES Artigos, documentos Prover: recomendações de ferramentas; Fórum de discussões sobre qualidade Por quê não nos transformarmos em um ponto de referência na área de qualidade no Brasil? Temos experiência e pessoas qualificadas.  Não temos a divulgação. 

Site de Escritório de Qualidade www.les.inf.puc-rio.br/escritorioqualidade

Referências http://seleniumhq.org/ - site do Selenium http://seleniumhq.org/docs/book/Selenium_Documentation.pdf - documentação do Selenium http://wiki.openqa.org/display/SEL/Contributed+User-Extensions – extensões do Selenium https://addons.mozilla.org/en-US/firefox/addon/1192 - XPather - plugin do Firefox para geração, edição, inspeção e extração de expressões em XPath. http://www.zvon.org/xxl/XPathTutorial/General/examples.html - Tutorial de XPath http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm - Teste de expressões XPath em um arquivo específico http://www.junit.org/ - JUnit web site http://dbunit.sourceforge.net/ - DBUnit web site

Fim!!