基於分散式物件同步系統之測試自動化技術與可測試性探討

No Thumbnail Available

Date

2010

Journal Title

Journal ISSN

Volume Title

Publisher

Abstract

本研究主要包含兩大部分:分散式物件同步機制與侵入式測試自動化,我們將分別討論,並在最後探討分散式物件同步機制之可測試性。 現行的多人網路遊戲(Massively Multiplayer Online Games : MMOGs)中,同步是非常關鍵的一件事情。同步機制是否完善,將會影響到整個遊戲的過程與結果的合理性。一般的網路遊戲透過遊戲伺服器(Server)來運算重要的事件結果,然後藉由廣播發送給所有的玩家,例如勝負判斷、角色移動、物件位置等資訊。這些方法都是為了要維持客戶端(Client)彼此之間資料的一致性。不過,如果同步的訊息過多且複雜,此時若再透過伺服器進行轉發,會使得伺服器不堪負荷。 我們提出一種可以讓客戶端直接進行同步的機制,稱為peer-to-peer的分散式物件同步機制(P2P Distributed Object Synchronization),簡稱為DOS。這種方式可以將不會影響遊戲結果的資訊,轉嫁給客戶端傳送,而伺服器只需要負責廣播重要的資訊,例如角色動作、加入新的使用者等資訊,而其餘遊戲內物件資訊同步則藉由客戶端彼此之間彼此的同步機制來完成。這樣的做法,不僅大大降低了伺服器端原本的負荷,也可以讓同步的機制可以更快的執行。 為了更有效率的增進軟體品質,建構測試自動化(Test Automation)是一種常用的技術。測試自動化工具除了自行開發外,也可以使用商業測試自動化工具,但是商業軟體除了可能必須付出昂貴的代價,還必須得面臨平台的限制,也可能無法應付特殊的測試需求,如DOS。本論文針對DOS的特殊測試需求,提出一套侵入式的自動化測試方法,而所謂侵入式指的是我們會插入探測程式碼於待測系統的原始碼中,並蒐集程式狀態。我們的目的是使用最少的成本,來達到測試自動化的效果。 最後本研究將針對分散式物件同步機制在迴歸測試自動化的過程中,發現測試案例的可測試與否問題。我們嘗試定義何種類型的測試案例適合用來實施測試自動化,又有哪些類型的測試案例在測試自動化的過程中是不可驗證的。
This thesis includes two major topics: distributed object synchronization mechanisms and intrusive test automation. We will discuss them consecutively. In the end, we will discuss the testability of test case in the content of distributed object synchronization. In current massive multiplayer online games (MMOGs), synchronization is an important issue. The correctness of synchronization mechanism can change the results of a game play. In general, MMOGs have servers to compute the important events, and then broadcast the information to clients, such as object positions, etc. These methods are aimed to keep the consistency of object states among the clients. However, if a game requires more complicated and heavy synchronization, the server can be overloaded. In this thesis, we propose a mechanism that the clients can synchronize with each other by Peer-to-Peer. In this mechanism, the server is only responsible for broadcasting the critical events, such as commands from users. In principle, clients exchange the information which does not affect the results of game play. By this way, the server is relieved from the heavy networking workload. In order to improve software quality in a more efficient way, building test automation is a commonly used technique. Test automation can be built by commercial tools or developed privately. Commercial tools can address most common testing scenarios, such as GUI testing, but can be very expensive. Sometimes, commercial tools can’t handle specific test requirement, such as the Distributed Object Synchronization (DOS) problems described in the thesis. Therefore, we propose an intrusive test automation, in which we insert probing statements into the source code to collect program status in runtime. The collected information will be used to do capture/replay in test automation. The goal of this research is to achieve the effects of test automation with minimum cost. Finally, we investigate the testability of the test cases in DOS. We try to define and analyze what kind of test cases are suitable for the capture/replay paradigm in test automation.

Description

Keywords

分散式網路同步, 測試自動化, 軟體測試, GUI測試自動化, 軟體可測試性

Citation

Collections

Endorsement

Review

Supplemented By

Referenced By