| With the globalization of economic and the rapid development of science and technology,new features in software development are emerging.Otherwise,because the competition in the market is so strong,the software requirements are often changed and the software should be developed with fast-paced.Therefore,the agile software development called light weight software process appears,compared with heavy weight software process.Agile software development is the capability of rapid software development while facing a rapidly changing requirement.Extreme programming is one of the most famous agile software developments, consists of a series of simple and interdependent practice.As one of the extreme programming core practice,test driven development also reflects the second value manifesto of agile software development,which is working software over comprehensive documentation.In the test driven development,the unit test is the center,so the test for defining product code behavior should be programmed,before programming every product code.At the same time,the programmed product code should pass the unit test.The unit tests can be executed completely automated in test drive development,which also should be executed before or after the reconstruction.Based on the realization of Shanghai civilian management information system integration and application,this paper researches on how to apply test driven development in e-government system effectively.Shanghai civilian management information system project,is a systems engineering service for the organizational and public departments,in which some more mature or even leading information technology are adopted in the world,such as:application development and deployment approach based on lightweight container architectonic,and so on. Lightweight container is not binding with J2EE,so it can run in the WEB container and a standard application as well,even it can run in the EJB container.Moreover,it is also not binding with Servlet API.The cost of start up lightweight container is very little,does not need any EJB deployment steps.With these features of lightweight container,as one of the core of test driven development,the unit test can be programmed and implemented.This paper mainly studies on the implementation approach of test driven development and the unit test in lightweight container architectonic,and the unit test implementation rules.The influence of test driven development on software development process result also is researched in this paper.The mainly research achievement in this paper is,for applying test driven development in e-government system effectively,which can be extended to most of B/S three tier structure based on lightweight container architectonic.Such as:extracting business logic related with data access object(DAO) pattern separation and database operation from business logic codes,implementing the unit test of those codes and the executed repeatability. Code generator was implemented for DAO pattern codes,it implements the semi-automatization of the DAO pattern codes and the related unit tests,and reduces the repeated coding work and improves the development efficiency. |