238
X-Machines for Agent-Based Modeling: FLAME Perspectives
FIGURE 8.1: Testing low and high level functions.
Following test-driven design approaches, complete tests of the model can
include unit tests along with integration testing of the whole system. Individual agent functions can be tested as unit tests, whereas the overall behavior
can be tested using black box testing methods. Any system dependencies, such
as agent messages, would come under system tests and not unit tests.
Unit testing of individual agent function can help isolate part of the agents
and test single behavior (shown in Figure 8.1). It can show any immediate
reasons for failure if they do not behave as expected. These should run quickly
and provide the functional verification of the program. These agent functions
can be tested independently with no dependency such as communicating with
other agents. Trial messages can be simulated to test the function if needed.
This helps signal any error at lowest levels of agent functions before running
the whole model.
Testing the complete model as a black box is a much more complex activity.
These tests start with some known preconditions and expected outputs of the
system. Immediate data logs produced can be plotted in multiple forms, graphs
or videos, and then analyzed to see if any wrong behavior is observed. This
process would depend on simulation results rather than analyzing the code.
X-Machines for Agent-Based Modeling: FLAME Perspectives
FIGURE 8.1: Testing low and high level functions.
Following test-driven design approaches, complete tests of the model can
include unit tests along with integration testing of the whole system. Individual agent functions can be tested as unit tests, whereas the overall behavior
can be tested using black box testing methods. Any system dependencies, such
as agent messages, would come under system tests and not unit tests.
Unit testing of individual agent function can help isolate part of the agents
and test single behavior (shown in Figure 8.1). It can show any immediate
reasons for failure if they do not behave as expected. These should run quickly
and provide the functional verification of the program. These agent functions
can be tested independently with no dependency such as communicating with
other agents. Trial messages can be simulated to test the function if needed.
This helps signal any error at lowest levels of agent functions before running
the whole model.
Testing the complete model as a black box is a much more complex activity.
These tests start with some known preconditions and expected outputs of the
system. Immediate data logs produced can be plotted in multiple forms, graphs
or videos, and then analyzed to see if any wrong behavior is observed. This
process would depend on simulation results rather than analyzing the code.
