| 研究生: |
藍子琪 Lan, Tzu-Chi |
|---|---|
| 論文名稱: |
FirmataSpy:可支援自動化整合測試物聯網裝置的Firmata模擬器 FirmataSpy: A Firmata Emulator to Streamline Interoperable Automated Testing for IoT Devices |
| 指導教授: |
廖峻鋒
Liao, Chun-Feng 陶亞倫 Tao, Ya-Lun |
| 口試委員: |
馬尚彬
Ma, Shang-Pin |
| 學位類別: |
碩士
Master |
| 系所名稱: |
傳播學院 - 數位內容碩士學位學程 Digital Content and Technologies |
| 論文出版年: | 2024 |
| 畢業學年度: | 112 |
| 語文別: | 中文 |
| 論文頁數: | 66 |
| 中文關鍵詞: | 自動化測試 、物聯網 、Firmata 、Arduino |
| 外文關鍵詞: | Automated Testing, Internet of Things, Firmata, Arduino |
| 相關次數: | 點閱:29 下載:8 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
物聯網 (Internet of Things, IoT) 技術的快速發展為連接和監控物理設備提供了廣大的可能性。Arduino在物聯網領域中,是最受歡迎的開源硬體平台之一,它提供了簡單而強大的方式來控制和監測各種感測器與設備,因此,許多開發人員和學習者都會以Arduino作為初接觸物聯網的首選。然而,許多開發者在進行物聯網程式開發時,時常會遇到程式必須連接硬體設備才能執行、測試軟體的問題,在開發上帶來許多不便利之處,也在維護程式品質上花費不少時間,無法專注於程式開發。因此,本研究的目標即是,研製一個以Node.js平台作開發,可支援自動化測試物聯網裝置的模擬系統──FirmataSpy。其基於廣泛使用的序列埠通訊協定Firmata Protocol,並作為物聯網裝置Arduino的測試替身(Test Double),取代Arduino回應待測目標(Subject Under Test, SUT)。此外,將透過量化與質化兩種不同研究方法進行評估,量化研究部分會針對FirmataSpy與Arduino效能的實驗比較兩者回應SUT的時間差異,而質化研究將對數名受測者做分析,請有程式開發經驗的受測者進行實際操作與訪談,以了解本研究的實際成效。
本研究的預期成果將對於物聯網裝置開發與自動化測試帶來貢獻,具體而言,本研究所提出之方法與其他測試替身(Test Double)的不同之處在於,FirmataSpy定位於協定層級,在運行時獨立於各種程式語言,不會受到待測目標程式的語言所影響,只要是以Firmata Protocol溝通,都能夠使用FirmataSpy模擬器,讓開發人員在沒有連接硬體設備的狀態下,也可以順利進行自動化測與驗證物聯網裝置。
Arduino is one of the most popular open-source hardware platforms in the IoT domain, offering a simple yet powerful way to control and monitor various sensors and devices. As a result, many developers choose Arduino as their first encounter with IoT. However, many developers often face challenges in IoT programming, such as the need for the program to connect to hardware devices for execution and software testing, which brings about considerable inconvenience in development. Therefore, the goal of this study is to develop an emulation that supports automated testing of IoT devices, named FirmataSpy, which is based on the widely used Firmata Protocol for serial communication and serves as a Test Double for the IoT device Arduino, replacing Arduino in responding to the Subject Under Test (SUT). The evaluation of this study will be conducted through both quantitative and qualitative research methods. The quantitative research will compare the response time differences between two devices in responding to the SUT, while the qualitative research will analyze several participants with programming experience through hands-on operations and interviews to understand the practical effects of this study.
The expected outcomes of this study will contribute to the development and automated testing of IoT devices. Specifically, the method proposed in this study differs from other Test Doubles in that FirmataSpy is positioned at the protocol level, running independently of the programming language of the Subject Under Test. As long as the communication is based on the Firmata Protocol, the FirmataSpy emulator can be used, allowing developers to proceed with automated testing and verification of IoT devices without connecting to hardware devices.
摘要 i
Abstract iv
目錄 v
表次 vi
圖次 vii
第一章 緒論 1
第一節 研究背景與動機 1
第二節 研究目的與問題 9
第三節 研究架構與流程 10
第二章 文獻探討 11
第一節 物聯網架構與自動化測試 11
第二節 軟體測試型態 13
第三節 Firmata Protocol與現有程式框架 27
第三章 系統設計 30
第一節 系統架構 30
第二節 Firmata協定語意 34
第三節 模擬器實作與API設計 38
第四節 自動化測試案例 47
第四章 評估與討論 53
第一節 對涵蓋度的評估 53
第二節 效能評估 56
第三節 對易用性的評估 58
第四節 研究問題討論 62
第五章 結論 63
參考文獻 64
Barrett, M. (2016). Building the Internet of Things: Implement New Business Models, Disrupt Competitors, Transform Your Industry. Wiley.
Bures, M. (2017). Framework for Integration Testing of IoT Solutions. In 2017 International Conference on Computational Science and Computational Intelligence (CSCI) (pp. 1838-1839). Las Vegas, NV, USA. https://doi.org/10.1109/CSCI.2017.335
com0com. (n.d.). Retrieved June 24, 2023, from https://com0com.sourceforge.net/
Fazzini, M., et al. (2022). Use of Test Doubles in Android Testing: An In-Depth Investigation. In 2022 IEEE/ACM 44th International Conference on Software Engineering (ICSE) (pp. 2266-2278). Pittsburgh, PA, USA. https://doi.org/10.1145/3510003.3510175
Gunputh, S., Murdan, A. P., & Oree, V. (2017). Design and implementation of a low-cost Arduino-based smart home system. In 2017 IEEE 9th International Conference on Communication Software and Networks (ICCSN) (pp. 1491-1495). Guangzhou, China.https://doi.org/10.1109/ICCSN.2017.8230356
Huber, D. M. (2007). The MIDI Manual, Third Edition: A Practical Guide to MIDI in the Project Studio. Focal Press.
Johnny-Five API. (n.d.). Retrieved June 14, 2023, from http://johnny-five.io/api/
Joshi, J., Mahmud, S., & Kim, D. H. (2017). Performance enhancement and IoT based monitoring for smart home. In 2017 International Conference on Information Networking (ICOIN) (pp. 468-473). Da Nang, Vietnam. https://doi.org/10.1109/ICOIN.2017.7899537
Lin, J., Yu, W., Zhang, N., Yang, X., Zhang, H., & Zhao, W. (2017). A Survey on Internet of Things: Architecture, Enabling Technologies, Security and Privacy, and Applications. IEEE Internet of Things Journal, 4(5), 1125-1142. https://doi.org/10.1109/JIOT.2017.2683200
Matijevic, M., & Cvjetkovic, V. (2016). Overview of Architectures with Arduino Boards as Building Blocks for Data Acquisition and Control Systems. In 2016 13th International Conference on Remote Engineering and Virtual Instrumentation (REV) (pp. 56-63). Madrid, Spain. https://doi.org/10.1109/REV.2016.7444440
Meszaros, G. (2007). xUnit test patterns: Refactoring test code. Pearson Education.
MIDI Message. (n.d.). Retrieved June 24, 2023, from https://www.cs.cmu.edu/~music/cmsip/readings/MIDI%20tutorial%20for%20programmers.html
mock-firmata. (n.d.). Retrieved June 24, 2023, from https://github.com/rwaldron/mock-firmata
McGregor, I. (2002). The relationship between simulation and emulation. In Proceedings of the Winter Simulation Conference (Vol. 2, pp. 1683-1688). San Diego, CA, USA. https://doi.org/10.1109/WSC.2002.1166451
Murad, G., Badarneh, A., Qusef, A., & Almasalha, F. (2018). Software Testing Techniques in IoT. In 2018 8th International Conference on Computer Science and Information Technology (CSIT) (pp. 17-21). Amman, Jordan. https://doi.org/10.1109/CSIT.2018.8486149
pyFirmata2. (n.d.). Retrieved June 22, 2023, from https://github.com/berndporr/pyFirmata2
Rosenkranz, P., Wählisch, M., Baccelli, E., & Ortmann, L. (2015). A distributed test system architecture for open-source IoT software. In Proceedings of the 2015 Workshop on IoT Challenges in Mobile and Industrial Systems (IoT-Sys '15) (pp. 43-48). Association for Computing Machinery. https://doi.org/10.1145/2753476.2753481
Sneha, K., & Malle, G. M. (2017). Research on Software Testing Techniques and Software Automation Testing Tools. In 2017 International Conference on Energy, Communication, Data Analytics and Soft Computing (ICECDS) (pp. 77-81). Chennai, India. https://doi.org/10.1109/ICECDS.2017.8389562
Steiner, H. C. (2009, June). Firmata: Towards Making Microcontrollers Act Like Extensions of the Computer. In NIME (pp. 125-130).
Sudharani, V., Siva, D., & Raju, M. V. (2018). Smart home automation system using Arduino and IoT.
Varghese, N., & Sinha, R. (2020). Can Commercial Testing Automation Tools Work for IoT? A Case Study of Selenium and Node-Red. In IECON 2020 The 46th Annual Conference of the IEEE Industrial Electronics Society (pp. 4519-4524). Singapore. https://doi.org/10.1109/IECON43393.2020.9254910