传统的Usecase模型已经被扩展用于建立领域需求模型,但该模型并不支持领域测试用例的复用和自动生成。给出了领域用例的形式化定义方式,增加了最小数据触发集的描述,提出了用例的动态模型和静态模型概念。扩展活动图用于表示用例之间的动态关系和执行过程,并将值流和对象流融入到活动图的表示中。依据用例的动态模型,可以直接产生测试用例,同时获取测试数据,从而实现领域软件需求与领域测试用例的裁剪过程一致性和同步性。
Traditional use case model is used to build domain requirement model. But test case can not be generated directly from this model. The concepts of static model and dynamic model of use case are defined explicitly. As dynamic model, the activity diagram is extended to express dynamic relationship between use cases and their executed process- Test data is abstracted easily for object and value are embedded into the activity diagram. The algorithm of generating test case directly from the use case requirement domain is put forward. So, the tailor process of the domain requirement model and the domain test case consistency and synchronization is realized.