Computer Engineering and Applications ›› 2014, Vol. 50 ›› Issue (22): 59-64.

Previous Articles     Next Articles

Test-oriented component model and test case generation method

CAO Zhen, CAO Min   

  1. College of Computer Engineering and Science, Shanghai University, Shanghai 200072, China
  • Online:2014-11-15 Published:2014-11-13

面向测试的构件系统模型及测试用例生成方法

曹  真,曹  旻   

  1. 上海大学 计算机工程与科学学院,上海 200072

Abstract: With the extensive application of the component-oriented software development methods, the description and test of the component systems is becoming the key of software quality assurance. For the particularity of the component system complexity and development methods, component systems’ integration test using traditional methods often face with many difficulties. This paper presents an improved test-oriented component describe model called TCSM. It focuses on the interactions and behavioral constraints between components in the component systems and provides a wealth of information for the phase of functional test and boundary test in system integration test. An approach to transfer the TCSM to test model, which based on UML collaboration diagram and supports the conversion of one component system from its description model to test model automatically, is also proposed in the paper. Furthermore, an algorithm for generating test cases automatically is realized. TCSM can better describe the interactive behaviors and realize the automatic test of component-based systems. The proposed model can not only reduce plenty of time in the process of system modeling and test, but also improve the efficiency and reliability of the component-based systems.

Key words: component system integration testing, component system test model, model conversion, test case generation

摘要: 随着面向构件的软件开发方法的广泛应用,构件系统的描述和测试成为保证软件质量的关键所在。由于构件系统的复杂性和开发方法的特殊性,用传统方法对构件系统进行集成测试往往面对很多困难。提出了一种改进的面向测试的构件描述模型,称为TCSM,它着重对构件系统中的构件间的交互和约束进行了动态描述,为构件系统集成测试阶段的功能测试和边界测试等提供了大量可用信息。在此基础上,进一步提出一种把TCSM转换成测试模型的方法,以UML协作图模型为原型,实现了构件系统从描述模型到测试模型的自动转换。最后,实现了一种在所产生的测试模型上自动生成测试用例的算法。TCSM更好地描述了构件的交互行为信息,进一步实现了系统的自动化测试,减少了通常需要在构件系统搭建完成后,针对测试对系统手工建立测试模型的工作,提高了构件系统开发的效率和可靠性。

关键词: 构件系统集成测试, 构件系统测试模型, 模型转换, 测试用例生成