JAAF+T: A Framework to Implement Self-Adaptive
Agents that Apply Self-Test
(Extension)
Andrew Diniz da Costa
[email protected]
Motivation
• Few approaches provide means to check if the adapted
behavior is more adequate to the new characteristics of the
environment than the previous one.
• JAAF+T: Java Self-Adaptive Agent Framework with Self-Test
• Improve the framework.
© LES/PUC-Rio
2
JAAF+T
• JAAF+T
– Agents that perform self-adaptation
– Plans executed by agents representing self-adaptation
processes (or control loops)
– Activities that are the steps of such processes.
– It provides a default control loop that can be extended.
– Test Definition Language
– Quality Definition Language
– Execute different types of test cases.
– Use different log formats.
– ...
© LES/PUC-Rio
3
Proposal
• Extending JAAF+T
– Control-loop with test activity
– Control-flow:
• Define which test case will be executed for each behaviour, webservice, etc.
– Data-flow:
• Better structure to use data at tests.
© LES/PUC-Rio
4
Default Control Loop
IBM, An architectural blueprint for autonomic computing. Technical Report., IBM, 2003.
© LES/PUC-Rio
5
Proposal – 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
© LES/PUC-Rio
6
Proposal – Control-Flow
Behaviour
• Control Flow Definition Language (CFDL
)
Web-service
• Relate Test Case with Behaviour
...
<control-flow>
<artifact type=“behaviour” nameArtifact=“Behaviour1.class”/>
<test type=“testcase” name= “testCase1”/>
</artifact>
<artifact type=“web-service” nameArtifact=“serviceBuyAndSell”/>
<test type=“setTestCase” name= “settestCase1” priority=“1”/>
<test type=“testcase” name= “testCase2” priority=“2”/>
</artifact>
</control-flow>
TDL
© LES/PUC-Rio
7
Proposal – Data-Flow
• Modifying QDL
© LES/PUC-Rio
8
Proposal – Data-Flow
• Improve QDL file
• Represent different conditions to a same test case
• Store automatically in databases
– Reproduce a test case as an action being executed.
• Example: Agent recovers data from a database in order to perform
some decision.
• Database options:
– Commit
– Delete all data stored in a database before beginning some test
© LES/PUC-Rio
9
Proposal
<qdl>
<data name_context=“shop” testCaseRelated=“testCase1” database=“yes/no”
deleteBeforeTest=“yes/no” commit=“yes/no”/>
<condition name=“condition1” commit=“yes/no”>
<setInputs name_table=“table1”> <!-- verificar se é um sistema de arquivos,
verificar tipos complexos -->
<input name=“number1” value=“100”/>
<input name=“number2” value=“200”/>
</setInputs>
<setInputs name_table=“table2”>
<input name=“number1” value=“500”/>
<input name=“number2” value=“1000”/>
</setInputs>
<setOutputs name_table=“tableOutput1”>
<output name=“result” value=“1200”/>
</setOutputs>
</condition>
<condition name=“condition2”>
Equivalence Partitioning
Boundary-Value Analysis
...
</condition>
</data>
© LES/PUC-Rio
10
Case Study: Bandeira
• Inventory and supply of petroleum and derived products.
© LES/PUC-Rio
11
Case Study: Bandeira
TT 1
(Gasolina)
TA 2
REF 1
© LES/PUC-Rio
TA 1
12
Case Study: Bandeira
• Agent is responsible to provide the best route (different
strategies)
– Estratégia 1: encontrar apenas um ponto que atenda a
necessidade
– Estratégia 2: encontrar menor quantidade de pontos que
atenda a necessidade
– Estratégia 3: encontrar um ou mais pontos que atendam o
quanto for possível da necessidade de outro ponto.
© LES/PUC-Rio
13
Steps
• 27/05 – Defining scope.
• 22/06 – Finishing development of the framework and study
case.
• 09/07 – Writing documentation.
© LES/PUC-Rio
14
The End
Download

Andrew_2010.1_Fase2