跳到主要內容

臺灣博碩士論文加值系統

(44.213.60.33) 您好!臺灣時間:2024/07/17 02:43
字體大小: 字級放大   字級縮小   預設字形  
回查詢結果 :::

詳目顯示

: 
twitterline
研究生:洪偉翔
研究生(外文):HUNG, WEI-SHIANG
論文名稱:支援網頁測試之物件導向網頁程式介面設計
論文名稱(外文):On Supporting Web Testing with an Object-Oriented Web Application Interface
指導教授:鄭有進鄭有進引用關係謝金雲
指導教授(外文):CHENG, YU CHINHSIEH, CHIN-YUN
口試委員:鄭有進謝金雲郭忠義
口試委員(外文):CHENG, YU CHINHSIEH, CHIN-YUNKUO, JONG-YIH
口試日期:2022-06-23
學位類別:碩士
校院名稱:國立臺北科技大學
系所名稱:資訊工程系
學門:工程學門
學類:電資工程學類
論文種類:學術論文
論文出版年:2022
畢業學年度:110
語文別:中文
論文頁數:37
中文關鍵詞:網頁應用程式物件導向設計Web API自動化測試
外文關鍵詞:Web ApplicationsObject-Oriented DesignWeb APIAutomated Testing
相關次數:
  • 被引用被引用:0
  • 點閱點閱:273
  • 評分評分:
  • 下載下載:58
  • 收藏至我的研究室書目清單書目收藏:0
網頁應用程式為了確保釋出的品質,在部署到網路上時都會進行測試。但是為了提高覆蓋率測試案例愈來愈多,所需要執行的時間就會越長,為了節省時間,我們可以採用Web API來建立Test fixture,以此減少花費的時間。然而,每次使用Web API 時,都需要取得URL(Uniform Resource Location)和將需要的測試資料轉換成對應的Payload,因為從URL和payload上較難判斷用途,使得使用上較難重複使用。本論文為了達成以物件導向方式管理URL和payload,參考Graig Larman 於 An introduction to Object-Oriented Analysis and Design and Unified Process所提出的語言分析(Linguistic analysis)方法,該方法從網頁操作情境(scenario)的敘述中擷取名詞並列為候選類別。接著選擇候選類別在網頁應用程式裡有CRUD動作的Web API建立成類別,最後將URL和Payload放到對應類別的方法(method),此設計方式稱為API Object。本論文透過一個產學合作案中的三個測試案例來實作API Object,比較使用上的差別,發現API Object利用類別將關鍵字分類管理,當需修改API關鍵字檔案中之URL時,可快速找出所需修改之URL。同時,API Object也將回傳之JSON建立成物件,當JSON欄位有變動時,僅需修改其converter的to_resource方法。同樣地,在payload中node的某個欄位變動時,也僅需更改builder中node的方法之payload,可降低維護成本。
Web applications will be tested to ensure the quality of the release. In order to improve the coverage, increased test cases will take longer time to execute. To save time, we can use Web API to build test fixtures. However, testers need to find the URL (Uniform Resource Location) and convert the required test data into the corresponding payload every time using the Web API. It is difficult to determine the purpose of the URLs and payloads, making it difficult to reuse. This thesis adopts the linguistic analysis method proposed by Graig Larman in “An introduction to Object-Oriented Analysis and Design and Unified Process,” which extracts nouns from the web page manipulation scenario and lists them as candidate classes. A candidate class will be implemented when its corresponding data can be created, read, updated, and deleted by Web APIs. The URLs and payloads that the Web APIs required are encapsulated in the methods of the class. This design method is called API Object. This thesis implements API Object through three test cases in an industry-academia collaboration, and compares the differences with and without API Object. The result shows that API Object uses classes to classify and manage keywords. When the URL in the API keyword file needs to be modified, they can be quickly found. API Object also builds the returned JSON into an object. When the JSON fields are changed, they will only be modified the to_resource method of converter. Similarly, when the fields of the node in the payload need to be changed, they only need to change the payload of the node method in the builder, which can reduce maintenance effects.
摘要...........................................i
ABSTRACT.......................................ii
誌謝...........................................iv
目錄...........................................v
表目錄.........................................vii
圖目錄.........................................viii
第一章 緒論....................................1
1.1 研究背景與動機...........................1
1.2 研究目標.................................1
1.3 論文組織架構.............................1
第二章 背景知識................................3
2.1 Robot Framework..........................3
2.1.1 更詳細的關鍵字和語法...................4
2.1.2 報告和日誌.............................4
2.2 Web API..................................4
2.3 Python 程式語言..........................5
第三章 API Object設計方法......................6
3.1 網頁中的資料建立成類別...................6
3.2 類別中方法...............................6
3.3 Factory Method...........................7
3.4 Builder..................................8
3.5 Converter類別............................9
第四章 API Object實作..........................10
4.1 問題.....................................10
4.2 API Object單元測試.......................10
4.3 使用API Object測試案例(一)...............11
4.3.1 API關鍵字檔案實作....................11
4.3.2 API Object實作.......................14
4.3.3 比較與分析...........................20
4.4 使用API Object測試案例(二)...............21
4.4.1 API關鍵字檔案實作....................21
4.4.2 API Object實作.......................22
4.4.3 比較與分析...........................27
4.5 使用API Object測試案例(三)...............27
4.5.1 API關鍵字檔案實作....................27
4.5.2 API Object實作.......................28
4.5.3 比較與分析...........................31
4.6 API Object特性...........................31
4.7 API Object限制...........................33
第五章 結論與未來展望..........................34
5.1 結論.....................................34
5.2 未來展望.................................35
參考文獻.......................................36
[1] S. Bisht, Robot framework test automation. Packt Publishing Ltd, 2013.
[2] 江宛芸,以網頁應用程式介面取代網頁操作建構Test Fixture,碩士論文,國立臺北科技大學,臺北,2022.
[3] Robot Framework Foundation, Robot Framework Introduction. <https://robotframework.org/#introduction> (accessed Jun. 15, 2022).
[4] P. Laukkanen, “Data-Driven and Keyword-Driven Test Automation Frameworks,” Master Thesis, Helsinki University of Technology - Aalto University, 2006.
[5] Robot Framework Foundation, Robot Framework Examples. <https://robotframework.org/#examples> (accessed Jun. 15, 2022).
[6] K. Pugh, Lean-Agile Acceptance Test-Driven Development: Better Software through Collaboration. New Jersey: Addison-Wesley, 2011.
[7] Robot Framework Foundation, Robot Framework User Guide. <https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html> (accessed Jun. 15, 2022).
[8] B. Lakshmiraghavan, Practical ASP.NET Web API. Apress, 2013.
[9] P. Suter and E. Wittern, “Inferring Web API Descriptions from Usage Data,” in Proceedings of the 2015 Third IEEE Workshop on Hot Topics in Web Systems and Technologies (HotWeb), Washington, DC, USA, 2015, pp. 7-12, doi: 10.1109/HotWeb.2015.19.
[10] K. R. Srinath, “Python – The Fastest Growing Programming Language”, International Research Journal of Engineering and Technology (IRJET), vol. 4, issue 12, 2017, pp. 354–357.
[11] C. Larman, Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process. Pearson, 2001.
[12] Refactoring.Guru, Factory Method. <https://refactoring.guru/design-patterns/factory-method > (accessed Jun. 16, 2022).
[13] Refactoring.Guru, Builder. <https://refactoring.guru/design-patterns/builder> (accessed Jun. 16, 2022).
QRCODE
 
 
 
 
 
                                                                                                                                                                                                                                                                                                                                                                                                               
第一頁 上一頁 下一頁 最後一頁 top