IoT Testing with Device Twins
What is a Digital Twin?
In simple terms, a digital twin is like a virtual copy of a real-world object, design, or process that can be used for testing, monitoring, and analyzing its performance in a safe and controlled environment. The term Digital Twin might be new, but the concept of Digital Twin dates back to as old as Apollo 11 Program. The difference is that at that time, NASA had an actual physical twin of the spacecraft, i.e., the actual physical copy of the spaceship on earth reflecting the remote spaceship’s state.
What is a Device Twin?
Unlike a digital Twin, a Device Twin is a simulated representation of a physical object. The most significant difference between a device twin vs. a digital twin is that the device twin does not need any physical object to exist. It could be built by an entirely mathematical representation of the device. However, to be useful, a device twin must be connected to the software backend and should reflect the attributes of the simulated device.
Above is an example of a fully interactive washing machine model which could be loaded in your browser. The model interacts with user and connects with IoTIFY backend engine to publish it's status to the AWS IoT. It also received live updates from IoT Core and reflect the status in 3D.
Building test automation with Device Twins
While building test automation frameworks for end-to-end IoT systems, QA teams face a unique challenge. Dependency on the hardware means they will either need to test it manually or implement complex robotics to automate physical actuation. Reading values back from the actual devices is also quite challenging, as you will need a Computer Vision implementation to capture images and extract the readings. Even after implementation, this approach needs to be revised frequently with constant upgrades and maintenance.
领英推荐
An alternative approach is to augment firmware testing with a Device simulator. The simulator could act as an actual device by combining a 3D physics engine and interactive visualization with a functionally accurate device model. The most significant advantage of this approach is that end-to-end test automation can be achieved, as every component of the test chain is in the software.
The device twin simulation could then be used to automate testing for the digital twin solutions as well, as seen in the diagram below
The benefits of using a Device twin simulator for testing IoT applications are manifold
Conclusion: A device twin could augment the manual testing required for firmware and embedded systems. By scaling device twins in the cloud, organizations could quickly identify the performance, scalability, and functional bottlenecks in their cloud solutions. Building device twins could be challenging, as it needs a new framework for combing Physics with 3D models, Human Interaction, and network Connectivity such as MQTT, HTTP, Websocket, etc.
At IoTIFY, we would love to help you build a custom device simulator for your project needs. Please get in touch for a demo of our platform below.