




下載本文檔
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、復習題1.Below is one faulty program. It includes a test case that results in failure. Answer the following questions about the program.(20)(a) Identify the fault.(b) If possible, identify a test case that does not execute the fault.(c) If possible, identify a test case that executes the fault, but does
2、 not result in an error state.(d) If possible identify a test case that results in an error, but not a failure. Hint: Dont forget about the program counter.(e) For the given test case, identify the first error state. Be sure to describe the complete state.(f) Fix the fault and verify that the given
3、test now produces the expected output.(a) The for-loop should search high to low:for (int i=x.length-1; i = 0; i-) (b) All inputs execute the fault - even the null input.(c) If the loop is not executed at all, there is no error. If the loop is executed only once, high-to-low and low-to-high evaluati
4、on are the same. Hence there is no error for length 0 or length 1 inputs.Input: x = 3Expected Output: -1Actual Output: -1(d) There is an error anytime the loop is executed more than once, since the values of index i ascend instead of descend.Input: x = 1, 0, 3Expected Output: 1Actual Output: 1(e) Th
5、e first error state is when index i has the value 0 when it should have a value at the end of the array, namely x.length-1. Hence, the first error state is encountered immediately after the assignment to i in the for-statement if there is more than one value in x.Input: x = 0, 1, 0Expected Output: 2
6、Actual Output: 0First Error State:x = 0, 1, 0i = 0PC = just after i= 0;(f ) See (a)4. Answer questions (a)(d) for the graph defined by the following sets: N = 1, 2, 3, 4,N0 = 1,Nf = 4,E = (1, 2), (2, 3), (3, 2), (2, 4)(a) Draw the graph.(b) List test paths that achieve node coverage, but not edge co
7、verage.(c) List test paths that achieve edge coverage, but not edge Pair coverage.(d) List test paths that achieve edge pair coverage.(a)Omitted.(b) For this program, this is not possible. All test paths must begin at node 1, visit node 2, and, eventually, end at node 4. Any test path that visits no
8、de 3 also visits both edge (2; 3) and edge (3; 2).(c) T = 1; 2; 3; 2; 4Note that the edge pair 3; 2; 3 is not toured by the single test path given.(d) T = 1; 2; 4; 1; 2; 3; 2; 3; 2; 45. A graph is defined by the sets of nodes, initial nodes, final nodes, edges, and defs and uses. Each graph also con
9、tains a collection of test paths. Answer the following questions about each graph.(a) Draw the graph.(b) List all of the du-paths with respect to x. (Note: Include all du-paths, even those that are subpaths of some other du-path).(c) For each test path, determine which du-paths that test path tours.
10、 For this part of the exercise, you should consider both direct touring and sidetrips. Hint: A table is a convenient format for describing this relationship.(d) List a minimal test set that satisfies all defs coverage with respect to x. (Direct tours only.) Use the given test paths.(e) List a minima
11、l test set that satisfies all uses coverage with respect to x. (Direct tours only.) Use the given test paths.(f) List a minimal test set that satisfies all du-paths coverage with respect to x.(Direct tours only.) Use the given test paths.(a)Omitted.6. The graph in Figure 3 was used as an example for
12、 prime test paths. Add appropriate edge labels to the graph, then derive and simplify the path expressions. Next add edge weights of 1 for non-cycle edges and 5 for cycle edges. Then compute the maximum number of paths in the graph and the minimum number of paths to reach all edges. This graph has 2
13、5 prime paths. Briefly discuss the number of prime paths with the maximum number of paths and consider the effect of varying the cycle weight on the maximum number of paths.(15) Fig 37. Use functions f to answer the following question. 8. How are faults and failures related to testing and debugging?
14、Faults are problems in the code, failures are incorrect external events. Depending on which of Beizers levels you are working in, testing is the process of trying to cause failures or to show that they occur at an acceptable rate. In contrast, debugging is a diagnostic process where, given a failure
15、, an attempt is made to find the associated fault.錯誤和失敗是如何相關的測試和調試?缺點是代碼中的問題,失敗是不正確的外部事件。取決于你正在進行的Beizer的等級,測試是一個過程,試圖造成失敗或表明他們發(fā)生在一個可接受的速度。相比之下,調試是一種診斷過程中,給定一個失敗,試圖找到相關的故障9. For what do testers use automation? What are the limitations of automation?Automation can help in many areas, most often to relieve the tester from repetitive, mechanical tasks. Checking of testing criteria can be automated through instrumentation, which allows a higher level of testing to be performed. Automation will always run into undecidable problems, such as in
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 美術作品鑒賞方法-深度研究
- 生物基復合材料環(huán)境影響-深度研究
- 網絡安全態(tài)勢感知-第9篇-深度研究
- YY/T 1860.1-2024無源外科植入物植入物涂層第1部分:通用要求
- 天津醫(yī)學高等??茖W?!缎畔⑴c通信技術前沿》2023-2024學年第二學期期末試卷
- 山東鋁業(yè)職業(yè)學院《游泳》2023-2024學年第二學期期末試卷
- 武漢工程職業(yè)技術學院《彝語方言學》2023-2024學年第二學期期末試卷
- 浙江商業(yè)職業(yè)技術學院《數字邏輯與數字電路技術實驗》2023-2024學年第二學期期末試卷
- 牡丹江大學《美術課程標準與教學設計》2023-2024學年第二學期期末試卷
- 上海工商職業(yè)技術學院《綜合評價方法》2023-2024學年第二學期期末試卷
- 同等學力英語申碩考試詞匯(第六版大綱)電子版
- 有機化學完整版本
- 銀行存管三方協(xié)議書
- 2024年新人教版化學九年級上冊全冊課件(新版教材)
- 教科版 二年級科學上冊第一單元第6課《不同的季節(jié)》同步練習(附答案解析)
- 山東省東營市2024年中考英語真題【附真題答案】
- 平安產險產品定價模型優(yōu)化研究
- GB/T 12279.2-2024心血管植入器械人工心臟瓣膜第2部分:外科植入式人工心臟瓣膜
- JTG-3830-2018公路工程建設項目概算預算編制辦法
- 設備維護服務方案(2篇)
- 醫(yī)院檢驗科實驗室生物安全程序文件SOP
評論
0/150
提交評論