# A Method for Modeling and Testing Near-Real-Time System Scenarios
## 2 Related Work  
In the course of their work, system designers develop the system architecture in terms of performing tasks for the final user. Most of these tasks do not affect the safety and security of the platform and do not have to be subject to a certification process, which is aimed at checking whether the system as a whole is safe to use. Therefore, there are no imposed requirements for the methodologies that should be used in the system design process. There are also no applicable management methodologies indicated. In the process of building the system, one can use the NAF (NATO Architecture Framework [3]) methodology or a preferred methodology DO-178. DO-178C [4] is a standard that covers the software life cycle to ensure correctness and robustness in software systems for airborne systems. The process includes software testing, quality assurance, and configuration management. DO-178C is a formal methodology widely used in both the civilian and defense sectors. UML [5] (or its SysML extension when there is a need to model hardware architecture) can be used to design software. The process of building and testing the system does not differ significantly from the processes used in the industry. Differences appear when testing the reliability of the solution. System designers must demonstrate the robustness of the system's designed mechanisms to prevent or mitigate the effects of an unsafe situation such as loss of communication with a UAV, GPS jamming, and engine failure. Increasing the formal control during the design process with the use of UML is possible through the use of formal methods of building software models based on the indications of DO-331 [6] as well as guidelines for object modeling of systems based on the DO-332 document [7]. When using mathematical models, system designers can rely on the guidelines described in the DO-333 methodology [8]. A detailed description of issues related to system design principles is beyond the scope of this article. The interested reader will find detailed information in the book by [PERSON] [9]. As technology advances rapidly, safety-critical software is becoming more complex. In a system containing safety-critical modules, many factors influence software reliability. These include, among others, the hardware and software configuration of the system and the architecture of the communication link. In such systems, the risk of failure is greater because the failure of a single component can result in a major failure of the entire system. The reader can find many approaches to building models and preparing model-based tests that have been presented in the literature for at least the last 20 years. In this article, we deal with the design of a system called model-based testing (MBT), the aim of which is to design it in such a way that test scenarios can be generated based on formal models. Automatic generation of test data is usually difficult, but is possible with proper design principles. In this paper, we transform the system model represented by the UML state machine into an extended EFSM state machine model using sequence diagrams. Test paths can be generated for such a transformation. An example of a path generation method is the work of [PERSON] and [PERSON] [10]. MBT is a natural complement to the model-driven engineering (MDE) approach, which assumes designing the system in such a way that some of the codes can be generated from the model. Both complementary concepts are part of a broader methodology called model-based system engineering (MBSE). In order to ensure the safety of the developed system, systematic, efficient, and effective software testing is necessary. The testing process must be supported by safety analysis to ensure the reliable operation of embedded software in a safety-critical system. Safety analysis techniques such as Functional Hazard Analysis (FHA) and Preliminary Hazard List Analysis (PHLA) ([PERSON] [11]) are used to identify possible threats to ensure system safety.