Jadex 0.96

jadex.planlib
Capability Test


capability Test

The Test capability is responsible for tracking test results and publishes results either to a test center or on console.


Belief Summary
exported belief boolean keepalive
           Keep the agent alive after ther tests have been performed.
exported beliefset TestReport reports
           The testcase reports.
belief long starttime
           The start time.
exported belief int testcase_cnt
           The number of testcases.
exported belief AgentIdentifier testcenter
           The test center identifier (null when the agent was not started from the test center).
exported belief long timeout
           Default timeout is never.
belief boolean timeout_failure
           The indicator for a timeout (when no time left and reports incomplete).
 
Goal Summary
achievegoal tests_finished()
          
 
Plan Summary
standard plan print_reports()
           Print results to console.
standard plan send_reports()
           Send results to test center.
mobile plan tests_finished_plan()
           Plan to wait until all tests are finished and then to create the tests_finished goal.
 
Event Summary
exported messageevent inform_reports(String language, String performative, String reply-with)
           The inform reports message event.
 
Expression Summary
condition tests_finished
           The tests are finished when as many reports have been added as tests have been declared and tests to do >0 or the timeout has occurred.
 
Configuration Summary
default configuration  default
          
configuration  off
          
 

Belief Detail

testcase_cnt

exported belief int testcase_cnt
The number of testcases.

Default fact:
1

timeout

exported belief long timeout
Default timeout is never.

Default fact:
0

testcenter

exported belief AgentIdentifier testcenter
The test center identifier (null when the agent was not started from the test center).


keepalive

exported belief boolean keepalive
Keep the agent alive after ther tests have been performed.

Default fact:
false

starttime

belief long starttime
The start time.

Default fact:
System.currentTimeMillis()

timeout_failure

belief boolean timeout_failure
The indicator for a timeout (when no time left and reports incomplete).

Update rate:
1000 ms
Default fact: (dynamic)
$beliefbase.timeout>0 && $beliefbase.starttime+$beliefbase.timeout <= System.currentTimeMillis() && $beliefbase.testcase_cnt!=$beliefbase.reports.length

reports

exported beliefset TestReport reports
The testcase reports.

Goal Detail

tests_finished

achievegoal tests_finished()
BDI flags:
retry: true
retry delay: 0
exclude: when_tried
random selection: false
post to all: false
Plan Detail

tests_finished_plan

mobile plan tests_finished_plan()
Plan to wait until all tests are finished and then to create the tests_finished goal.

Plan body:

send_reports

standard plan send_reports()
Send results to test center.

Plan body:
Plan trigger:
Goals:
tests_finished

print_reports

standard plan print_reports()
Print results to console.

Plan body:
Plan trigger:
Goals:
tests_finished
Event Detail

inform_reports

exported messageevent inform_reports(String language, 
                                     String performative, 
                                     String reply-with)
The inform reports message event.

Parameters:
fixed parameter language Default value:  SFipa.NUGGETS_XML
fixed parameter performative Default value:  SFipa.INFORM
in parameter reply-with Default value:  SFipa.createUniqueId($scope.getAgentName())
Event flags:
direction: send
message type: fipa
random selection: false
post to all: false
Expression Detail

tests_finished

condition tests_finished
The tests are finished when as many reports have been added as tests have been declared and tests to do >0 or the timeout has occurred.

Expression:
$beliefbase.testcase_cnt==$beliefbase.reports.length || $beliefbase.timeout_failure
Configuration Detail

default

default configuration default
Initial Plans:
tests_finished_plan

off

configuration off

Jadex 0.96

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.