2023年全國碩士研究生考試考研英語一試題真題(含答案詳解+作文范文)_第1頁
已閱讀1頁,還剩8頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、<p>  Novel Software Automated Testing System Based on J2EE</p><p><b>  Abstract</b></p><p>  Software automated testing is one of the critical research subjects in the field of

2、 computer application. In this paper, a novel design of architecture called automated testing system (ATS) is proposed. Based on techniques relating to J2EE including MVC design pattern, Struts framework, etc, ATS can su

3、pport 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 enviro</p><p>&l

4、t;b>  Key words</b></p><p>  automated testing system (ATS); J2EE; Tcl</p><p>  Introduction</p><p>  Software testing is a critical phase within the softwar

5、e lifecycle, 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 researc

6、h problem in the computer application research area. The increased complexity of systems as well as short product release schedules makes the task of testing challenging. Therefore, how to improve the software qualities

7、and h</p><p>  As a result, software testing is the biggest challenging work during the software lifecycle, especially the software automated testing. Subsequently, test-driven development is advocated by en

8、gineers. 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 a

9、utomated testing. To our knowledge, most of the present automated testing tools or products c</p><p>  However, ATS is a black-box testing system based on J2EE theories such as MVC design pattern, Strut

10、s 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

11、language. Thus, the two function modules abide by browser/server model naturally. Under the strong support of front-end module, testers without any prerequisite knowledge can master</p><p>  1. Related Work&

12、lt;/p><p>  The most popular methods about automation test include record-playback, functional decomposition, data-driven, and keywords-driven. Record-playback is applied in GUI test products usually, such as W

13、inrunner1, 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 provide both the input and the expected-results ve

14、rification. However, tester using this method must not only maintain the detail te</p><p>  In recent years, there are many products and architectures surged out. Blackburn, for instance, proposed a model-ba

15、sed 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 focu

16、ses on how test engineers can develop more reusable models by clarifying textual requirements as models in terms of component or system interfaces. However, due to un-can</p><p>  2. ATS Architecture</p&g

17、t;<p>  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

18、 module is implemented by Java beans or even enterprise Java beans.</p><p>  The ATS is made up of user interface, request handler manager, job controller, normal request handlers, execution server, and suit

19、e execute layer. The user interface module provides front-end user with convenient operational interfaces to send the user's operation requests to the request handler manager module. However, the request handler mana

20、ger module will not deal with these requests by itself, but just forward them to some specific handler or action threads.</p><p>  In fact, there are two kinds of user request. One is related to control logi

21、c belong 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 contro

22、ller and execution server can run on different servers independently. A job controller can control several execution servers synchronously. And execution server is designed by a finite states machine, whi</p><

23、p>  2.1. Request handler manager</p><p>  The front-end interfaces of ATS are Web pages. Tester can program test scripts or drag methods from the basic library programmed in Tcl scripts to form a complete

24、 program segment. All these requests will be dispatched to server. Generally, every request from front-end interface has its own handler function in the execution server. If Web browser sends every request to the corresp

25、onding handler immediately, the Web browser must store all these relationships between request and handler function th</p><p>  2.2. Job controller</p><p>  In ATS, there are three kinds of test

26、 events—job, suite, and case. Job is an integrator of suite queues, which can be scheduled and allocated to an appointed execution server. Suite is an implementing entity, which is assigned to suite execute layer by exec

27、ution server. Case is an executable scripts designed in accordance with a certain business in Tcl script language.</p><p>  Job controller, job executer, and suite executer can update or query their files st

28、oried in database, respectively, through different interfaces. Obviously, job controller is responsible for controlling the states of jobs and assigning jobs to different job executers for distributed execution. So, the

29、job controller plays a key role in the whole working, which guarantees the entire system to run smoothly. Generally, different phases have different states. To control all these states well, we des</p><p>  

30、2.3. Execution server</p><p>  Job controller launches a job to execute according to its state. Execution server receives execution job command and builds a suites queue for it, which will call suite execute

31、 layer to execute these suites in turn. When execution server receives the results returned from suite execute layer, it will check whether the suite queue is null. If not, it will notice the next suite to execute in the

32、 suite execute layer. Otherwise, the execution server will inform job controller that all suites belong </p><p>  Obviously, the suite execute layer is constituted by some executable scripts or commands to i

33、mplement the task of a case. These scripts can be designed in Tcl language in a certain templates which can speed up the rate of testing development and guarantee the qualities of testing programs. The other function of

34、the suite execute layer is that it provides APIs and external interfaces such as GUI API, Socket API to support a third tool -- Winrunner or QTP. Therefore, ATS has powerful flexibility a</p><p>  Conclusion

35、s</p><p>  Compared with traditional automated testing tools, ATS is a novel software automated testing system applied to a communication company by plenty of successful test (such as GUI test with the help

36、of Winrunner and back-end program test, etc.). It has been regarded as an effective and novel testing system with distributed function, resource management function, and strong expansibility. Specially, we can design dif

37、ferent APIs to implement different testing business and the scripts of regression te</p><p>  基于J2EE的新型軟件自動化測試系統(tǒng)</p><p><b>  摘要</b></p><p>  軟件自動化測試是在計(jì)算機(jī)應(yīng)用領(lǐng)域的重要研究課題之一。在本

38、文中,提出那些設(shè)計(jì)新穎的系統(tǒng)為自動測試系統(tǒng)(ATS)。根據(jù)有關(guān)J2EE技術(shù),包括MVC設(shè)計(jì)模式,開源軟件框架等,自動化測試系統(tǒng)可以使用Tcl腳本語言編程相關(guān)的API,在理論上支持任何黑盒測試項(xiàng)目。此外,自動化測試的核心是建立在Java上,它可以在不同的環(huán)境中工作,而無需重新構(gòu)建。通過大量的通信行業(yè)中的應(yīng)用驗(yàn)證新系統(tǒng)的效率和結(jié)果,這也表明該方法的有效性和靈活性。</p><p><b>  關(guān)鍵字<

39、/b></p><p>  自動化測試系統(tǒng);J2EE;Tcl</p><p><b>  簡介</b></p><p>  軟件測試是軟件生命周期內(nèi)的關(guān)鍵階段,目前受到了越來越多的企業(yè)重視。尤其是軟件自動化測試在軟件產(chǎn)業(yè)中正成為最具爭議的話題。因此,現(xiàn)在自動化測試軟件是在計(jì)算機(jī)應(yīng)用研究領(lǐng)域的熱門研究話題。測試系統(tǒng)以及短期的產(chǎn)品發(fā)布時間表增

40、加了測試的復(fù)雜性,使得測試任務(wù)更具有挑戰(zhàn)性,所以如何提高軟件質(zhì)量和測試的效率變得尤其困難。</p><p>  因此,軟件測試最具有挑戰(zhàn)性的工作是在軟件的生命周期,特別是軟件自動化測試期間,這些問題被測試驅(qū)動開發(fā)工程師所提出。同時,軟件性能的成熟度模型,提出了在軟件開發(fā)的過程中確保軟件質(zhì)量控制,但它對軟件自動化測試的效果有限。據(jù)我們所知,目前的自動化測試工具或產(chǎn)品最擔(dān)憂的是如何在不同的情況下實(shí)現(xiàn)沒有統(tǒng)一的測試系統(tǒng)

41、的測試目標(biāo),就更不用說分布式測試和跨平臺的測試功能了。</p><p>  然而,該自動化測試系統(tǒng)是一個基于J2EE的MVC設(shè)計(jì)模式、開源軟件框架和開源代碼鞏固層的黑箱測試系統(tǒng),其中包括兩個功能模塊:一個是在Java腳本語言開發(fā)的前端模塊,另一種是后端模塊——純Java語言開發(fā)自動化測試系統(tǒng)的核心。這兩個功能模塊遵循瀏覽/服務(wù)模式,在前端模塊的強(qiáng)大功能幫助下,沒有任何測試知識的測試人員,也可以在很短的訓(xùn)練時間掌握

42、它。此外,由于是純Java代碼編寫,自動化測試系統(tǒng)的核心可以支持跨平臺的執(zhí)行,它同樣可以支持分布式執(zhí)行,通過分離作業(yè)控制端和執(zhí)行服務(wù)端來實(shí)現(xiàn)。理論上每個測試業(yè)務(wù)都可以支持自動化測試系統(tǒng),這歸功于其優(yōu)秀的內(nèi)在功能——自定義的API庫,它可以針對不同的特殊目標(biāo)與Tcl腳本語言迅速開發(fā),并且API對工作在前端系統(tǒng)的測試人員來說是透明的,他們需要做的只是根據(jù)具體情況填充合適的數(shù)據(jù)到工作測試界面。</p><p><

43、b>  相關(guān)工作</b></p><p>  關(guān)于自動化測試最常用的方法包括回歸測試、功能分塊檢測、數(shù)據(jù)驅(qū)動和關(guān)鍵字驅(qū)動?;貧w測試通常應(yīng)用在GUI測試產(chǎn)品,如WinRunner。功能分塊檢測方式是數(shù)據(jù)驅(qū)動和關(guān)鍵字驅(qū)動方式的一種初期樣板,從功能不同的數(shù)據(jù)和使用數(shù)據(jù)文件提供的輸入來和預(yù)期的結(jié)果對比驗(yàn)證。然而,使用這種方法的測試不僅必須保持詳細(xì)的測試計(jì)劃的具體數(shù)據(jù),也必須重新輸入各種所需的數(shù)據(jù)到數(shù)據(jù)文

44、件中。數(shù)據(jù)驅(qū)動的方法是通過電子表格文件記錄數(shù)據(jù),如Excel和依靠各種API和關(guān)鍵數(shù)據(jù)執(zhí)行的測試腳本。關(guān)鍵字驅(qū)動是一種先進(jìn)的數(shù)據(jù)驅(qū)動的方法,該方法使用實(shí)際測試人員開發(fā)使用含有特殊關(guān)鍵字的電子表格的測試用例文檔。在這種方法中,整個測試過程是數(shù)據(jù)驅(qū)動和關(guān)鍵字控制處理。由此,自動化測試系統(tǒng)在各項(xiàng)基本功能和工程API的支持下和結(jié)合數(shù)據(jù)驅(qū)動和關(guān)鍵字驅(qū)動的方法靈活管理、控制功能,使其具備強(qiáng)大的編程功能。</p><p>  

45、近年來,有許多自動化測試產(chǎn)品和架構(gòu)大量涌現(xiàn)。布萊克本提出了一種基于模型的使用接口驅(qū)動自動化測試方法稱為自動化測試框架(TAF),可以結(jié)合需求建模,以支持自動化測試用例和測試驅(qū)動程序生成。該模型著重于如何讓測試工程師可以開發(fā)更多功能明確的可重用的套件模型或系統(tǒng)接口模型。然而,由于聯(lián)合國的規(guī)范要求文檔和嚴(yán)格的業(yè)務(wù)控制,它很難擴(kuò)大到許多的大型軟件公司,更別說那些中小型公司。同時,基于套件的測試方法被提出,如CBSFG等。遺憾的是,他們不夠關(guān)心

46、自動化測試的框架結(jié)構(gòu),而把大部分注意力放在如何生成測試用例。iSoftTech2自動化測試系統(tǒng)和AXE3自動化測試框架是優(yōu)秀的自動化系統(tǒng),但沒有分布式和跨平臺的功能。WinRunner和Robot4等為主導(dǎo)的商業(yè)產(chǎn)品的設(shè)計(jì)沒有太多考慮有關(guān)的兼容性和可移植性的問題。這些傳統(tǒng)測試產(chǎn)品關(guān)心跨平臺、分布式控制和分布式執(zhí)行能力的程度還遠(yuǎn)遠(yuǎn)不夠。</p><p>  自動化測試系統(tǒng)的構(gòu)建</p><p&g

47、t;  自動化測試系統(tǒng)是根據(jù)Struts和MVC設(shè)計(jì)模式且基于J2EE開發(fā)的。服務(wù)器端建立在Tomcat服務(wù)器上,而客戶端在JSP編程的網(wǎng)頁,后端的業(yè)務(wù)邏輯模塊由Java Bean或企業(yè)Java Beans實(shí)現(xiàn)。</p><p>  自動化測試系統(tǒng)由用戶界面、請求處理程序管理、作業(yè)控制、正常的請求處理程序、執(zhí)行服務(wù)端和套件執(zhí)行層等組成。用戶接口模塊提供了方便的操作界面給前端用戶發(fā)送用戶的操作請求到處理程序管理模塊

48、。不過,請求處理程序管理模塊不處理這些請求本身,而只是轉(zhuǎn)發(fā)給一些特定的處理程序或活動線程。</p><p>  實(shí)際應(yīng)用中存在兩種用戶的要求。一種屬于測試套件或測試工作的相關(guān)邏輯控制,另一種是除第一種外的雜項(xiàng)要求。所有有關(guān)邏輯控制的要求都由工作控制端處理。為了支持分布式執(zhí)行,工作控制端和執(zhí)行服務(wù)端可以運(yùn)行在不同且獨(dú)立的服務(wù)器上。工作控制端可以同步控制多個執(zhí)行服務(wù)端,執(zhí)行服務(wù)端由一個有限狀態(tài)機(jī)設(shè)計(jì)而成,該狀態(tài)機(jī)可以

49、在測試工作中運(yùn)行測試套件隊(duì)列??。當(dāng)完成這些工作隊(duì)列??中的所有套件測試,執(zhí)行服務(wù)端會通知工作控制端,改變工作狀態(tài)。該套件執(zhí)行層負(fù)責(zé)編制和操控某些套件或用例執(zhí)行一個特定的測試任務(wù),這就是一個自動測試系統(tǒng)的執(zhí)行核心。同時,它提供了一個統(tǒng)一的測試框架和各種API,方便編程測試腳本。</p><p><b>  請求控制管理</b></p><p>  自動化測試系統(tǒng)的前端

50、界面是Web頁面??,測試人員可以制定測試腳本或從Tcl腳本編程的基本庫制定方案,形成一個完整的程序段。所有的這些請求都將被分配到服務(wù)端,一般來說,從前端接口發(fā)送的每一個請求在執(zhí)行服務(wù)端上都有其自己的處理函數(shù)。如果Web瀏覽器立即發(fā)送每一個請求到相應(yīng)的處理程序,Web瀏覽器就必須保存所有這些請求和處理函數(shù)之間的關(guān)系,但這會降低整個系統(tǒng)的靈活性和可擴(kuò)展性。為了解決這個問題,自動化測試系統(tǒng)創(chuàng)建了一個請求處理程序管理模塊保存這些請求和處理函數(shù)

51、之間的關(guān)系。</p><p><b>  2.2工作控制端</b></p><p>  在自動化測試系統(tǒng)中有3種測試方面——作業(yè)、套件和用例。作業(yè)是一個集成套件隊(duì)列,可以預(yù)定并分配到指定的服務(wù)端執(zhí)行;套件是一個執(zhí)行實(shí)體,它被執(zhí)行服務(wù)端分配到符合的執(zhí)行層;用例是按照某些業(yè)務(wù)需求用Tcl腳本語言設(shè)計(jì)的一個可執(zhí)行的腳本。</p><p>  工作控制

52、端、工作執(zhí)行者和套件執(zhí)行者可以分別通過不同的接口更新或查詢自己保存在數(shù)據(jù)庫中的文件。顯然,工作控制端負(fù)責(zé)控制工作的狀態(tài),并為分開的執(zhí)行程序分配工作給工作執(zhí)行者。因此,工作控制端在整個工作中起著關(guān)鍵作用,保證了整個系統(tǒng)的順利運(yùn)行。一般來說,不同階段有不同的狀態(tài),而要控制所有這些狀態(tài),我們就要設(shè)計(jì)一個有限狀態(tài)機(jī)。</p><p><b>  2.3執(zhí)行服務(wù)端</b></p><

53、;p>  工作控制端根據(jù)其狀態(tài)啟動工作來執(zhí)行,執(zhí)行服務(wù)端接收到這些執(zhí)行工作的命令后建立一個套件隊(duì)列,并調(diào)用套件執(zhí)行層依次執(zhí)行這些套件。當(dāng)執(zhí)行服務(wù)端接收到從套件執(zhí)行層??返回的結(jié)果,它會檢查是否套件隊(duì)列為空,如果不是,它會把下一個套件放到套件執(zhí)行層執(zhí)行,否則,執(zhí)行服務(wù)端會通知工作控制端所有的套件已經(jīng)執(zhí)行完畢。</p><p>  顯然,套件執(zhí)行層由一些可執(zhí)行的腳本或用例執(zhí)行命令構(gòu)成,這些腳本可以在特定的模板下

54、用Tcl語言編成,這樣可以加快測試速度并保證測試項(xiàng)目的準(zhǔn)確率。套件執(zhí)行層另外的功能提供了API和外部接口,如GUI API和套接字API來支持第三方工具——WinRunner或QTP等。因此,自動化測試系統(tǒng)具有強(qiáng)大的靈活性和可擴(kuò)展性。</p><p><b>  結(jié)論</b></p><p>  與傳統(tǒng)的自動化測試工具相比,自動化測試系統(tǒng)是一種新型的軟件自動化測試系統(tǒng)

55、,被廣泛應(yīng)用在通信行業(yè)并通過大量的試驗(yàn)取得顯著成效(如在WinRunner和后端程序的測試幫助下實(shí)行GUI測試)。它被視為一種高效和新穎的測試系統(tǒng),同時具備分布式功能、資源管理功能和可擴(kuò)展性強(qiáng)等優(yōu)點(diǎn)。值得一提的是,我們可以通過設(shè)計(jì)不同的API來應(yīng)對不同的測試業(yè)務(wù),設(shè)計(jì)回歸測試腳本到自動化測試系統(tǒng)中執(zhí)行,運(yùn)用時只需要修改全局輸入變量,而無需修改任何命令行。從某種意義上講,自動化測試系統(tǒng)實(shí)際上是一個普通的自動化測試框架。</p>

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論