透過您的圖書館登入
IP:3.147.65.65
  • 學位論文

基於循序圖的測試案例產生器

A Test Case Generator For Sequence Diagrams

指導教授 : 林迺衛
若您是本文的作者,可授權文章由華藝線上圖書館中協助推廣。

摘要


軟體測試是確保軟體品質的主要方法之一,然而軟體測試純靠人力,曠日廢時且容易出錯。本篇論文實作一個整合測試的測試案例產生器,可以自動化地產生整合測試的測試案例,以降低軟體開發成本及提高軟體品質。 本工具使用循序圖、類別圖和物件限制語言作為規格輸入,其中循序圖用來描述物件之間函式呼叫的行為;類別圖和物件限制語言描述函式內部的行為。 此工具首先分析類別圖和物件限制語言規格並將這兩個規格轉換成函式限制圖,並將循序圖轉換成函式循序圖。接著在函式循序圖上系統化地條列測試路徑。藉由測試路徑和路徑上呼叫的函式的函式限制圖可以產生這條路徑相對應的限制邏輯敘述。一個限制邏輯敘述表示一條測試路徑所需滿足的限制式。執行這個限制邏輯敘述可解出滿足該測試路徑限制式的測試輸入與預期輸出。最後根據測試輸入與預期輸出可產生Java測試碼。使用者便可使用JUnit平台自動測試所產生出來的Java測試碼。

關鍵字

產生器 循序圖

並列摘要


Software testing is one of the main approaches to ensuring software quality. However, manual software testing incurs high development costs and is prone to errors. This thesis implements a test case generator to automatically generate test cases for integration testing. This test case generator can reduce development costs and upgrade software quality. This tool uses UML sequence diagrams, UML class diagrams, and the Object Constraint Language (OCL) as specification languages. Sequence diagrams are used to describe the behavior of the method calls among objects. Class diagrams and OCL are used to describe the behavior within a method. This tool first converts each class diagram and OCL to a method constraint graph. It also converts each sequence diagram to a method sequence graph. This tool then systematically generates test paths on the method sequence graph. This tool then generates a corresponding constraint logic programming predicate for each test path and the method constraint graphs of the called methods in the test path. A constraint logic programming predicate represents the set of constraints in a test path. The solution of the constraint logic programming predicate is the test input and expected output satisfying the constraints on the test path. Finally, the test input and expected output are used to generate a Java test class. Users can then execute the generated Java test class in the JUnit testing framework to automatically test the class under test.

並列關鍵字

Sequence Diagrams Generator

參考文獻


[1] M. Fowler, UML Distilled Third Edition - A Brief Guide to the Standard Object Modeling Language , Addison-Wesley,2005.
[3] B. Bezier, Software Testing Techniques 2nd Edition, Van Nostrand, 1990.
[6] C.Y. Lin, A Black-Box Method Level Test Case Generation Based on Constraint Logic Programming, Master Thesis, National Chung Cheng University,2011.
[8] K. Beck, Test-Driven Development: by Example, Addison-Wesley, 2003.
[10] J. Warmer and A. Kleppe, The Object Constraint Language: Second Edition-Getting Your Models Ready for MDA, Addison-Wesley, Boston, 2003.

延伸閱讀