跳到主要內容

臺灣博碩士論文加值系統

(18.97.14.84) 您好!臺灣時間:2024/12/03 09:31
字體大小: 字級放大   字級縮小   預設字形  
回查詢結果 :::

詳目顯示

: 
twitterline
研究生:張家維
研究生(外文):Chang, Chia-Wei
論文名稱:支援行為驅動開發方法與API調用分析之網頁自動化測試系統
論文名稱(外文):A Web Automated Testing System with Behavior-Driven Development and API Invocation Analysis
指導教授:馬尚彬馬尚彬引用關係
指導教授(外文):Ma, Shang-Pin
口試委員:郭忠義劉建宏陳錫民
口試委員(外文):Kuo, Jong-YihLiu, Chien-HungChen, Hsi-Min
口試日期:2020-07-15
學位類別:碩士
校院名稱:國立臺灣海洋大學
系所名稱:資訊工程學系
學門:工程學門
學類:電資工程學類
論文種類:學術論文
論文出版年:2020
畢業學年度:108
語文別:中文
論文頁數:54
中文關鍵詞:行為驅動開發網頁自動化測試錄製播放Web API調用分析
外文關鍵詞:BDD (Behavior-Driven Development)Web Automation TestingRecording and PlaybackWeb API Call AnalysisCucumberWebDriver
相關次數:
  • 被引用被引用:0
  • 點閱點閱:380
  • 評分評分:
  • 下載下載:58
  • 收藏至我的研究室書目清單書目收藏:1
  測試是提升軟體品質的重要方法,而網頁應用系統之測試可約略分為手動測試與自動化測試兩種方式,自動化測試可重複執行已撰寫好的測試案例程式或錄製好的測試腳本,可降低人工重複測試的成本,有效地改善手動測試的缺點,但仍會有測試案例程式或錄製之腳本與需求不符或有所缺漏之需求涵蓋度問題。因此,自動化測試若能導入行為驅動開發(Behavior-Driven Development,BDD),以需求之情境腳本(Scenario)進行測試,應可避免需求涵蓋度不足之問題,然而,目前此方面的整合工具仍較為缺乏。
  在另一方面,網頁應用程式通常分為前端(Front-End)與後端(Backend),Web API之調用即是前端與後端串接的主要方式,但目前的網頁自動化測試工具並不支援Web API分析功能,測試人員無法察覺Web API的調用異常,例如執行順序錯誤、時間過長、執行次數過多等問題。
  為解決上述議題,我們結合錄製播放自動化測試、BDD流程、Web API調用分析三個要素,建立了BDDWebRecorder測試工具系統,以測試人員使用的角度進行設計,希望清楚呈現需求與實作之對應,並能分析出前端與後端的銜接錯誤,讓測試人員可在不需撰寫程式的情況下更有效地進行網頁自動化測試。BDDWebRecorder是基於Katalon Recorder開源專案所開發完成,除了支援BDD導向的測試案例之錄製與播放外,亦提供視覺化之API呼叫狀態轉移圖,以及支援測試報告版控功能。
  此外,我們透過電子商務網站作為示範案例,並以兩個方案進行自動化測試:(1)方案一:以撰寫測試案例程式來落實BDD、(2)方案二(本方法):透過BDDWebRecorder工具實現BDD,實驗結果顯示,本方法在除錯、測試案例建立、環境設置、Web API分析、測試報告建立等各種面向之表現均優於方案一,本方法的確可有效協助測試人員基於BDD進行網頁自動化測試。
  Testing is a significant way to improve the quality of software. Web testing can be roughly divided into manual testing and automated testing. Automated testing can execute written test case code or recorded test scripts repeatedly to reduce the effort spent. It effectively avoids the shortcomings of manual testing, despite there are still requirement coverage problems: test case code or recorded scripts are insufficient or do not match the requirements. We believe that if we can integrate automated testing with BDD (Behavior-Driven Development) to test a web system based on requirement scenarios, the problem of insufficient test coverage could be further reduced. However, tools that support both automated testing and BDD are still lacking.
  Meanwhile, web applications are usually divided into front-end and backend. The invocation of Web APIs is the primary way of connecting front-end and backend. However, the current web automation testing tools do not support Web API call analysis. Testers cannot detect abnormalities of Web API invocations, such as incorrect execution order, unreasonably long time execution, and repeated execution.
  To address the above issues, we combined the three key elements, record and playback testing, BDD process, and Web API call analysis, to establish the proposed BDDWebRecorder system. BDDWebRecorder is a tester-oriented automated Web testing tool that bridges system requirements and system implementation based on BDD and analyzes the connection behaviors between the front-end and the backend. Via BDDWebRecorder, testers can more efficiently perform BDD-driven automated web testing without writing code. BDDWebRecorder is developed based on the Katalon Recorder open source project. In addition to supporting BDD-oriented test cases, it also provides visual diagrams of API call state transition and supports features of performance testing and version control for test reports.
  Besides, we used an e-commerce website as a benchmark application and conducted the automated testing with two alternatives: (1) method 1: realizing BDD by writing test case code, and (2) method 2 (the proposed method): realizing BDD through the BDDWebRecorder tool. The experimental results show that method 2 (BDDWebRecorder) is superior to Solution 1 in various aspects such as debugging, test case establishment, environment setting, Web API analysis, and test report generation. The proposed method can effectively assist testers with performing automated webpage testing based on BDD. In this way, testers can find functional defects and problems of API calls for the target web application based on system requirements.
摘要 I
Abstract II
目次 III
圖目次 IV
表目次 V
第一章 緒論 1
第二章 背景知識與相關研究 3
第一節 網頁錄製播放自動化測試工具 3
第二節 行為驅動開發(BDD) 7
第三節 Web API分析工具 9
第四節 Server Worker與Chrome擴充功能 10
第三章 系統設計與核心方法 13
第一節 需求分析 13
第二節 系統架構 14
第三節 流程設計 17
第四節 Gherkin規格實現方法 19
第五節 Web API調用分析機制 20
第六節 報表生成與管理機制 22
第四章 系統實作與案例分析 31
第一節 BDDWebRecorder系統實作 31
第二節 案例分析:電子商務網站測試 38
第五章 結論與未來發展 53
參考文獻 54
1. SVITS, I.J., A Comparative Analysis of Different types of Models in Software Development Life Cycle. 2012. 2(5).
2. Heidegger, P. and P. Thiemann. Contract-driven testing of JavaScript code. in International Conference on Modelling Techniques and Tools for Computer Performance Evaluation. 2010. Springer.
3. Myers, G.J., C. Sandler, and T. Badgett, The art of software testing. 2011: John Wiley & Sons.
4. Kaur, H., G.J.I.J.o.E.R. Gupta, and Applications, Comparative study of automated testing tools: selenium, quick test professional and testcomplete. 2013. 3(5): p. 1739-1743.
5. Smart, J.F., BDD in Action. Vol. 12. 2014: Manning Publications New York.
6. 呂庭宇, Single-Page Application 之初始頁面加載速度最佳化研究. 2014.
7. Marchetto, A. and P. Tonella. Search-based testing of Ajax web applications. in 2009 1st international symposium on search based software engineering. 2009. IEEE.
8. Group, W.H.A.T.W. Document Object Model 2020 15 June 2020; Available from: https://dom.spec.whatwg.org/.
9. SeleniumHQ. SeleniumHQ Browser Automation. 2020 [cited 2020]; Available from: https://www.selenium.dev/.
10. de Castro, A.M., et al. Extension of Selenium RC tool to perform automated testing with databases in web applications. in 2013 8th International Workshop on Automation of Software Test (AST). 2013. IEEE.
11. SeleniumHQ, W.C., WebDriver. 2018.
12. Beck, K., Test-driven development: by example. 2003: Addison-Wesley Professional.
13. Wynne, M., A. Hellesoy, and S. Tooke, The cucumber book: behaviour-driven development for testers and developers. 2017: Pragmatic Bookshelf.
14. Soeken, M., R. Wille, and R. Drechsler. Assisted behavior driven development using natural language processing. in International Conference on Modelling Techniques and Tools for Computer Performance Evaluation. 2012. Springer.
15. Evans, E., Domain-driven design: tackling complexity in the heart of software. 2004: Addison-Wesley Professional.
連結至畢業學校之論文網頁點我開啟連結
註: 此連結為研究生畢業學校所提供,不一定有電子全文可供下載,若連結有誤,請點選上方之〝勘誤回報〞功能,我們會盡快修正,謝謝!
QRCODE
 
 
 
 
 
                                                                                                                                                                                                                                                                                                                                                                                                               
第一頁 上一頁 下一頁 最後一頁 top