Automatic Build and Testing System for the Logic Controller Firmware
In 2021, we revealed a new area of working with our regular customer who is a major player in the railway market. To operate signaling equipment, the customer uses a specific logic controller that contains a wide variety of boards, all of which have to be supported.
The logic controller processes a huge amount of information continuously. So, if the firmware for the boards is not updated in time, emerging errors might disrupt the process of obtaining and processing the data, which can lead to malfunction of the equipment. The client used to create firmware manually, which required a length process that made maintenance more expensive. That approach also created additional risk in the system because some errors went overlooked.
In general, our objective was to develop a continuous delivery procedure for the customer project.
To eliminate generic errors and reduce manual testing efforts, we needed to create and deploy the environment for automatic build and testing of the firmware versions upon user request. The required system had to collect components from different repositories in the customer’s existing remote labs for the final firmware, monitor, and automatically report issues for all building and deployment steps.
To provide railroad devices with Continuous Integration Automated Deployment and Testing, we created a set of tools for:
- Firmware building from various components located in SVN and Git servers;
- Firmware flashing and deployment;
- Monitoring of the status and errors messages during the process of deployment;
- Installation and testing of the applications on the target platforms.
During the implementation process we needed to set up connections to the various boards, all of which had different network configurations. After examination of the available documentation, we estimated the project to offer the optimal options for the client. For successful delivery of the project we provided:
- Architecture and design creation;
- Creation, deployment, and testing infrastructure for railroad devices;
- Oversight of activities, mentoring, and technical support;
- Writing technical documentation;
- Automation of the controller’s firmware building and deployment by Python scripts;
- Development of a framework for testing a web interface;
- Integration of building scripts into Jenkins;
- Implementation of the system of interaction with the logic controller via the SSH protocol for IPC messages parsing, interaction with the SQL database of errors and warnings (events.db);
- Automating the multithreaded multiple applications deployment process;
- Testing the web interface using Selenium framework;
- Parsing application files for the logic controller;
- Unit test implementation.
Tests of the firmware were performed for different configurations of the boards on different devices located in the customer’s existing remote labs.
- Architecture and design creation
- Firmware development and deployment
- Creating deploy and testing infrastructure
- Development of a framework for testing a web interface
- Automating the deployment process
- Writing technical documentation
- Unit test implementation
- Technical support
The client got an easy-to-use completely Automated System for Building, Deployment, and Testing firmware solution to eliminate errors. Now the company can build new firmware without additional resources by pressing one button and being sure that the system is working correctly. If the firmware was built incorrectly, the system immediately reports the error to all interested parties by sending an email.
As a result, the client gets higher quality firmware with fewer errors, while the development, deployment, and delivery speed has increased.
After more than 10 years of working with this client, we have delivered projects in different directions: signaling, testing, software implementation, and so on. We see the following ways to improve the delivered system: its adaptation when implementing a new board, and increasing the number of tests that the system performs, such as unit tests, web interface tests, UI tests, and others.