畢業(yè)設(shè)計外文資料翻譯-Java移動端應用測試_第1頁
畢業(yè)設(shè)計外文資料翻譯-Java移動端應用測試_第2頁
畢業(yè)設(shè)計外文資料翻譯-Java移動端應用測試_第3頁
畢業(yè)設(shè)計外文資料翻譯-Java移動端應用測試_第4頁
畢業(yè)設(shè)計外文資料翻譯-Java移動端應用測試_第5頁
已閱讀5頁,還剩8頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、畢業(yè)論文(設(shè)計)外文資料翻譯學 院: 專業(yè)班級: 學生姓名: 學 號: 指導教師: 外文出處:(外文)Revista Information Economic,nr.3(47) 2008 附 件:1.外文資料翻譯譯文; 2.外文原文 指導教師評語:該英文資料選擇合理,與畢業(yè)設(shè)計論文相關(guān)度高。專業(yè)術(shù)語、詞匯翻譯的準確度較高,翻譯工作認真細致,嚴格按照規(guī)定,翻譯材料能與原文能保持一致,能正確表達出原文意思。簽名: 2015年 10月 15 日1.外文資料翻譯譯文Java移動端應用測試當今時代,移動應用正在廣泛使用并且發(fā)展很快。測試移動應用是其發(fā)展的一個重要方面,堅持了這些應用程序的重要性和特殊性。

2、本文所示測試移動應用的主要方面,關(guān)注Java ME應用程序的單元測試。關(guān)鍵詞:移動應用;移動設(shè)備;軟件測試;WAP;Java ME;JUnit1.簡介移動應用程序是用于各種領(lǐng)域如銀行、證券交易所、互聯(lián)網(wǎng)瀏覽、多媒體傳輸,移動學習。移動應用開發(fā)和他們的使用正在快速增長,有不同的硬件和軟件平臺。移動設(shè)備,如手機、智能手機、個人數(shù)字助理、傳播者、尋呼機等,與臺式電腦相比,特點是:缺少計算能力更少的內(nèi)存(RAM和ROM)小顯示器有限的用戶界面降低維度減少帶寬。 每一個移動設(shè)備都有一個特定的應用程序開發(fā)平臺,基于操作系統(tǒng):操作系統(tǒng)基于智能移動終端操作系統(tǒng)黑莓操作系統(tǒng)安卓iPhone操作系統(tǒng)Palm 操作

3、系統(tǒng)/訪問基于Linux專有的操作系統(tǒng)這些約束和各種軟件平臺影響的設(shè)計應用程序和測試過程。移動應用程序是獨立的或桌面應用和分布式應用程序。獨立的移動應用程序的設(shè)計執(zhí)行特定任務而不需要網(wǎng)絡(luò)連接。大多數(shù)移動應用為PDAs這樣的獨立應用程序的例子。分布式應用程序使用一個網(wǎng)絡(luò)連接,可以永久或暫時的。WAP應用手機訪問互聯(lián)網(wǎng)服務器的例子分布式應用程序,如圖1所示。最常用的分布式應用程序是基于網(wǎng)絡(luò)的。啟用了WAP電話的請求發(fā)送到WAP網(wǎng)關(guān)的轉(zhuǎn)換從WAP棧(WAP 1.0)或從優(yōu)化無線優(yōu)化HTTP / TCP / IP(WAP 2.0)HTTP / TCP / IP堆棧和編碼的網(wǎng)絡(luò)數(shù)據(jù)包被發(fā)送到Web服務器

4、的HTTP請求。Web服務器處理請求和響應發(fā)送回手機瀏覽器通過WAP網(wǎng)關(guān)的解碼包。2.移動端移動端平臺上運行許多移動設(shè)備,安裝了Java虛擬機。最大的好處使用Java平臺為移動設(shè)備開發(fā),可以生成可移植代碼,可以在多個平臺上運行。幾乎不可能應用程序的全部功能都移植到所有移動設(shè)備,因為無線設(shè)備有很多功能的內(nèi)存,處理電池,電池壽命、顯示器大小和網(wǎng)絡(luò)帶寬。 JavaME分為幾種不同的配置和配置文件。配置包含Java語言核心庫類別的設(shè)備。在這個時候有兩種配置:有限連接設(shè)備配置(CLDC)專為小,資源受限設(shè)備(手機,低端PDAs);連接設(shè)備配置(CDC)聯(lián)合為相對大,強大的設(shè)備(高端PDAs、機頂盒、網(wǎng)絡(luò)

5、設(shè)備),疾病預防控制中心有更多的功能比CLDC在安全方面,數(shù)學,和I / O功能。每個配置概要文件。一個概要文件定義特定于設(shè)備的API庫,如GUI,網(wǎng)絡(luò),和持久存儲API。每個配置文件都有自己的運行時環(huán)境環(huán)境和適合于一系列類似的設(shè)備。CLDC是移動信息設(shè)備的主要配置文件配置文件(MIDP)。疾控中心有兩個重要的資料:基礎(chǔ)資料和個人資料。為不同的移動設(shè)備模擬器,所以直到設(shè)備上的應用程序運行,它是實現(xiàn)和測試這些模擬器。模擬器可以配置為提供所需的Java包,現(xiàn)有設(shè)備狀況。3.移動應用程序測試移動應用程序的測試是由應用程序類型:獨立的、分布式和基于web的。如果獨立的移動應用程序,測試過程類似于桌面應

6、用程序,在資源有限的移動設(shè)備。這些應用程序的測試包括:功能測試可用性測試 結(jié)構(gòu)測試性能測試。對于分布式移動應用程序,測試過程是不同的。需要測試客戶端應用程序和服務器應用程序不僅獨立,而且在一起互動。在基于web的應用程序客戶端是一個網(wǎng)絡(luò)瀏覽器,和主要功能是建立在服務器端。測試web應用程序需要以下類型的測試(POCA03):功能測試兼容性測試測試內(nèi)容性能測試負載測試安全性測試服務器端測試(Web服務器、應用服務器)數(shù)據(jù)庫測試。測試基于Web的移動應用程序需要測試服務器的應用程序測試的內(nèi)容發(fā)送到移動設(shè)備。在客戶端,該腳本功能需要測試(WMLScript、JavaScript等。)有許多方面影響測

7、試過程并使其困難。當發(fā)生故障時,它可以有很多原因:可憐的用戶界面設(shè)計錯誤應用網(wǎng)絡(luò)問題內(nèi)存不足Web服務器配置數(shù)據(jù)庫管理系統(tǒng)不能正常工作數(shù)據(jù)庫腳本包含錯誤。在使用移動設(shè)備上的應用程序之前,它將使用一個模擬器進行了測試和開發(fā)環(huán)境中。由于他們的限制,測試移動應用程序是一個挑戰(zhàn)性的過程。測試人員需要關(guān)注很多其他方面并不特定于桌面應用程序。4.自動化單元測試自動化軟件測試由一系列的流程,活動和工具聚集在一起為了執(zhí)行軟件測試,記錄測試結(jié)果。測試過程有以下活動:測試計劃測試設(shè)計測試實現(xiàn)測試執(zhí)行測試評價每個活動都有特定的交付使用從一個階段到另一個。最后,bug報告和其他文檔將結(jié)果。這些文件由開發(fā)團隊使用識別故

8、障的原因,并改正。測試計劃之后,闡述了基于特定的輸入(預算、資源、時間軸),下一步是分析需求并定義測試團隊的測試的目標。的設(shè)計階段是主要關(guān)注的定義和測試程序的設(shè)計。在這時間將決定什么應該手動測試和將會是什么自動測試。測試用例和測試程序測試實現(xiàn)的結(jié)果階段。編寫測試腳本在Visual Basic等特定的編程語言,Java或C+。在這個階段,一些測試腳本可以重用以前的測試。測試執(zhí)行作為輸入的測試計劃和測試程序。后的執(zhí)行使用oracle測試結(jié)果評估。oracle是可以決定一個專家如果結(jié)果是正確的。自動化軟件測試工具的移動應用是多方面的,他們可以用在不同的領(lǐng)域的測試。有許多工具幫助軟件測試:捕獲/回放工

9、具,工具自動執(zhí)行測試,覆蓋分析,測試用例生成器、邏輯分析儀和復雜性,代碼檢測工具、缺陷跟蹤工具和測試管理工具。移動開發(fā)的應用程序使用Java JUnit框架很好自動化測試的功能問題。實現(xiàn)JMUnit之一(/projects/jmunit/).JMUnit是遞減的框架單元測試的Java代碼。所使用的主要對象是測試用例和測試套件,圖4SILV08。每個被測試類(削減)都有一個關(guān)聯(lián)的測試用例。測試用例類繼承TestCase類。每個切割方法,將有一個測試方法的等價類的測試用例。例如,從降低字典翻譯方法會有相應的測試用例類方法testTranslate TestDictionary類。TestDicti

10、onary類包括字典類的一個實例。測試套件包含幾個測試用例?;愂荰estSuite。一個測試用例使用添加方法添加到測試套件。表1顯示了testTranslate從字典類方法用于測試翻譯方法。testTranslate方法檢查是否返回正確的答案。斷言*方法(assertequal、assertNotEquals assertNull,assertNotNull,assertSame,assertNotSame,assertFalse,assertTrue)通過或失敗如果給定的表達式或不符合斷言。運行測試套件時,它就會有成功和失敗的數(shù)量和細節(jié),允許開發(fā)人員發(fā)現(xiàn)并糾正錯誤。一個測試方法在測試用例的

11、例子:public void testTranslate() String word = xyz”;String expectedResult = The word doesnot exists in the dictionary”;/create clientDServiceSoap_Stub client = newDServiceSoap_Stub();/call translate methodString result =client.translate(word);assertEquals(result.equals(expectedResult), true);/.5.結(jié)論 測試

12、移動應用程序是一個非常復雜的過程,這取決于應用程序類型。對于基于Web的應用程序,不僅特定響應發(fā)送到移動設(shè)備已經(jīng)測試,但整個應用程序從服務器端。包括的測試JSP、ASP.NET和PHP腳本。使用移動設(shè)備模擬器使應用程序兼容性需要解決在應用程序部署到移動設(shè)備。有模擬器幾乎所有手機平臺。有許多IDE允許開發(fā)、運行和調(diào)試的移動應用程序,測試過程變得更容易。每一種語言用于開發(fā)移動應用程序特定的特征,影響測試過程。使用基于Java JUnit測試框架我應用程序是一個很好的方法,在這個框架的經(jīng)驗。當然,單元測試不需要限制在這個框架中,不得使用其他方法和技術(shù)。2.外文原文Testing Java ME Ap

13、plicationsPaul POCATILUEconomy Informatics Department, Academy of Economic Studies, Bucharest, Romnia Today, mobile applications have a wide use and their development is growing fast.Testing mobile applications is an important aspect of their development, keeping in mind the importance of these appl

14、ications and their specific characteristics. In this paper are shown the main aspects of testing the mobile applications, focusing on unit testing of Java ME applications.Keywords: mobile applications, mobile devices, software testing, WAP, Java ME, JUnit1.Introduction Mobile applications are used o

15、n various domains like banking, stock exchange, Internet browsing, multimedia transfers, mlearning.Mobile applications development and their use it is growing very fast, having different hardware and software platforms.Mobile devices, like mobile phones, smartphones,PDAs (Personal Digital Assistants

16、),communicators, pagers etc., compared with desktop computers, are characterized by: less computation capacity less memory (RAM and ROM) small displays limited user interface reduced dimensions reduced bandwidth. Every mobile device has a specific application development platform, based on the opera

17、ting system: Windows Mobile/CE Symbian OS based Blackberry OS Android iPhone OS Palm OS/ACCESS Linux based proprietary operating systems. These constraints and variety of software platforms influence the way of designing the applications and the testing process. Mobile applications are standalone or

18、 desktop applications and distributed applications.Standalone mobile applications are designed to perform specific tasks without the need of a network connection. Mostly mobile applications made for PDAs are such examples of stand-alone applications.Distributed applications use a network connection

19、that can be permanently or temporarily.WAP applications for mobile phones that access an Internet server are examples ofdistributed applications as is depicted in figure 1. The most used distributed applications are Web-based.The request from the WAP enabled phone is sent to the WAP gateway that mak

20、es the conversion from the WAP stack (for WAP 1.0) or from the optimized wireless optimized HTTP/TCP/IP (WAP 2.0) to the HTTP/TCP/IP stack and encodes the network packets that will be sent to the Web server as a HTTP request. The request is processed on the Web server and the response is send back t

21、o the mobile phone browser through the WAP gateway that decodes the packets.2. Java Micro Edition (JME) JME platform runs on many mobile devices,which have installed a Java Virtual Machine.The biggest benefit of using the Java platform for mobile device development is that is possible to produce por

22、table code that can run on multiple platforms. It is almost impossible to port the complete functionalities of an application to all mobile devices because wireless devices have a vast range of capabilities in terms of memory, processingpower, battery life, display size, and network bandwidth. Java

23、ME is divided into several different configurations and profiles. Configurations contain Java language core libraries for a category of devices. In this moment there are two configurations: Connected Limited Device Configuration (CLDC) designed for small, resource constrained devices (cell phones, l

24、ow-end PDAs); Connected Device Configuration (CDC) designed for relatively big and powerful devices(high-end PDAs, set-top boxes, network appliances); CDC has more capabilities than CLDC in terms of security, mathematical, and I/O functions. On top of each configuration are profiles. A profile defin

25、es device-specific API libraries,like GUI, networking, and persistent-storage APIs. Each profile has its own runtime environment environment and is suited for a range of similar devices. The main profile for the CLDC is Mobile Information Device Profile (MIDP).For the CDC there are two important pro

26、files:the Foundation Profile and the Personal Profile. There are emulators for different mobile devices,so until the application is running on the device, it is implemented and tested on those emulators. The emulators can be configured to provide the desired Java packages,existing on the real device

27、.3. Mobile application testingThe testing of mobile applications is given by the application type: standalone, distributed and Web-based. If the mobile application is stand-alone, the testing process is similar to the desktop applications one, having in mind the limited resources of the mobile devic

28、es. The testing of these applications includes: functional testing usability testing structural testing performance testing. For distributed mobile applications, the testing process is different. The client application and server application need to be tested not only independently but also together

29、 in interaction. In a Web-based application the client is an Internet browser, and the main functionality is built on the server-side. Testing Web-based applications require the following type of testing POCA03: functional testing compatibility testing content testing performance testing load testin

30、g security testing server-side testing (Web server, application server) database testing. Testing Web based mobile applications require the testing of the server applications and the testing of the content that is send to the mobile device. On the client side, the script functions need to be tested

31、(WMLScript, JavaScript etc.) There are many aspects that influence the testing process and make it difficult. When a failure occurs, it can have many causes: poor user interface design bugs in application network problems insufficient memory Web server configuration database management system not wo

32、rking properly database scripts contains errors. Before using the application on the mobile device, it will be tested using an emulator and the environment where is developed.Due their constraints, testing mobile applications is a challenging process. Testers need to focus on many additional aspects

33、 that are not specific to desktop applications.4. Automating unit testing The automation of software testing consists of a series of processes, activities and tools brought together in order to execute the software under test and to record the result of the tests. The testing process has the followi

34、ng activities: test planning test design test implementation test execution test evaluationEach activity has specific deliverables that are used from a phase to another. At the end,bug reports and other documentation will result.These documents are used by the development team to identify the cause

35、of faults and to correct them. After the test plan has been elaborated, based on specific inputs (budget, resources, timeline), the next step is to analyze the requirements and to define the objectives of testing for the test team. The design phase is focused mainly on the definition and design of t

36、est procedures. At this time a decision will be made about what should be tested manually and what will be tested automatically. Test cases and test procedures are the result of test implementation phase. Test scripts are written in specific programming languages like Visual Basic,Java or C+. In thi

37、s phase, some test scripts can be reused from the previous tests. Test execution has as an input the test plan and the test procedures. After the execution of the tests, the results are evaluated using an oracle. An oracle is a specialist that could decide if the result is correct or not. Tools for

38、automated software testing of mobile applications are various, and they can be used in different areas of testing. There are many tools to assist software testing: capture/playback tools, tools for automated execution of tests, coverage analyzers, test case generators, logical and complexity analyze

39、rs, code instrumentation tools, defect tracking tools and test management tools. For mobile applications developed using Java the JUnit framework is very good for the automated testing of the functional issues. One of the implementation is JMUnit (/projects/jmunit/).JMUnit is a framework for regress

40、ive unit testing of Java code. The main objects used are test cases and test suites, figure 4SILV08.Each class under test (CUT) has an associated test case. Test case classes inherit TestCase class. For each CUT method that will be tested there is a method in the test case equivalent class. For exam

41、ple, translate method from the CUT Dictionary will have the corresponding method testTranslate in test case class TestDictionary class. TestDictionary class includes an instance of Dictionary class. The test suite includes several test cases. The base class is TestSuite. A test case is added to the

42、test suite using add method.Table 1 shows testTranslate method used to test translate method from Dictionary class.The testTranslate method checks if the correct answer is returned. The assert* methods (assertEquals, assertNotEquals, assertNull,assertNotNull, assertSame, assertNotSame,assertFalse, a

43、ssertTrue) pass or fail if the given expression complies or not with the assertion.When the test suite runs, it counts the numbers of failures and successes and details are given, that allowing to developers to find and correct the errors.Example of a test method within a test case:public void testT

44、ranslate() String word = xyz”;String expectedResult = The word doesnot exists in the dictionary”;/create clientDServiceSoap_Stub client = newDServiceSoap_Stub();/call translate methodString result =client.translate(word);assertEquals(result.equals(expectedResult), true);/.5.Conclusions Testing mobil

45、e applications is a very complex process, depending on the application type. For Web based applications, not only the specific response sent to the mobile device has to be tested, but the whole application from the server side. That includes the testing of JSP, ASP.NET and PHP scripts. The use of mobile devices emulators makes the applications compatibility to be solved before the application is deployed to the mobile devices. There

溫馨提示

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

評論

0/150

提交評論