1、Novel Software Automated Testing System Based on J2EE Abstract Software automated testing is one of the critical research subjects in the field of computer application. In this paper, a novel design of architecture called automated testing system (ATS) is proposed. Based on techniques relating to J2
2、EE including MVC design pattern, Struts framework, etc, ATS can support any black-box testing business theoretically with relevant APIs programmed using Tcl script language beforehand. Moreover, as the core of ATS is built in Java, it can work in different environments without being re-complied. The
3、 efficiency of the new system is validated by plenty of applications in communication industry and the results also show the effectiveness and flexibility of the approach. Key words automated testing system (ATS); J2EE; Tcl Introduction Software testing is a critical phase within the software lifecy
4、cle, currently more and more companies are paying attention to it. Especially, the software automated testing is becoming the most disputed subject in the software industry. Therefore, it is now a popular research problem in the computer application research area. The increased complexity of systems
5、 as well as short product release schedules makes the task of testing challenging. Therefore, how to improve the software qualities and how to advance the testing efficiency are difficult. As a result, software testing is the biggest challenging work during the software lifecycle, especially the sof
6、tware automated testing. Subsequently, test-driven development is advocated by engineers. At the same time, software capability maturity model is put forward for controlling the process of software development and for guarantying the software quality, but it imposes limited effects on software autom
7、ated testing. To our knowledge, most of the present automated testing tools or products concern how to partition cases or how to implement a single target of testing without uniform testing system, not to mention the distributed and cross-platform testing functions. However, ATS is a black-box testi
8、ng system based on J2EE theories such as MVC design pattern, Struts framework, Hibernate persistence layer, etc, which comprises two function modules: one is a front-end module developed in Java script language, the other is a back-end module the core of ATS developed in pure Java language. Thus, th
9、e two function modules abide by browser/server model naturally. Under the strong support of front-end module, testers without any prerequisite knowledge can master it in a short training time. Besides, the core of ATS can support cross-platform execution due to pure Java code, and it can support dis
10、tributed execution due to the separation of job controller and execution server. Every testing business is supported theoretically by ATS due to the excellent inherent capability self-defined APIs which can be developed by advanced testing developers quickly with Tcl script language aiming at differ
11、ent special targets, and the APIs is transparent to common testers who work on the front-end system, what they need to do is just filling suitable data into blanks of web interface according to specific cases. 1. Related Work The most popular methods about automation test include record-playback, fu
12、nctional decomposition, data-driven, and keywords-driven. Record-playback is applied in GUI test products usually, such as Winrunner1, etc. Functional decomposition method is an infant version of data-driven or keywords-driven method, which separates data from functions and uses data-files to provid
13、e both the input and the expected-results verification. However, tester using this method must not only maintain the detail test plan with specific data, but also re-enter this data in the various required data-files. Data-driven method records data by a spreadsheet file such as Excel and the execut
14、ions of test scripts depending on various APIs and key data. Keywords-driven is an advanced data-driven method, which uses the actual test case document developed by the tester using a spreadsheet containing special keywords. In this method, the entire process is data-driven as well and the keywords
15、 control the processing. However, ATS has strong programming function supported by various fundamental and businesss APIs and flexible management and control function due to combining data-driven and keywords-driven methods. In recent years, there are many products and architectures surged out. Blac
16、kburn, for instance, proposed a model-based test automation method called test automation framework (TAF) which uses an interface-driven approach that combines requirements modeling to support automated test-case and test-driver generation. The model focuses on how test engineers can develop more re
17、usable models by clarifying textual requirements as models in terms of component or system interfaces. However, due to un-canonical requirement documents and un-strict business control, it is very difficult to extend it to many big software companies, not to mention those middle-small companies. Mea
18、nwhile, the methods based on component test are proposed, such as CBSFG, etc. Unfortunately, they care little about the architecture of automated testing framework but pay attention to how to generate test cases. iSoftTech2 test automation system and AXE3 automated testing framework are excellent au
19、tomation systems, but without distributed and cross-platform functions. The dominating commercial products such as Winrunner and Robot4 are designed without much consideration about compatibility and portability. These traditional testing products care little about the operations on cross-platform,
20、distributed control, and distributed execution capabilities. 2. ATS Architecture ATS is developed according to Struts and MVC design pattern based on J2EE. Server end is built on the tomcat server while client end is presented on Web pages programmed in JSP, and back-end business logic module is imp
21、lemented by Java beans or even enterprise Java beans. The ATS is made up of user interface, request handler manager, job controller, normal request handlers, execution server, and suite execute layer. The user interface module provides front-end user with convenient operational interfaces to send th
22、e users operation requests to the request handler manager module. However, the request handler manager module will not deal with these requests by itself, but just forward them to some specific handler or action threads. In fact, there are two kinds of user request. One is related to control logic b
23、elong to test suite or test job, the other is miscellaneous request except from the first class. All the requests related to control logic are dealt with by job controller. To support distributed execution, job controller and execution server can run on different servers independently. A job controller can control several execution servers synchronously.