• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2014, Vol. 36 ›› Issue (04): 662-666.

• 论文 • 上一篇    下一篇

基于ASL的模型驱动架构测试方法

张小艳,文辉   

  1. (西安科技大学计算机科学与技术学院,陕西 西安 710054)
  • 收稿日期:2012-09-11 修回日期:2012-12-19 出版日期:2014-04-25 发布日期:2014-04-25

Testing method for model driven architecture based on ASL             

ZHANG Xiaoyan,WEN Hui   

  1. (College of Computer Science and Technology,Xi’an University of Science and Technology,Xi’an 710054,China)
  • Received:2012-09-11 Revised:2012-12-19 Online:2014-04-25 Published:2014-04-25

摘要:

针对模型驱动架构(MDA)下的软件开发方法中测试启动比较晚、难以发现隐藏在模型中的缺陷及UML模型描述缺乏精确语义等问题,提出了基于ASL的模型测试方法:从UML模型出发,将动作规约语言(ASL)运用于平台无关模型(PIM)上建立测试模型。给出了ASL语句在MDA过程中的工作原理、平台无关模型的建立过程、测试用例建立的步骤、测试执行的实施过程,最后结合实例,在UML图的基础上运用ASL对测试环境进行构建,并创建了系统的测试用例,对模型及业务逻辑进行了测试。实验结果表明,提出的基于ASL的模型测试方法既能利用模型驱动对复杂的测试用例进行简化和抽象,又能在软件生存期早期揭示软件的缺陷,防止缺陷随着软件开发过程的进行而被放大。

关键词: 模型驱动架构, 动作规约语言, 平台无关模型, 测试用例

Abstract:

Aiming at the issues of late test startup in software development methods with model driven architecture (MDA), difficulty in finding the flaws hidden in models,deficient precise semantemes in UML model description and others, proposes a model test method based on ASL:Starting from the UML model, Action Specification Language (ASL) is applied to platform independent model (PIM) in order to build a test model. Narrates the operation mode of ASL sentences in MDA process,creating process of PIM, steps for building test cases,implementation of tests,and finally applies ASL to build test environment on the basis of UML diagrams by combining examples and creates systematical test cases to test the model and business logic.Experimental results show that the proposed model test method based on ASL can not only simplify and abstract the complicated test cases by using model driven, but also disclose the flaws in the earlier part of software life cycle,preventing the flaws from being amplified as the software development process continues.

Key words: model driven architecture;action specification language;platform independent model;test case