# Context-Aware System for Information Flow Management in Factories of the Future
## 4 Experimental Findings
### Tests  
The tests conducted on the Context Engine, namely, its components--_Context Acquisition_, _Context Builder_, and _Context Server_, occurred in a laboratory environment. This assessment included unit tests, where the application services were evaluated in isolation, and functional tests, where the operation of the Context Engine was observed when integrated with services simulating the integration and services layers. In other words, it involved fictitious data and applications created to test its components. The unit tests were conducted using the \"xUnit.net\" tool, which is a framework for creating unit tests for the.NET Framework. For each application service, these tests covered functionalities related to the logic of the developed services, and their development followed the following protocol:  
* Preparation: Configure the necessary dependencies (controllers, interfaces, classes, etc.) using fake objects, simulate the required information (stops, productions, etc. ), and configure the behavior of some functions to return the desired result for the test (for example, OK or BadRequest). * Action: Create instances of the class of methods to be tested, passing the necessary dependencies, instantiating the static information to be used, invoking the respective methods, and capturing the outputs. * Verification: Verify the correct execution, ensuring that the methods that modify the data in the database were called the expected number of times and confirming whether the returned information or console output is as expected. \begin{table}
\begin{tabular}{l l l l} \hline \hline \# & **Service Name** & **Input Parameter(s)** & **Description** \\ \hline
9 & Coordinator Info & Worker’s firebase ID & Provides information on the coordinator and the production lines for which he is responsible, according to the request. \\ \hline
10 & Notification Rec- & Notification type & Provides, if possible (if the employee already has working schedule defined for that day), a date to send them a notification regarding certain information, such as sending a graph or other information. If this is not possible, it sends the day and part of the shift on which the notification should be sent. \\ \hline
11 & Get Missing & Production line ID * & It returns information on the missing components, the respective production lines affected and the date on which the request to replace the component was made, depending on the search parameters. \\ \hline
12 & Get Missing & Production line ID * & Returns information on the missing labels, the respective production lines affected and the date on which the label replacement request was made, according to the search parameters. \\ \hline
13 & Get Alerts & Alert type * & Returns information on the missing labels, the respective production lines affected and the date on which the label replacement request was made, according to the search parameters. \\ \hline
14 & Get Requests & Order type * & Returns information on the missing labels, the respective production lines affected and the date on which the label replacement request was made, according to the search parameters. \\ \hline \hline \end{tabular} Parameters marked with * are optional.  
\end{table} 
Table 3: _Cont._The mentioned fake objects, created using the _FakeltEasy_ library, facilitate testing at this stage. All objects will be fake, and subsequently, the library itself determines whether they are mocks or another type. In total, 61 unit tests were conducted on the components of the _Context Engine_: 10 on _Context Acquisition_, 11 on _Context Builder_, and 40 on _Context Server_. All tests were approved, meaning they were successful. Regarding functional tests, the functional requirements to be tested were defined, and later, the method for testing this functionality of the application was determined. After conducting the necessary tests, it was recorded whether this functionality was executed as expected.