Summary: | 碩士 === 逢甲大學 === 資訊工程學系 === 105 === In recent years, the influence of design patterns on software quality has attracted an increasing attention in the area of software engineering, as design patterns encapsulate valuable knowledge to resolve design problems, and more importantly to improve design quality. Its concept has been implemented in many programming languages, including C ++, Java, C#, Python, Ruby and so on. In the academic field, design patterns has been an important research topic in the software engineering area.
Although design patterns may provide a good quality, but it usually needs complex and sophisticated design. According to our experience, design pattern beginners usually misused and produced a lot of mistakes. Moreover, many literatures also argue design patterns are complicated and lead to improper use. In order to examine whether design patterns are used correctly, many static detection tools have been developed to check if the fragment of the code that applies the design pattern satisfies the constraints of the design pattern. However, there are few relevant research articles addressing the dynamic aspect and provide testing approach.
In this research, we propose a "test pattern" method to help produce test cases for design patterns. By formulating the test condition of the design pattern, we use the formal language "GEBNF" to define our pattern potential violation (PPV) points. We can write test code in the standard formal language and provide a consistent specification test template for beginners to use correctly.
The processes of our testing method are (1) finding PPVs, (2) designing test method, (3) developing test case, (4) defining TPDP. At the last, our research develop dpUnit tool to generate test code for design patterns and also provide users with pattern testing.
|