A prototype implementation of the AUnit test automation framework for alloy




Yu, Jiaolong

Journal Title

Journal ISSN

Volume Title



Alloy is a declarative language based on relational first-order logic. Unlike commonly used procedural languages, the testing criteria of declarative languages like Alloy has remained largely ad hoc. Recent work on the AUnit test automation framework introduced a foundation for testing Alloy models. This report presents our effort on developing a prototype implementation of AUnit based on the standard Alloy distribution. Our implementation of AUnit has all core functionalities for writing unit tests, running all tests, showing the test execution results including the number of tests ran, the number of tests failed, coverage obtained (which is highlighted using coloring), all test requirements, and all uncovered requirements. We compute coverage for signatures, fields, predicates and specifically for primitive Booleans and quantified formulas. Our implementation can allow users to check the quality of their models in the spirit of traditional unit testing.


LCSH Subject Headings