【正文】
本 科 生 畢 業(yè) 論 文(設計) 題目: 基于 Selenium 框架的 Web 自動化測試系統(tǒng)的設計與實現(xiàn) 學生姓名 崔青青 學 號 100104202020 指導教師 朱凌 二級學院 信息學院 專業(yè)名稱 計算機科學與技術 班 級 10 計算機 1 班 2020 年 05 月 此處為論文中文題目,要求居中填寫 主標題不超過 24 個漢字;可加副標題(副標題前加破折號),副標題與主標題間空一行的位置 主標題:黑體,小二,居中 副 標 題 : 楷 體_GB2312,四號,居中 閱后刪除此文本框。 聲明及論文使用的授權 本人鄭重聲明所呈交的論文是我個人在導師的指導下獨立完成的。除了文中特別加以標注和致謝的地方外,論文中不包含其他人已經發(fā)表或撰 寫的研究成果。 論文作者簽名: 年 月 日 本人同意浙江財經大學有關保留使用學位論文的規(guī)定,即:學校有權保留送交論文的復印件,允許論文被查閱和借閱;學??梢陨暇W公布全部內容,可以采用影印、縮印或其他復制手段保存論文。 論文作者簽名: 年 月 日 浙江財經大學本科生畢業(yè)論文(設計 ) I 基于 Selenium 框架的 Web 自動化測試系統(tǒng)的設計與實現(xiàn) 摘 要: 隨著應用 軟件 的發(fā)展普及, 規(guī) 模和復雜度不斷增加, 人們對軟件質量的重視,使得軟件測試技術逐漸成為人們關注的焦點。在此以 Web 系統(tǒng) 軟件為例, 傳統(tǒng)的軟件測試技術和方法并不完全適用于 Web 測試,手工測試效率又十分低下, Web 自動化測試工具的使用極大地提高了測試的效率。 本系統(tǒng)包含日志管理模塊、頁面對象模塊、測試用例腳本模塊、遠程控制管理模塊、 UI 驅動模塊、多線程管理模塊、屏幕截圖管理模塊及測試驅動模塊,具有針對 web 訪問的不同系統(tǒng)、不同業(yè)務、不同主流瀏覽器進行自動化測試的開發(fā)、調試、項目構建、部署、運行、監(jiān)控、分析、告警、生成報告等一系列功能,在規(guī)范測試流程、提高測試效率、測試覆蓋 率方面具有一定的現(xiàn)實 意義。 關鍵詞: Selenium Webdriver; Web 測試;自動化測試;測試工具 Design and Implementation of Web Automatic Test System based on Selenium Framework Abstract: With the popularity of the application software, the increasing size and plexity, it is the importance of software quality, making the software testing technology has bee the focus of attention. In the Web system software, for example, traditional software testing techniques and methods are not fully applicable to Web testing, manual testing efficiency and very low, the use of automated testing tools for Web has greatly improved the efficiency of the test. The system contains a log management module, the page object modules, test script module, remote control and management module, UI driver module, multithread management module, management modules and test screenshot drive module, with different systems for web access, and different businesses, different major browsers developed automated testing, missioning, project building, deploying, operating, mo nitoring, analysis, alerting, generate reports and a series of functions in regulating the testing process, improve test efficiency, test coverage has certain practical significance . Key Words: Selenium Webdriver。Web Test。Automatic Test。Testing tools 浙江財經大學本科生畢業(yè)論文(設計 ) II 目 錄 1 引言 ........................................................................................................................................ 1 2 需求分析 ................................................................................................................................ 2 3 可行性分析 ............................................................................................................................ 4 4 自動化測試平臺 .................................................................................................................... 5 5 基于數(shù)據驅動自動化測試的實施 ........................................................................................ 6 6 系統(tǒng)概要設計 ......................................................................................................................... 9 系統(tǒng)總體結構設計 ...................................................................................................... 9 測試用例層 .................................................................................................................. 9 模塊類庫 .......................................................................................................... 10 測試用例腳本 .................................................................................................. 10 代理( Agent)層 ...................................................................................................... 10 UI Driver 層 ................................................................................................................ 10 7 系統(tǒng)實現(xiàn) .............................................................................................................................. 12 日志管理模塊 ............................................................................................................ 12 準確定位 .......................................................................................................... 12 提高開發(fā)效率 .................................................................................................. 14 頁面對象模塊 ............................................................................................................ 15 測試用例腳本模塊 .................................................................................................... 17 遠 程控制管理模塊 .................................................................................................... 21 屏幕截圖管理模塊 .................................................................................................... 25 測試驅動模塊 ............................................................................................................ 26 8 系統(tǒng)總體運行 ...................................................................................................................... 29 9 遇到的 問題 及解決方法 ...................................................................................................... 34 ATS 線程中斷問題 ..................................................................................................... 34 xPath 路徑錯誤 ........................................................................................................... 35 浙江財經大學本科生畢業(yè)論文(設計 ) III 被測系統(tǒng)存在 bug ..................................................................................................... 36 10 總結與展望 .........................................................................................