單項選擇題在unittest中,如何為測試用例設置后置條件()

A.在測試用例中添加tearDown()方法
B.在測試用例中添加setUp()方法
C.在測試用例中添加postCondition()方法
D.在測試用例中添加preCondition()方法


你可能感興趣的試題

1.單項選擇題在unittest中,如何表示測試用例的一個步驟()

A.使用print語句輸出日志信息
B.使用注釋表示步驟
C.使用setUp()和tearDown()方法包裹步驟
D.使用addStep()方法表示步驟

2.單項選擇題unittest中的斷言用于什么()

A.檢查測試用例的輸出
B.檢查測試用例的輸入
C.檢查測試用例的執(zhí)行結果
D.檢查測試用例的性能

3.單項選擇題使用unittest的測試用例應該繼承哪個類()

A.unittest.TestCase
B.unittest.TestSuite
C.unittest.TestLoader
D.unittest.TestResult

4.單項選擇題使用unittest需要先導入哪個模塊()

A.unittest
B.test
C.unit
D.pytest

5.單項選擇題JMeter測試報告中,哪個組件可以提供HTTP請求的平均響應時間和標準偏差等指標()

A.Summary Report
B.View Results Tree
C.Aggregate Report
D.Assertion Results