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

下載本文檔

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

文檔簡(jiǎn)介

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

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

3、系統(tǒng)/訪問基于Linux專有的操作系統(tǒng)這些約束和各種軟件平臺(tái)影響的設(shè)計(jì)應(yīng)用程序和測(cè)試過程。移動(dòng)應(yīng)用程序是獨(dú)立的或桌面應(yīng)用和分布式應(yīng)用程序。獨(dú)立的移動(dòng)應(yīng)用程序的設(shè)計(jì)執(zhí)行特定任務(wù)而不需要網(wǎng)絡(luò)連接。大多數(shù)移動(dòng)應(yīng)用為PDAs這樣的獨(dú)立應(yīng)用程序的例子。分布式應(yīng)用程序使用一個(gè)網(wǎng)絡(luò)連接,可以永久或暫時(shí)的。WAP應(yīng)用手機(jī)訪問互聯(lián)網(wǎng)服務(wù)器的例子分布式應(yīng)用程序,如圖1所示。最常用的分布式應(yīng)用程序是基于網(wǎng)絡(luò)的。啟用了WAP電話的請(qǐng)求發(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服務(wù)器

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

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

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

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

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

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

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

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é)論 測(cè)試

12、移動(dòng)應(yīng)用程序是一個(gè)非常復(fù)雜的過程,這取決于應(yīng)用程序類型。對(duì)于基于Web的應(yīng)用程序,不僅特定響應(yīng)發(fā)送到移動(dòng)設(shè)備已經(jīng)測(cè)試,但整個(gè)應(yīng)用程序從服務(wù)器端。包括的測(cè)試JSP、ASP.NET和PHP腳本。使用移動(dòng)設(shè)備模擬器使應(yīng)用程序兼容性需要解決在應(yīng)用程序部署到移動(dòng)設(shè)備。有模擬器幾乎所有手機(jī)平臺(tái)。有許多IDE允許開發(fā)、運(yùn)行和調(diào)試的移動(dòng)應(yīng)用程序,測(cè)試過程變得更容易。每一種語言用于開發(fā)移動(dòng)應(yīng)用程序特定的特征,影響測(cè)試過程。使用基于Java JUnit測(cè)試框架我應(yīng)用程序是一個(gè)很好的方法,在這個(gè)框架的經(jīng)驗(yàn)。當(dāng)然,單元測(cè)試不需要限制在這個(gè)框架中,不得使用其他方法和技術(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等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論