Configuration Range Validation Test¶
Device integration can vary significantly in implementation. Although most connect via direct IP addresses to their API, there are numerous special cases with unique communication methods. To ensure stability and performance, the driver must avoid duplicating connections to the same device, as this could cause control problems, performance degradation, or instability in Netsocs in relation to the integration.
Objective¶
Ensure that the driver prevents device duplication.
003-a - Device Duplication by Database Manipulation¶
Test Steps¶
-
Preconditions:
- Device connected and working
-
Test Steps
- Start the driver
- Register a device correctly.
- Stop the driver
- Go to the Netsocs database and duplicate the device, changing its name and ID.
Expected Results¶
- The driver must detect the duplication and set the last device to state
"DuplicatedDevice" - The driver must create a log entry on the device with the previously connected device (the one that was duplicated)
- The driver must not create objects for the duplicated device
003-b - Device Duplication by Loading from Configuration Module¶
Test Steps¶
-
Preconditions
- Device connected and working
-
Test Steps
- Start the driver
- Register a device correctly.
- Load the same device again but with a different name.
Expected Results¶
- The driver must detect the duplication and set the last device to state
"DuplicatedDevice" - The driver must create a log entry on the device with the previously connected device (the one that was duplicated). The log format must be as follows:
Duplicated device 'DEVICE' with id 'ID'. Device was previously connected with id 'ID' and name 'NAME'.
Where:
- 'DEVICE' is the device name.
- 'ID' is the device ID.
- 'NAME' is the device name.
- The driver must not create objects for the duplicated device
Additional Notes¶
It is likely that the configuration module will not allow test 003-b to be executed. In that case, if test 003-a passes, the test is considered successful. A comment must be left in the test manual to indicate that test 003-b could not be executed.