arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1206.0373cs.SE
收藏

基于状态图的面向对象软件测试用例生成与优化

Generation and Optimization of Test cases for Object-Oriented Software Using State Chart Diagram

Ranjita Kumari Swain, Prafulla Kumar Behera, Durga Prasad Mohapatra

摘要:

测试任何软件系统的过程都是一项巨大的任务,既耗时又昂贵。随着软件的规模和复杂性增加,进行充分测试所需的时间和工作量也会增加,这可能会导致项目预算超支、软件系统开发延迟或某些测试用例可能无法覆盖。在SDLC(软件开发生命周期)中,通常软件测试阶段花费大约40 - 70%的时间和成本。基于状态的测试在软件测试中经常使用。测试数据生成是软件测试的关键问题之一。正确生成的测试集不仅可以定位软件系统中的错误,而且有助于降低与软件测试相关的高成本。通常期望可以自动生成测试套件内的测试序列形式的测试数据以实现所需的测试覆盖。针对基于状态的软件测试,提出了一种测试数据生成的优化方法。本文从状态图出发,导出了第一状态转移图。然后,从状态图中提取所有需要的信息。然后生成测试用例。最后,通过计算每个测试用例的节点覆盖率来最小化一组测试用例。还确定哪些测试用例被其他测试用例覆盖。我们的测试生成技术的优点是,它通过最小化时间和成本来优化测试覆盖率。提出的测试数据生成方案生成满足变迁路径覆盖准则、路径覆盖准则和动作覆盖准则的测试用例。以自动售票机(ATM)为例进行了分析.

英文摘要:

The process of testing any software system is an enormous task which is time consuming and costly. The time and required effort to do sufficient testing grow, as the size and complexity of the software grows, which may cause overrun of the project budget, delay in the development of software system or some test cases may not be covered. During SDLC (software development life cycle), generally the software testing phase takes around 40-70% of the time and cost. State-based testing is frequently used in software testing. Test data generation is one of the key issues in software testing. A properly generated test suite may not only locate the errors in a software system, but also help in reducing the high cost associated with software testing. It is often desired that test data in the form of test sequences within a test suite can be automatically generated to achieve required test coverage. This paper proposes an optimization approach to test data generation for the state-based software testing. In this paper, first state transition graph is derived from state chart diagram. Then, all the required information are extracted from the state chart diagram. Then, test cases are generated. Lastly, a set of test cases are minimized by calculating the node coverage for each test case. It is also determined that which test cases are covered by other test cases. The advantage of our test generation technique is that it optimizes test coverage by minimizing time and cost. The proposed test data generation scheme generates test cases which satisfy transition path coverage criteria, path coverage criteria and action coverage criteria. A case study on Automatic Ticket Machine (ATM) has been presented to illustrate our approach.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑