TOMRA Food’s industry-leading sorting machines utilize a broad range of sensor technologies coupled with real-time image processing engines over embedded and PC architectures.
The Machine Intelligence team, a new team within TOMRA Food, is leveraging new and existing data sources to improve our food sorting products in sorting performance, reliability, predictive maintenance, anomaly detection, and improved data/analytics feedback.
The machine development team in Dublin, Ireland were the first in TOMRA Food to embrace the Behavior Driven Development process. The team became familiar with the Gherkin language and deliberate discovery practice during the three amigos meetings. After some time, the team felt more comfortable specifying the machine software in terms of its behavior. Requirements described by scenarios allow for less ambiguous deliverables. We experienced that the process improves in structure, and the definition of done is more complete. Automating the scenarios enables a faster feedback loop and guards against regressions. As a result, the end-to-end and the integration test coverage have increased substantially.
The scenarios written by the team to describe machine behavior are now used as training material, which in itself is a testament to the success of the BDD adoption and work done by the team. Newcomers, as part of the onboarding process, are provided with the feature files. They follow the scenarios at the machine. As a result, it now only takes a couple of days for a person to feel comfortable operating the sorting machine.
On the cloud side, three components are of interest when the automated tests run. The container registry holds the docker containers with the version of the AUT. IoT Hub through which the deployment of the correct version of the AUT and routing of the messages is achieved. Blob storage holds the messages from the machine.
Objective for Automated Tests:
to verify that all the data is delivered in the correct format, and that logic applied by the IoT Edge connector module is in accordance with the specification.
The testing pipeline runs on the Ubuntu VM runner at which the desired version of the IoT Edge runtime is installed. SpecFlow is in charge of the events to follow.
Before any tests run, SpecFlow is using a class and SpecFlow hooks to prepare the environment. [BeforeTestRun] hook updates the IoT Edge device deployment manifest in the IoT Edge Device twin in the cloud. In this step, SpecFlow instructs the environment to use a version of the connector module built in the AUT build that triggered the tests. It is implemented using .NET Azure IoT client API. This in turn, causes the IoT Edge runtime to download the AUT container version to the CI runner. SpecFlow then checks if the IoT Edge runtime is reporting the desired version of the Connector. This check is performed against the edge connector module reported properties in the cloud. When the correct version of AUT is confirmed, the test run can start.
Test Reports can be viewed as:
TOMRA has ~100,000 installations in over 80 markets worldwide and had total revenues of ~9.9 billion NOK in 2020. The Group employs ~4,300 globally and is publicly listed on the Oslo Stock Exchange (OSE: TOM).