Font Size: a A A

The Study And Innovation About Mock Technology In Unit Testing

Posted on:2009-04-07Degree:MasterType:Thesis
Country:ChinaCandidate:X Q WuFull Text:PDF
GTID:2178360278972097Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
The software testing is a software mass guarantee key technology, occupies important location in software life cycle. The testing process is that one is monotonous in software exploitation process, the mass complicated and taking time ensures a link. RAD (fleetness application develop pattern) and the software may put the sex put forward in an important position especially with software scale expansion, software mass rise in recent year, a project is more and more hope participates in to , shortening a construction cycle and cutting down a fund to throw into to come to improve the testing efficiency strenuous testing job by the aid of effective automation software testing.Junit that is a test framework in Java is powerful enough to carry out everything in simply tests. But it is hard to gernate testing code since the objects and methods to be tested are not independent from others. Industry has suggested that the Mock Object technology comes to isolate the marriage partner who is tested thereupon. The now available Mock frames are JMock and easyMock mainly. Same as the two kinds of frameworks, all other Mock frames are all confined to a Mock concept: Mock Object is to be used to replace marriage partner of marriage partner synergetic with the code. But, the method testing is dependent on the method oneself location marriage partner and attribute except the marriage partner who is dependent on the outside. Be that the now available Mock technology has simulated the oneself method of the location marriage partner and not corresponding attribute simulation technology by the outside marriage partner that the testing method is dependent on, but being dependent on by testing method.The thesis tests the relevance technology in the element studying investigation and discussion, especially being suggested that the mockself concept , feasible all-round mock technology coverage have arrived at one on Mock technology basis, what been dependent on by testing method all outside affair. Realize a brand-new mock frame at the same time: Come to realize this concept mockself, the mock very easy to give way to a consumer is tested marriage partner self's attribute and method, is given mockself frame sigmatism out an example at the same time.
Keywords/Search Tags:MockSelf, Mock, Unit Testing In Java
PDF Full Text Request
Related items