Automated Test Cases Generator for IEC 61131-3 Structured Text Based Dynamic Symbolic Execution
Jianqi Shi,Yinghao Chen,Qin Li,Yanhong Huang,Yang Yang,Mengyan Zhao
DOI: https://doi.org/10.1109/tc.2024.3351285
IF: 3.183
2024-03-15
IEEE Transactions on Computers
Abstract:Programmable Logic Controllers (PLCs) are specialized computers extensively utilized in industrial control fields. Since they control industrial equipment, software faults in PLCs can result in significant losses. However, current testing for PLC programs is mainly manual, and there are very few automatic testing tools. Structured Text (ST) is one of the five PLC programming languages stipulated by the IEC 61131-3 standard, suitable for writing complex control logic. This paper proposes an automatic unit test case generation framework for ST programs based on Dynamic Symbolic Execution and PLC states, as well as a supporting algorithm, and implements the PLCAutoTester tool. PLCAutoTester supports the automatic generation of ST program unit test cases that comply with statement coverage, branch coverage, and MC/DC coverage criterion. We evaluated the PLCAutoTester using 20 PLC programs and compared it with S YMPLC. The experimental results show that PLCAutoTester can generate unit test cases with high coverage in a short time. And in 11 common programs, PLCAutoTester is able to generate test cases with almost the same statement coverage as S YMPLC while reducing the number of test cases by 95%.
engineering, electrical & electronic,computer science, hardware & architecture