Software Testing | Week 4
Link : Software Testing – Week 4 (nptel.ac.in)
1. Which of the following best describes a test driver?
b. It is a software component that replaces another component that takes care of the control and/or the calling of a software component
2. If method A uses a variable v shared with method B, where A writes to v and B reads from v, then, it is an example of which kind of coupling interface listed below?
d. Shared data coupling
3. To test sequencing constraints that occur as requirements specification, which of the following tests are used?
c. Tests are sequences of method calls, as they occur in the specification
4. A simple path from the last definition to the first use of a coupling variable is called as
b. A coupling du-path
5. State Yes or No:
Are control flow graphs representing code the same as finite state machines that represent the same code?
Consider the graph below that depicts the calls to file handler methods open (), close (), read () and write (). Any procedure/method that uses these methods has to satisfy the following sequencing constraints: (1) An open(f) must be executed before every write(t), (2) An open(f) must be executed before every close (), (3) A write(f)may not be executed after a close () unless there is an open(f) in between, (4) A write(t) should be executed before every close ().
Answer the following questions with reference to the sequencing constraints and the graph a method that uses these constraints.
6. Which of the following is true with reference to the graph satisfying the sequencing constraints?
c. Constraints (1), (2) and (3) are satisfied but (4) is not
7. State true or false: The path (1,4,5,7) satisfies constraint (4).
8. State true or false: The path (1,2,3,7) satisfies all the constraints.
9. State yes or no: Does the path (1,4,6,7) violate any of the constraints?
10. State true or false: The path (1,4,6,4,6,7) satisfies all the constraints.