Connectivity tests
These are test scenarios to be covered in Connectivity test
- Messaging Test
- Module-to-Module
- Module-to-IoT Hub
- Twin Property Update Test
- Desired property
- Reported property
- Direct Method Test
- Cloud-to-module
- Ping method in EdgeAgent
- EdgeAgent Deployment Test
- Deployment change
- Currently Connectivity test is supported only to run on Linux AMD64.
- Connectivity test can be run by calling Connectivity Test script.
- Each test runs using AMQP and MQTT TCP protocol.
- For each run, a new tracking id (Guid) is generated by the test script.
- Test starts after pre-defined warm-up period (default 2 minutes), which assumes EdgeHub and other modules containers are up and running.
- A test duration is configurable and is set to 1 hour by default.
- A test module is responsible for providing the Test Result Coordinator with a result of its operation.
- An operation result is persistently stored by the Test Result Coordinator after validating result type is supported.
- The Test Result Coordinator consumes events from IoT hub's built-in event hub endpoint for messaging scenario verification.
- The Network Controller simulates a different test network condition, e.g. offline or packet loss. The Network Controller, like any other test modules, is responsible to report a result of its action to The Test Result Coordinator.
- After the test duration is over, the test waits for a brief period of time to ensure that all of the actions propagated through the system. Then, the final test report is generated and uploaded to Log Analytics. The buffer is 15 minutes by default, which assumes all messages are received on IoT hub and are pulled for verification.
- After test duration, test modules should stop calling operations, e.g. sending messages, making Direct method calls, etc.
- The Network Controller controls the virtual network "Azure-IoT-Edge" to simulate offline and packet-loss scenarios.
- When generating test result reports, network status is taken into consideration based on result reported by Network controller.
- If there are many tests running at the same time using devices in the same IoT hub, there may be too many event messages received by Test Result Coordinator; which slows down test result verification and may cause failed result.
- Try to reduce number of test devices in a test IoT hub.
- Introduce Azure Stream Analytics (ASA) to process messages, which should provide a higher throughput.
- Network Controller implementation may support on Linux only, but not Windows platform.
- loadGen starts sending messages after pre-defined warm-up period.
- loadGen sends module-to-module messages to Relayer through Edge hub (#1 -> Edge hub -> #2).
- After sending each message, loadGen reports result to Test Result Coordinator (#3).
- Relayer receives the message and reports result to Test Result Coordinator (#2 -> #4).
- After receiving in Relayer, messages send forward to IoT hub through Edge hub (#5 -> Edge hub -> #7).
- After forwading each message in relayer, it reports result to Test Result Coordinator (#6).
- All messages should contain tracking id, batch id and sequence number. Sequence number should always start at 1 in loadGen.
Network offline/online should not affect this test result since Edge hub stores all messages when offline and resumes back once get back online.