Their highly adaptive nature and the combinatorial explosion of possible configurations makes testing context-oriented programs hard. We propose a methodology to automate the generation of test scenarios for developers of feature-based context-oriented programs. By using combinatorial interaction testing we generate a covering array from which a small but representative set of test scenarios can be inferred. By taking advantage of the explicit separation of contexts and features in such context-oriented programs, we can further rearrange the generated test scenarios to minimise the reconfiguration cost between subsequent scenarios. Finally, we explore how a previously generated test suite can be adapted incrementally when the system evolves to a new version. By validating these algorithms on a small use case, our initial results show that the proposed test generation approach is efficient and beneficial to developers to test and improve the design of context-oriented programs.
翻译:其高度适应性以及可能的配置的组合爆炸使得测试以环境为导向的程序变得非常困难。 我们建议了一种方法来自动生成基于地貌背景的程序开发者的测试假想。 通过组合互动测试,我们产生了一个覆盖式阵列,从中可以推断出一组小型但具有代表性的测试假想。 通过在这种以环境为导向的程序中明确区分背景和特征,我们可以进一步重新安排生成的测试假想,以尽量减少随后的假想之间的重新配置成本。 最后,我们探索了在系统演变为新版本时,如何对以前生成的测试套件进行递增调整。 通过在小使用情况下验证这些算法,我们的初步结果显示,拟议的测试生成方法对于开发者测试和改进面向环境的程序的设计是有效的,而且对开发者有益。