測試覆蓋(Test Coverage)的技術與工具至今已經有相當成熟的發展,尤其在大型的軟體系統開發中,為了能夠維持軟體的品質並降低程式臭蟲的數量,一般會導入軟體測試來驗證程式的正確性。在軟體測試時期,開發團隊可以利用測試覆蓋工具產生測試覆蓋報告,來輔助開發者了解專案的測試案例是否有涵蓋到軟體的重要功能,或是測試案例是否足夠完整。 而近年來由於Web技術逐漸成熟,以往在桌面應用程式或行動端應用程式才能夠達成的功能現在均能夠透過Web 技術達成。隨著網際網路的發展以及各大瀏覽器公司Google、Mozilla、Opera、Apple、Microsoft等對於Web的推動,促使Web應用近年來開始大幅的成長,開發者們也紛紛開始提倡Web 應用程式的模組化與重視軟體測試。Web應用程式上的測試覆蓋工具也因為開發需求而陸續問世,但是Web 應用程式與一般桌面應用程式因動態延遲載入技術上的差異,使得在Web應用程式(Web application)上的測試覆蓋所碰到的問題不同於以往。 本論文將會探討JavaScript在動態延遲載入技術上的各種實踐方式,分析它們套用在測試覆蓋技術上時會發生的問題,提出方法並加以改進。 ;Test coverage techniques and tools have been quite mature nowadays. In order to maintain software quality and reduce the number of software defects during developing large-scale system, developers must introduce software testing into development process to validate the correctness of programs. In software testing, test coverage is an important technique to evaluate the quality of test cases. In recent years, due to the maturity of web technology, web applications are gradually capable of completing the tasks that could only be done by desktop programs or mobile apps. With the vigorously promotion from international browser companies such as Google, Mozilla, Opera, Apple and Microsoft…etc, developers worldwide have begun to advocate the modularity and put an emphasis on software testing of web applications. Test coverage tools on web applications have come out to meet such a need. However, there are differences between web applications and general desktop applications, particularly on dynamic lazy loading. As a result, test coverage tools suffer from new challenges and difficulties while applied to the new web programming paradigm. This thesis researches all kinds of dynamic lazy loading approaches in JavaScript and analyzes the impact to the test coverage tool implementation. Finally, an approach is proposed to address the problem.