軟體測試作業二

2022-09-20 01:36:12 字數 1349 閱讀 6173

1.identify the fault.

程式一:索引值i取不到0,陣列中遺漏最後乙個元素。

程式二:當搜尋到第乙個0時便返回其索引(並非最後乙個0值)

2.if possible, identify a test case that does not execute the fault.

程式一:

test: x = , y = 2

程式二:

test: x =

3.if possible, identify a test case that executes the fault, but does not result in an error state.

程式一:

test: x = [2, 3, 5], y = 2

程式二:

test: x = [0, 1, 2]

4.if possible, identify a test case that results in an error, but not a failure.

程式一:

test: x = [3, 4, 5], y = 2

程式二:

test: x = [1, 2, 3]

1.identify the fault.

程式一:索引值i取不到0,陣列中遺漏最後乙個元素。

程式二:當搜尋到第乙個0時便返回其索引(並非最後乙個0值)

2.if possible, identify a test case that does not execute the fault.

程式一:

test: x = , y = 2

程式二:

test: x =

3.if possible, identify a test case that executes the fault, but does not result in an error state.

程式一:

test: x = [2, 3, 5], y = 2

程式二:

test: x = [0, 1, 2]

4.if possible, identify a test case that results in an error, but not a failure.

程式一:

test: x = [3, 4, 5], y = 2

程式二:

test: x = [1, 2, 3]

軟體測試作業!

1.測試情況說明 測試時,目前只發現三個問題 小數點數小於六位時,程式無法顯示正常情況 輸入字元時,程式輸出無法構成三角形 輸入數前輸入鍵盤上的tab鍵無效,程式無提示,輸入數字後,輸入tab鍵代替空格 2.測試物件分析 3.測試方法 3.1 邊界值分析法 測試用例設計思路 近似數,例如2.9999...

軟體測試作業

根據下面三角形程式,結合白盒測試用例設計技術,在junit工具中編寫對應的單元測試指令碼。package test1 public class public boolean is tri return istrue public string istype tri return strtype 測試...

軟體測試作業

1.什麼是軟體缺陷?軟體缺陷的產生對軟體有什麼影響?軟體缺陷就是軟體產品中所存在的問題,最終表現為使用者所需要的功能沒有完全實現,不能滿足或不能全部滿足於使用者的需求。質量不佳的軟體產品不僅會使開發商的維護費用和使用者的使用成本大幅度增加,還可能產生其他的責任風險,造成公司信譽下降。一些關鍵的應用領...