# A Method for Modeling and Testing Near-Real-Time System Scenarios
## 2 Related Work
In model-based testing, the operations in an algorithm can be represented by models built from a description of functional requirements. There are both formal and informal methods for modeling the algorithms used. Informal modeling methods include, for example, UML state machines. Formal modeling tools such as Petri nets (PNs), finite-state machines (FSMs), extended finite-state machines (EFSMs), and communicating extended finite-state machines (CEFSMs) are common modeling tools used to formally model the behavior of a software system. In practical applications, informal UML models are used to describe the algorithm. The informal model is then transformed into a formal EFSM model for which a testing method can be determined, as shown in the article. In safety-critical systems, safety should be analyzed independently using one of the safety analysis techniques. Safety analysis artifacts can then be integrated to test safety and appropriately mitigate undesirable behavior. For this purpose, system dynamics modeling can be used in both UML and FSMs. [PERSON] et al. [12] presented an example of MBT (model-based testing) with the extended finite-state machine (EFSM) approach for mobile applications. [PERSON] et al. [13] used EFSMs for functional verification and proposed an automatic test pattern generation approach. The MBT process using finite-state machines (CEFSMs) in testing allows for modeling complex systems in which many operations are performed in parallel. Communicating extended finite-state machines (CEFSMs) are multiple EFSM machines with communication channels between them. Machines exchange messages with each other, which allows for synchronization of tasks. This framework allows for the ability to model safety-critical systems that consist of multiple components modeled as EFSMs. Some authors have proposed a safe testing technique. They build a behavioral model using communicating EFSMs (CEFSMs) and a failure model for each possible failure using fault trees. The fault trees are transformed into a CEFSM representation in the compliance process and then integrated into the behavioral model. They apply various graph coverage criteria to generate test paths to check for errors. This approach meets many of the requirements of standards such as DO-178C. This approach allows for the integration of the description of software operation and the statistical model of device failure in one model, as presented by [PERSON] [14]. [PERSON] et al. [15] introduce a procedure for generating tests from UML models that uses MDE concepts to formalize UML sequence diagrams and convert them to EFSM machines. The basic principles of converting UML models to EFSM models were also discussed, in particular the rules for dealing with elements such as loops and optional conditions. [PERSON] et al. [16] use a model-based testing (MBT) approach to generate test cases from labeled transition system (LTS) models translated from sequence diagrams. This approach uses a formal model extracted from the sequence diagram to generate test cases. [PERSON] et al. [17] proposed using overlapping information inherent to some views of UML models used for automatic testing. Their proposal takes into account a subset of the state machine diagrams and sequence diagrams that model only forbidden scenarios using only neg fragments in the sequence diagram. The SPIN3 model checker is proposed to check whether a set of state machines fulfills a safety property described as a neg fragment of a sequence diagram. [PERSON] and [PERSON] [18] presented a method based on generating test cases using activity diagrams and UML sequences. The method involves transforming the sequence diagram into a graph called a sequence graph and transforming the activity diagram into an activity graph. Both models are then integrated to generate a test suite. The proposal uses UML models to generate tests but does not use the concept of MDE or formal test generation models. [PERSON] and [PERSON] [19] developed an approach to generating test cases based on designed UML sequence diagrams.