https://www.mdu.se/

mdu.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Automating Test Generation of Industrial ControlSoftware through a PLC-to-Python Translation Framework and Pynguin
Mälardalen University, School of Innovation, Design and Engineering, Embedded Systems. (Software Testing Laboratory, Formal Modelling and Analysis of Embedded Systems)ORCID iD: 0000-0002-6992-9200
Mälardalen University, School of Innovation, Design and Engineering, Embedded Systems.ORCID iD: 0000-0003-2416-4205
Mälardalen University, School of Innovation, Design and Engineering, Embedded Systems.ORCID iD: 0000-0003-2870-2680
Mälardalen University, School of Innovation, Design and Engineering, Embedded Systems.ORCID iD: 0000-0003-0611-2655
Show others and affiliations
2023 (English)In: Proceedings Of The 2023 30Th Asia-Pacific Software Engineering Conference, Apsec 2023, 2023Conference paper, Published paper (Refereed)
Abstract [en]

Numerous industrial sectors employ Programmable Logic Controllers (PLC) software to control safety-critical systems. These systems necessitate extensive testing and stringent coverage measurements, which can be facilitated by automated test-generation techniques. Existing such techniques have not been applied to PLC programs, and therefore do not directly support the latter regarding automated test-case generation. To address this deficit, in this work, we introduce PyLC, a tool designed to automate the conversion of PLC programs to Python code, assisted by an existing test generator called Pynguin. Our framework is capable of handling PLC programs written in the Function Block Diagram language. To demonstrate its capabilities, we employ PyLC to transform safety-critical programs from industry and illustrate how our approach can facilitate the manual and automatic creation of tests. Our study highlights the efficacy of leveraging Python as an intermediary language to bridge the gap between PLC development tools, Python-based unit testing, and automated test generation.

Place, publisher, year, edition, pages
2023.
Keywords [en]
PyLC, PLC, Python, Testing, Code translation, automated testing
National Category
Computer Systems
Research subject
Computer Science
Identifiers
URN: urn:nbn:se:mdh:diva-66349DOI: 10.1109/APSEC60848.2023.00054ISI: 001207000500045OAI: oai:DiVA.org:mdh-66349DiVA, id: diva2:1848298
Conference
APSEC 2023: 30th Asia-Pacific Software Engineering Conference, Software Engineering in Practice (SEIP) Track
Projects
VeriDevOpsAvailable from: 2024-04-02 Created: 2024-04-02 Last updated: 2024-07-03Bibliographically approved
In thesis
1. Enabling Test Automation for Industrial PLC Programs
Open this publication in new window or tab >>Enabling Test Automation for Industrial PLC Programs
2024 (English)Licentiate thesis, comprehensive summary (Other academic)
Abstract [en]

Testing safety-critical systems, particularly those controlled by Programmable Logic Controllers (PLC), is crucial for ensuring the safe and reliable operation of industrial processes. This thesis addresses the critical need for automated testing of safety-critical PLC systems used in various industrial settings. Despite the significance of testing, current practices rely heavily on manual methods, leading to challenges in scalability and reliability. This work investigates enabling test automation for PLCs to facilitate and assist the current manual testing procedures in the industry. The thesis proposes and evaluates test automation techniques and tools tailored to PLCs, focusing on Function Block Diagram and Structured Text languages commonly used in industry. We systematically compare test automation tools for PLC programs, after which we propose a PLC to Python translation framework called PyLC to facilitate automated test generation. The experiment employing the EARS requirement engineering pattern reveals that while engineers use semi-formal notations in varied ways to create requirements, leading to completeness issues, it confirms the viability of employing EARS requirements for PLC system testing. Subsequently, the proposed automation approaches are fully implemented and evaluated using real-world PLC case studies, comparing their efficiency against manual testing procedures. The findings highlight the feasibility and benefits of automating PLC testing, offering insights into improving development and testing processes through carefully selected automation tools for the CODESYS IDE, a well-known PLC development environment. Additionally, we show that leveraging Python-based automated testing techniques and mutation analysis enhances testing effectiveness. Furthermore, incorporating best practices in requirement engineering, as demonstrated by the EARS approach, contributes to further enhancing testing efficiency and effectiveness in PLC development.

Place, publisher, year, edition, pages
Mälardalens universitet, 2024. p. 249
Series
Mälardalen University Press Licentiate Theses, ISSN 1651-9256 ; 358
Keywords
PLC, PLC Testing, Automated Testing, PyLC, EARS Syntax, FBD, ST
National Category
Computer Systems
Research subject
Computer Science
Identifiers
urn:nbn:se:mdh:diva-66351 (URN)978-91-7485-643-9 (ISBN)
Presentation
2024-04-07, Gamma, Mälardalens universitet, Västerås, 09:15 (English)
Opponent
Supervisors
Projects
VeriDevOps, SmartDelta
Available from: 2024-04-03 Created: 2024-04-02 Last updated: 2024-04-16Bibliographically approved

Open Access in DiVA

No full text in DiVA

Other links

Publisher's full text

Authority records

Salari, Mikael EbrahimiEnoiu, Eduard PaulSeceleanu, CristinaAfzal, Wasif

Search in DiVA

By author/editor
Salari, Mikael EbrahimiEnoiu, Eduard PaulSeceleanu, CristinaAfzal, Wasif
By organisation
Embedded Systems
Computer Systems

Search outside of DiVA

GoogleGoogle Scholar

doi
urn-nbn

Altmetric score

doi
urn-nbn
Total: 46 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf