Testing bidirectional model transformation using metamorphic testing.
Xiao He,Xing Chen,Sibo Cai,Ying Zhang,Gang Huang
DOI: https://doi.org/10.1016/j.infsof.2018.07.010
IF: 3.9
2018-01-01
Information and Software Technology
Abstract:Abstract Context In model-based software development, bidirectional model transformation (BX) provides a fundamental solution to model synchronization that can retain the consistency among models. Similar to conventional programs, a BX program may also contain bugs. Accordingly, a BX program must be tested prior to being used in practice. A challenging problem of testing BX programs is to construct test oracles (e.g., assertions and expected output models), which are usually difficult and/or expensive to manually specify. Objective In we paper, we investigate how to alleviate the oracle problem in BX testing via reducing the costs of developing test oracles. Method We propose a metamorphic testing approach for BX. First, we identify three generic metamorphic relations for BX. Afterwards, we define a metamodel MT4MT to establish metamorphic test groups and test scripts. We also propose a testing framework to support metamorphic testing based on MT4MT . Results We conducted an experimental study of mutation analysis and a case study on three ATL-based ad-hoc BXs. The results of the experimental study and the case study showed that our approach killed 79.38% mutants and enabled us to test real-world ATL-based ad-hoc BXs. We also demonstrated that MT4MT can be used to test the semantics properties of BXs. Conclusion Our approach is an effective and practical approach with lower costs of developing test oracles.
What problem does this paper attempt to address?