Repository logo
Research Outputs
Projects
People
Statistics
  1. Home
  2. HSG CRIS
  3. HSG Publications
  4. Metamorphic Testing for Infrastructure-as-Code Engines
Details

Metamorphic Testing for Infrastructure-as-Code Engines

Type
conference paper
Date Issued
2026
Author(s)
David Spielmann  
;
George Zakhour  
;
Arnold, Dominik
;
Matteo Biagiola  
;
Meier, Roland
;
Guido Salvaneschi  
DOI
https://doi.org/10.1145/3798226
Abstract
Infrastructure-as-Code (IaC) engines, such as Terraform, OpenTofu, and Pulumi, automate the provisioning and management of cloud resources. They parse IaC specifications and orchestrate the required actions, making them the backbone of modern clouds, and critical to the reliability of both the underlying infrastructure and the software that depends on it. Despite this importance, this class of systems has received little attention: prior work largely targets the correctness of IaC programs rather than the IaC engines themselves. Existing test suites rely on manually written oracles and struggle to expose faults that manifest across multiple executions, leaving a significant reliability gap.

We present EMIaC, a metamorphic testing framework for IaC engines. EMIaC defines metamorphic relations as graph-based transformations of IaC programs and checks invariants across executions of the original and transformed programs. A central novelty is our use of e-graphs in software testing, as both a test-input generator and an equivalence oracle. E-graphs compactly represent program equivalences, enabling the systematic generation of large spaces of equivalent IaC programs. To ground these relations, we analyze 43,593 real-world Terraform programs and show that IaC dependency graphs are typically small and sparse, making e-graphs a natural fit.

Evaluating EMIaC on Pulumi, Terraform, and OpenTofu, we show that it complements existing test suites by exercising engine-critical code paths and covering 98 previously untested statements in Terraform and 1,313 in Pulumi. EMIaC also uncovers previously unknown issues in all three test suites, improving their adequacy. Three test cases have been merged into Terraform's main branch, and Pulumi has merged a specification fix.
Funding(s)
Consistency Programming for Local First Software(10001777)  
European Open Compute Architecture for Powerful Edge(101189899)  
Language
English (United States)
HSG Classification
contribution to scientific community
Refereed
Yes
Event Title
Object-Oriented Programming, Systems, Languages & Applications (OOPSLA)
Event Location
Oakland, California, United States
Event Date
Sat 3 - Fr 9 October 2026
URL
https://www.alexandria.unisg.ch/handle/20.500.14171/125157
Subject(s)

computer science

Division(s)

ICS - Institute of Co...

Additional Information
https://doi.org/10.5281/zenodo.18755966
File(s)
Thumbnail Image
Name

Metamorphic Testing for Infrastructure-as-Code Engines - 2026_Metamorphic-Testing-for-IaC-Engines.pdf

Size

608.24 KB

Format

Adobe PDF

Checksum (MD5)

c684b5b4297f38be902ecc447db51ccc

Support
HSG researchers can find instructions here for adding or importing publications (DOI, ORCID). Please send questions to alexandria@unisg.ch

Built with DSpace-CRIS software - Extension maintained and optimized by 4Science

  • Accessibility settings
  • Privacy policy
  • End User Agreement
  • Send Feedback
Repository logo COAR Notify