您的当前位置:首页正文

软件测试复习题题目

2022-07-03 来源:个人技术集锦
复习题

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 not result in an error state.

(d) If possible identify a test case that results in an error, but not a failure. Hint: Don't 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 test now produces the expected output.

2. Give the sets N, N0, Nf , and E for the graph in Figure 1.

Fig 1

3. In Figure 2, find test case inputs such that the corresponding test path visits edge (n0; n3).

Fig 2

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 coverage. (c) List test paths that achieve edge coverage, but not edge Pair coverage. (d) List test paths that achieve edge pair coverage.

5. A graph is defined by the sets of nodes, initial nodes, final nodes, edges, and defs and uses. Each graph also contains 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. 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 minimal 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.

6. The graph in Figure 3 was used as an example for 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 25 prime paths. Brie y 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 3

7. Use functions f to answer the following question.

8. How are faults and failures related to testing and debugging?

9. For what do testers use automation? What are the limitations of automation?

因篇幅问题不能全部显示,请点此查看更多更全内容