一種用於測試一固態儲存裝置之韌體的方法,包含:控制一主記憶體以模仿該固態儲存裝置的多個揮發性及非揮發性記憶體;擷取一測試序列及一測試準則;從編譯該韌體所產生的多個二進制碼擷取多個讀取/寫入操作;判定該多個讀取或寫入操作是否跟一標記有關聯;當一判定的結果是否定的,則執行該多個讀取/寫入操作、否則丟棄一讀取/寫入資料的動作;監測該多個讀取/寫入操作之執行的過程是否達到該測試準則;及當監測到該多個讀取/寫入操作之執行的過程達到該測試準則產生該韌體之一測試的結果。A method for testing firmware of an SSD includes: controlling a main memory to emulate volatile and non-volatile memories of the SSD, fetching a testing sequence and a testing criterion, fetching read/write operations from binary codes generated by compiling the firmware, determining whether the read/write operations are associated with a marker, executing the read/write operations when a result of determination is affirmative, otherwise discarding a read/write of data, monitoring whether processes of executing of the read/write operations meet the testing criterion, and generating a result of a test of the firmware when it is monitored that the testing criterion is met. |