Sei sulla pagina 1di 2

Quiz 4

Software Engineering

Name___solutions_____________

Answers are found in the Design Patterns and Testing and Reliability notes.
1. The following are all major components of a test plan except for:
a. requirements traceability - showing that all the user's requirements have been tested
b. coding standards - showing the specific standards used in the coding of the system
c. testing schedule - showing the overall schedule and resource allocation
d. tested items - a list of the products of the software process which are to be tested
2. A feature of top-down testing is
a. unnoticed design errors in the system architecture may be detected at an early stage in the testing process.
b. test drivers are required to complete the testing process.
c. a limited, working system is not available until later in the development.
d. all parts of the system must be developed before testing can begin.
3. Since an object can be tested using its own test drivers, it can be appropriate to use ___ for OO systems.
a. top-down testing
b. stress testing
c. thread testing
d. bottom-up testing
4. Why are strongly typed languages such as Java better equipped to avoid interface errors?
a. Testing can be completed more efficiently with a strongly typed language.
b. It is likely that the interface errors will occur in a rarely used part of the system.
c. Those compilers will not allow you to pass mismatched parameter types between components.
d. Faults in one object may only be detected when some other object behaves in an unexpected way.
5. A design pattern is:
a. a graphical user interface style.
b. a specification method.
c. a COTS product.
d. a way of reusing abstract knowledge about a problem and its solution.
6. The final stage of the testing process is the ___.
a. system testing
b. unit testing
c. module testing
d. acceptance testing
7. The goal of path testing is.
a. to verify the development design path against requirements.
b. to exercise every independent execution path through a component or program.
c. to confirm the paths in the component pseudocode have been identified.
d. to debug program faults by observing action in any program loops.
8. Where the tests are derived purely from the system requirements, the approach is called:
a. structural or white-box testing
b. incremental testing
c. functional or black-box testing
d. interface testing
9. A software failure occurs when:
a. the software is being tested for the first time.
b. the software is running and it fails to deliver an expected service.
c. the software's requirements have not been formally checked.
d. the client wishes to change the software requirements.
10. What is the purpose of an equivalence partition?
a. The testing of input data requires the use of all data within a defined equivalence partition
b. When testing the processing of a large range of data values, it can be helpful to use sample data from separate
partition ranges.
c. When performing white box testing, it is vital to use at least two values from each equivalence partition.
d. The tester must be careful that the boundary values of each equivalence partition overlap.

1
Quiz 4

10. Regarding the following statements about regression testing :


R1. A regression test is performed just before the unit test to confirm the requirements are complete.
R2. A regression test is performed during the integration testing phase.
R3. A regression test will confirm that all code defects have been removed.
R4. Regression tests are the same as acceptance tests.
R5. A regression test will show that changes to the code have not introduced new faults.
a.
b.
c.
d.

Statements R1, R3, and R5 are true. Statements R2 and R4 are false.
Statements R2 and R5 are true. Statements R1, R3, and R4 are false.
Statements R4 and R5 are true. Statements R1, R2, and R3 are false.
Statements R3 and R5 are true. Statements R1, R2, and R4 are false.

11. Reliability in a software system can be achieved using all of the following except for:
a. fault detection
b. fault avoidance
c. fault tolerance
d. fault initiation
12. Because it relies mainly on requirements, black box testing would miss the following conditions except for:
a. an infinite loop buried within the code
b. code that would never be reached under any circumstances
c. an input value of zero causing a divide by zero run time error
d. code which could be rewritten to run more efficiently
13. Which of the following statements best describes the difference between testing and debugging?
a. Testing will identify the source of faults. Debugging analyzes the faults through examination of the code.
b. Dynamic testing exposes any failures caused by the faults. Debugging finds, analyzes, and removes the causes of
failures in the software
c. Testing will remove the faults. Debugging identifies the causes of failures.
d. Testing will prove the software has eliminated all software failures. Debugging can be used to mitigate faults.
13. A co-worker stops by your desk and asks for some help fixing a method for determining a penalty amount for late equipment
returns loaned out to customers. Its supposed to calculate the penalty amount based on the number of days late the equipment
had been returned to us, she says. You ask, Is there a maximum late return penalty? She replies, Yes, the daily penalty
amount is accrued daily up to and including the 21 day maximum period. You examine her Java code (shown below):

She says, We ran a statement coverage test so that every statement is executed once to find any defects in the code and it went
ok. You say, That should have been just one test then. Yes, thats right. I see your problem now.
What is the problem? What test input(s) should have been used? How should the code be rewritten?

Problem is that branch testing should have been used to test the input of (daysLate = 22 and printOn = true). Fix the code by
initializing fineAmount to MAX_PENALTY_PERIOD x DAILY_FILE.

2
Quiz 4

Potrebbero piacerti anche