天堂国产午夜亚洲专区-少妇人妻综合久久蜜臀-国产成人户外露出视频在线-国产91传媒一区二区三区

當前位置:主頁 > 科技論文 > 軟件論文 >

基于TestNG的接口測試框架的設(shè)計與實現(xiàn)

發(fā)布時間:2018-10-12 07:55
【摘要】:近年來,隨著移動應(yīng)用軟件數(shù)目逐漸龐大以及軟件構(gòu)架的日益復(fù)雜化,軟件測試在確保軟件質(zhì)量方面發(fā)揮著重要作用。接口測試作為測試系統(tǒng)組件間接口的一種測試,具有成本小效率高等特點,在基于接口的軟件開發(fā)過程中發(fā)揮著越來越重要的作用。在此背景下,本文設(shè)計開發(fā)了一款針對C/S架構(gòu)的基于TestNG的接口測試框架。論文首先介紹了自動化測試和接口測試框架的研究背景以及國內(nèi)外現(xiàn)狀,并闡釋了本文的研究內(nèi)容以及論文整體結(jié)構(gòu)。接著,分析了框架的目標需求和功能需求,并對框架架構(gòu)進行整體設(shè)計,將測試框架劃分為四個模塊:安全驗證模塊、數(shù)據(jù)驅(qū)動模塊、HTTP協(xié)議模塊、報告管理模塊。然后,采用STS(eclipse)開發(fā)工具、TestNG測試框架、Maven構(gòu)建工具等搭建系統(tǒng)開發(fā)平臺和環(huán)境,詳細闡釋了各模塊的實現(xiàn)過程。其中,安全驗證模塊采用Token驗證機制、MD5散列算法、AES加/解密算法實現(xiàn);數(shù)據(jù)驅(qū)動模塊采用數(shù)據(jù)驅(qū)動的思想設(shè)計并實現(xiàn),支持的數(shù)據(jù)文件格式包括@DataProvider格式、CSV格式和EXCEL格式;HTTP協(xié)議模塊采用httpclient工具封裝了 HTTP協(xié)議的常用請求方法AppRequest和響應(yīng)方法Response;報告管理模塊結(jié)合Log4j實現(xiàn)了測試用例的日志存儲,同時,融合了 Jenkins持續(xù)集成平臺將測試報告發(fā)送給測試人員。最后,介紹了測試框架的運行環(huán)境和功能測試,并以網(wǎng)易考拉移動端中的商品加入購物車接口為例,展示了本文測試框架的應(yīng)用。網(wǎng)易考拉項目中大量接口用例的運行結(jié)果表明,該框架在一定程度上實現(xiàn)了接口測試的自動化,達到了預(yù)期效果,提高了測試效率。
[Abstract]:In recent years, with the increasing number of mobile applications and the complexity of software architecture, software testing plays an important role in ensuring software quality. As a test of the interface between components of the test system, interface testing has the characteristics of low cost and high efficiency. It plays an increasingly important role in the software development process based on interface. Under this background, this paper designs and develops an interface testing framework based on TestNG for C / S architecture. Firstly, this paper introduces the research background of automation test and interface testing framework and the present situation at home and abroad, and explains the research content and the whole structure of this paper. Then, the target and function requirements of the framework are analyzed, and the framework is designed as a whole. The test framework is divided into four modules: security verification module, data-driven module, HTTP protocol module and report management module. Then, the system development platform and environment are built with STS (eclipse) development tools, TestNG test framework and Maven construction tools, and the implementation process of each module is explained in detail. Among them, the security verification module uses Token verification mechanism, MD5 hash algorithm, AES encryption / decryption algorithm, and the data-driven module is designed and implemented with the idea of data-driven. The supported data file formats include @ DataProvider format, CSV format and EXCEL format. The HTTP protocol module encapsulates the common request method AppRequest of HTTP protocol and the response method Response; report management module with Log4j to realize the log storage of test cases, at the same time, the HTTP protocol module encapsulates the common request method of HTTP protocol and the response method Response; report management module. Integrated Jenkins continuous integration platform to send test reports to testers. Finally, the running environment and function test of the test framework are introduced, and the application of the test framework is demonstrated by taking the goods in the mobile terminal of NetEase koala as an example to add the shopping cart interface. The running results of a large number of interface cases in NetEase koala project show that the framework realizes the automation of interface testing to a certain extent, achieves the expected effect and improves the test efficiency.
【學(xué)位授予單位】:西南交通大學(xué)
【學(xué)位級別】:碩士
【學(xué)位授予年份】:2017
【分類號】:TP311.52

【參考文獻】

相關(guān)期刊論文 前10條

1 呂茜;;基于WebDriver和TestNG的網(wǎng)頁自動化測試方法[J];軟件;2016年12期

2 鄧璐娟;李金萌;董東曉;;自動化測試框架技術(shù)及應(yīng)用[J];計算機測量與控制;2016年09期

3 張慧琳;李威;佟秋利;劉玉江;;基于Selenium和TestNG的集成自動化測試平臺設(shè)計[J];實驗技術(shù)與管理;2015年09期

4 趙慧娟;李中科;;基于XML數(shù)據(jù)驅(qū)動的TestNG測試研究[J];電子技術(shù)與軟件工程;2015年15期

5 李真輝;陳聞宇;徐彥之;;基于CI的Web自動化測試平臺設(shè)計[J];科技導(dǎo)報;2015年09期

6 高s,

本文編號:2265363


資料下載
論文發(fā)表

本文鏈接:http://www.sikaile.net/kejilunwen/ruanjiangongchenglunwen/2265363.html


Copyright(c)文論論文網(wǎng)All Rights Reserved | 網(wǎng)站地圖 |

版權(quán)申明:資料由用戶82ee1***提供,本站僅收錄摘要或目錄,作者需要刪除請E-mail郵箱bigeng88@qq.com