## 3 Related Works  
There are some works that treat the aspects of test in agents. However, we did not find works related to organizational tests to agents.  
[PERSON] and [PERSON] [11] investigated testing techniques for agent systems in general, mapping the different properties and faults that existing techniques may detect. They revealed plenty of techniques for functional requirements, while there are fewer techniques that target non-functional requirements.  
[PERSON] et al. [12] covered different aspects of requirements engineering, including specification and validation. They concluded that ontologies are the most used technique to deal with requirements and identified that roughly a quarter of the literature provided some form of automated validation, which indicates the necessity for automatic approaches to test agent-based models.  
According to [PERSON] et al. [25], there are five levels of abstraction in MAS testing: (i) **unity**: testing codes and modules unity that comprise agents such as plans, goals, sensors, reasoning mechanisms, and others; (ii) **agent**: testing the various modules of an agent, as well as the agent's resources in order to reach its goals and to detect the environment; (iii) **integration**: evaluating the agent's interaction communication protocols and semantics, as well as the environment and shared resources; (iv) **society**: putting the entire MAS to the test in a fateful operational context, looking for quality qualities including adaptability, openness, failure tolerance, and performance; (v) **acceptance**: the MAS is tested in its execution environment to see if it meets the system's objectives.  
A specific approach for testing MASs on embedded systems is provided in [PERSON] et al. [36], and it is built on three basic levels: agent test, collective resources test, and acceptance test. Defining the goals for a well-succeeded test for each level is necessary.  
At the agent level, [PERSON] [29] proposed a method for testability assessment on BDI (_belief-desire-intention_) agents, where two different adequacy criteria were compared: the _all edges_, which is satisfied if the set of tests covers all edges in a control-flow graph; and the _all paths_ criterion, where a test set is adequate if the test cover all paths in the control-flow graph of the program. The degree of testability obtained is used to indicate the number of test cases needed to validate a BDI program.  
Additionally at the agent level, [PERSON] et al. [37] proposed a signature-based architecture that simplifies the MAS project, which includes a test integration level. Fi  
Figure 4: Colored Petri net: dining philosophers example.  
nally, in [PERSON] et al. [38], they explored the Petri nets representation power with an approach covering the agent, integration, and system levels with functional tests. Using behavioral system models as inputs automatically generates test cases. When investigating the literature on this topic, we must be careful regarding a similar area that approaches the use of agents for automating software testing. For example, in [PERSON] et al. [39], this research area is defined as agent-based software testing (ABST). However, in this case, agent methodologies, architectures, and tools are employed to improve different test problems. ABST investigates the use of agents for testing rather than how to test agents.  
In [PERSON] et al. [13], the authors presented a systematic review of test case generation for agent-based models. Considering the five levels of abstraction proposed by [PERSON] et al. [25], the authors concluded that the majority of techniques for testing are adequate for functional requirements and the agent and integration levels, and there are comparatively few techniques capable of testing society-level behavior. For that reason, the authors indicated the need for test case generation techniques that focus on societal and non-functional behavior.