【文章內(nèi)容簡介】
以像往常一樣通過點擊工具欄中的 運行功能測試腳本 圖標(biāo)來運行腳本了。 IBM Software Institute 課程大標(biāo)題 Indications in green = Live content Indications in white = Edit in master Indications in blue = Locked elements Indications in black = Optional elements 2022 IBM Software Institute 17 問題 1:無效的產(chǎn)品有效期 IBM Software Institute 課程大標(biāo)題 Indications in green = Live content Indications in white = Edit in master Indications in blue = Locked elements Indications in black = Optional elements 2022 IBM Software Institute 18 問題 1的 調(diào)試過程 ? 讓我們回到一個已知的狀態(tài)。關(guān)閉 Classics Online 程序,并且回到 Functional Tester。 ? 假設(shè)這個練習(xí)是錯誤發(fā)生后,而你并沒有看到真實的應(yīng)用程序。 ? 進一步假設(shè)這個測試運行了整個晚上,并且計算機在我們進來前(非常有可能)已經(jīng)重新啟動過了。 ? 唯一的有用信息包含有日志文件。 IBM Software Institute 課程大標(biāo)題 Indications in green = Live content Indications in white = Edit in master Indications in blue = Locked elements Indications in black = Optional elements 2022 IBM Software Institute 19 問題 1的 調(diào)試過程 ? 第一步:識別問題是什么 ? 第二步:確定問題可能在什么地方 ? 第三步:設(shè)置斷點并走查代碼 IBM Software Institute 課程大標(biāo)題 Indications in green = Live content Indications in white = Edit in master Indications in blue = Locked elements Indications in black = Optional elements 2022 IBM Software Institute 20 第一步:識別問題是什么 ? 從日志文件中,我們知道在中有一個未處理的異常。 ? 因此我們知道在信用卡數(shù)據(jù)里有一個問題。它在我們的測試或這個應(yīng)用程序的變更方面是個問題。 IBM Software Institute 課程大標(biāo)題 Indications in green = Live content Indications in white = Edit in master Indications in blue = Locked elements Indications in black = Optional elements 2022 IBM Software Institute 21 第二步:確定問題可能在什么地方 ? 日志文件已經(jīng)指向了ClassicsAEnterCreditCardInformation腳本。 ? 因此,這看上去是開始查找問題的好地點。 IBM Software Institute 課程大標(biāo)題 Indications in green = Live content Indications in white = Edit in master Indications in blue = Locked elements Indications in black = Optional elements 2022 IBM Software Institute 22 第三步:設(shè)置斷點并走查代碼 ? 打開 調(diào)試 透視圖中的腳本進行走查,并設(shè)置你的斷點 ? Functional Tester 的左上角,點擊Functional Test 項目視圖來激活它。Functional Test 項目 視圖 IBM Software Institute 課程大標(biāo)題 Indications in green = Live content Indications in white = Edit in master Indications in blue = Locked elements Indications in black = Optional elements 2022 IBM Software Institute 23 第三步:設(shè)置斷點并走查代碼 ? ClassicsAEnterCreditCardInformation腳本來打開它。這應(yīng)當(dāng)會打開一個腳本,看上去如圖所示 : IBM Software Institute 課程大標(biāo)題 Indications in green = Live content Indications in white = Edit in master Indi