【正文】
要完成此操作,在斷點(diǎn)上右鍵點(diǎn)擊,并選擇切換斷點(diǎ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 27 變量視圖 ? 在 變量 視圖中,你可以看到當(dā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 9 腳本 ClassicsATestScript ? 這個(gè)腳本是項(xiàng)目的主要測試腳本。 ?斷點(diǎn) ?單步執(zhí)行( Step Over) ?單步跳出( Step Out) ?單步進(jìn)入( Step Into) ? Unit 標(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 4 代碼行例子 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 5 調(diào)試過程 ? 遞歸調(dià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 6 調(diào)試過程 1. 從腳本中的一個(gè)已知點(diǎn)開始,并設(shè)置一個(gè)斷點(diǎ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 11 腳本 ClassicsAEnterCreditCardInformation ? 此腳本從一個(gè)數(shù)據(jù)池中讀取信用卡的信息并將數(shù)據(jù)輸入到 Place an Order屏幕中。 ? 因此,這看上去是開始查找問題的好地點(diǎn)。 ? ,切回到 Functional Tester, 可以看到指示代碼中的當(dāng)前行的箭頭已經(jīng)移到下一行。設(shè)定一個(gè)斷點(diǎn)與增加或刪除一個(gè)斷點(diǎn)是相同的操作。問題是,在 Expiration Date字段中輸入的值 “ 1212” 不符合任何有效的產(chǎn)品有效期格式。 ? 。 ? 現(xiàn)在你可以像往常一樣通過點(diǎn)擊工具欄中的 運(yùn)行功能測試腳本 圖標(biāo)來運(yùn)行腳本了。 5. 重新啟動(dòng)調(diào)試器并運(yùn)行,直到你到達(dá)新的斷點(diǎn)。 4. 打開標(biāo)注在這行的函數(shù)的源代碼,并在函數(shù)內(nèi)部設(shè)置一個(gè)斷點(diǎn)。 ? 在腳本的頂部,將 startApp命令的參數(shù)應(yīng)用程序的名字改為 ClassicsJavaB。 ? 點(diǎn)擊完成。我們現(xiàn)在可以更清楚地看到錯(cuò)誤。 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 35 斷點(diǎn)視圖 IBM Software Institute 課程大標(biāo)題 Indications in green = Live content Indications in white = Edit in master Indication