一句话:提出 HIT 单元测试框架,将模糊测试与 concolic execution 结合,用于 IaC 程序的资源状态相关测试。
基础设施即代码(IaC)已成为现代云与系统部署的基石,但其程序行为依赖所管理资源在外部提供方上的状态,且 IaC 程序复杂、动态,导致正确性难以保证、测试尤为困难。本文提出 HIT,一种面向 IaC 程序的单元测试框架,能够利用相关的资源状态来有效测试 IaC 代码。HIT 将模糊测试与 concolic execution(混合执行)相结合,这两种技术此前尚未在 IaC 代码上被探索过。实验表明,HIT 相比现有最先进方法取得了更高的代码覆盖率。
Infrastructure as Code (IaC) has become a cornerstone of modern cloud and system deployment, enabling automated and repeatable infrastructure provisioning. However, ensuring the correctness of IaC programs remains challenging due to their complexity and dynamic nature. In particular, IaC programs can exhibit different behaviors depending on the state of the resources they manage. Since these resources are deployed on external providers, accounting for their possible states is difficult, making the testing phase particularly challenging. This paper presents HIT, a novel unit-testing framework for IaC programs that effectively tests IaC code using relevant resource states. HIT combines fuzzing and concolic execution, two effective yet previously unexplored techniques for IaC code. Our experiments confirm that HIT achieves better code coverage than state-of-the-art approaches.