Font Size: a A A

MDA-Based Automated Generation Of Test Cases And Supporting Framework

Posted on:2011-07-16Degree:MasterType:Thesis
Country:ChinaCandidate:C H ZhuFull Text:PDF
GTID:2178360305993781Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Software testing is an important method to ensure software quality, which runs through the whole process of software development. Unit testing checks the correctness of the smallest unit in the software design, which brings security to the following developing and testing of software. Therefore, unit testing is not only the first step of software testing, but also the most crucial one. As its recursive, unit testing could be assisted by some automated tools. Because the workload of software testing is very heavy and it is difficult to ensure the testing quality by manually designing test cases, thus it provides practical significance for the research of the automated generation of test cases.This paper conducts the research from two aspects:the unit testing framework of.NET platform which named NUnit and the automated generation of test cases based on the.NET platform. At the beginning of this paper, it introduces relevant background knowledge of software testing, including software testing techniques, model-based software testing. And an analysis about advantages and disadvantages of model-based software testing is made here. Besides, the summary of the research status of model-based software testing is also provided in this paper.Next, this paper studies the NUnit unit testing framework and analyzes its structure and working principle in detail. As while doing unit testing with NUnit, there is a lot of redundancy existing in the test codes, this paper proposes to improve NUnit and gives some strategies for the modification to realize the isolation between test data and code. Meanwhile, it provides corresponding generation algorithms of TDC and TCF, which is the key part of the improved NUnit framework which named i-NUnit.Finally, a method based on MDA to generate unit test cases for the improved NUnit automatically is proposed in this paper. The method takes sequence diagram as object, and SUT model, SUT meta-model, horizontal transformation specifications, xUnit meta-model as the initial inputs to generate test cases by the two conversions (horizontal and vertical). The paper shows this method applied to ATM simulation system, and does some experiments with it. At the same time, it takes the withdrawal module of ATM simulation system as SUT, generates test cases for this module automatically. The result of experiment shows that the method is feasible. Besides, this method is also of some versatility and can be applied to all frameworks of the xUnit family.
Keywords/Search Tags:MDA, NUnit improvement, xUnit, automated testing, automated generation of test cases
PDF Full Text Request
Related items