Font Size: a A A

The Research And Application In The Unit Testing By Using JUnit Framework

Posted on:2013-07-24Degree:MasterType:Thesis
Country:ChinaCandidate:D ZhangFull Text:PDF
GTID:2248330362966405Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Unit testing is an important part of software testing. It is not only to ensure thecorrectness of the code, but also can improve the design, easy for code refactoring.JUnit is a very powerful unit testing tool, which can test class and the methods ofclass. It also can organize the different test cases into the test suite, which can makethe testing task be run automatically.The theory of the J2EE frameworks and unit testing is introduced in this thesis.The work principle, and applicability and characteristics of regression testingframework, JUnit, Mock Objects, Cactus, HttpUnit is also analyzed. According to thedifficulties of the unit testing for the application of J2EE, this thesis presents unittesting strategy(United Testing Technique, UTT strategy) based on JUnit and itsframeworks on J2EE application. Isolated testing by the Mock Objects in the UTTstrategy has solved the problem by the interaction between components andcontainers. With the combination of characteristics of JUnit, Cactus and HttpUnitframework, the Sevrlet, JSP, EJB components and databases is tested.The UTT strategy is applied in the office management which is the NROA moduleof a research institutions information system, which is validated in workflowmanagement and application module. It compiles the test cases for the sub-moduleseffectively. The results show that unit testing with UTT strategy proposed in thisthesis on J2EE application is of value in a certain extent.
Keywords/Search Tags:Unit Testing, JUnit, Mock Objects, Cactus, J2EE
PDF Full Text Request
Related items