This post provides solution to the first final exam of the online course Software Testing offered by MHRD. The answers to each questions are marked in red.
The pdf format can be downloaded from here.
The pdf format can be downloaded from here.
Section A
- A tester observes which one of the following during testing?
- Error
- Fault
- Failure
- Bug
- Which one of the following is true concerning verification:
- Helps answer the question: “Have you built the right thing?”
- Checks the final product against the specification.
- Usually carried out by the Test team.
- Checks whether an artifact produced in a phase conforms to the corresponding artifact produced in a previous phase.
- Of the following, who conducts acceptance testing?
- The development team
- The test team
- A set of friendly clients
- Customer
- Which one of the following testing techniques is effective for testing whether a developed software meets its non-functional requirements?
- Path testing
- Dataflow testing
- Robust boundary-value testing
- Performance testing
- Which one of the following is a fault-based testing technique?
- Pair wise testing
- Dataflow testing
- Path testing
- Mutation testing
- Which of the following is an example of a negative test case?
- A test designed to crash the software
- A test designed with negative integral values
- A test case causing software failure
- A test case with values outside the valid range of values
- For pure top-down integration testing, which one of the following is redundant?
- Stubs
- Drivers
- Both stubs and drivers
- Usually drivers, but sometimes can be stubs also
- Which one of the following are grey box test cases?
- Test cases designed based on the requirements document
- Test cases designed using Design documents
- Test cases designed using the source code
- Test cases designed using the maintenance log
- Cause-effect test cases are, in effect, designed using which one of the following types of testing techniques?
- Decision-table based testing
- Coverage-based testing
- Fault-based testing
- Path-based testing
- Which one of the following is not a popular integration testing strategy for object-oriented programs?
- Thread-based
- Cluster-based
- Use-based
- Top-down
Section B
- During which phase of the V model of software development are the system test cases designed?
- Requirements specification
- High-level design
- Detailed design
- Coding
- Which one of the following statements is not an objective of software verification?
- Ensuring that product development steps are carried out correctly.
- Ensuring that the correct product has been developed.
- Achieving phase containment of errors.
- Ensuring that the outputs produced at a stage conform to the corresponding outputs of the previous phase.
- Suppose in order to estimate the number of latent errors in a program, you seed it with 1000 errors of different kinds. After testing the software using its full test suite, you discover only 500 of the seeded errors. You discover 250 other errors also. Estimate the number of latent errors in the software.
- 125
- 400
- 500
- 1200
- Alpha testing is usually performed by which one of the following?
- Test team
- Development team
- Friendly customers
- Customers
- At least how many test cases are required to achieve MC/DC coverage of the following code segment:
If((a>5) or (b<100) or (c>50)) x=x+1;
- 1
- 2
- 3
- 4
- At least how many test cases are required to achieve basic condition coverage of the following code segment:
If((a>5) and (b<100) and (c>50)) x=x+1;
- 1
- 2
- 3
- 4
- If MC/DC coverage has been achieved on a unit under test, which one of the following test coverage is implicitly implied?
- Path coverage
- Multiple condition coverage
- Condition/decision coverage
- Data flow coverage
- What is the McCabe’s Cyclomatic complexity for the following code segment?
int partition (int arr[], int l, int h){
int x = arr[h], i = (l - 1),t;
for (int j = l; j <= h- 1; j++) {
if (arr[j] <= x){
i++;
t=&arr[i]; &arr[i]= &arr[j]); &arr[j]=t;
}
}
t=&arr[i + 1]; &arr[i+1])= &arr[h]; &arr[h]=t;
}
- 2
- 3
- 4
- 5
- For the following program statement, which one of the following test suites would achieve basic condition coverage?
if (a>10 && b<50) p++;
- (a=20,b=10), (a=0,b=15)
- (a=20,b=10), (a=0,b=15), (a=5,b=45)
- (a=50,b=20), (a=0,b=35)
- (a=50,b=20), (a=1,b=85)
- Mutation testing is most effective for which one of the following types of bugs?
- Algorithmic errors
- Programming errors
- Design errors
- Requirements errors
Section C
- The purpose of error seeding is which one of the following?
- Determine the origin of the bugs
- Plant trojans
- Determine the number of latent bugs
- Plant insidious bugs before delivery to the customer
- The main purpose of integration testing is to find which one of the following types of errors?
- Logic errors
- algorithm errors
- Arithmetic errors
- interface errors
- Which of the following types of testing is usually not performed during system testing?
- Stress testing
- Functionality testing
- Recovery testing
- White box testing
- Usability issues are tested during which one of the following levels of testing?
- Unit testing
- Integration testing
- Performance testing
- Regression testing
- Which one of the following is the correct ordering of the coverage-based white box testing techniques from the strongest to the weakest:
- Condition/Decision coverage, multiple condition coverage, MC/DC coverage, Statement coverage
- Statement coverage, Condition/Decision coverage, multiple condition coverage, MC/DC coverage
- MC/DC coverage, Condition/Decision coverage, Multiple condition coverage,, Statement coverage
- Multiple condition coverage, MC/DC coverage, Condition/Decision coverage, Statement coverage
- Consider a function that has been written by the academic unit of an Institute to compute the grade of a student from the marks obtained. Assume that the following grading scheme is being used by the academic Institute.
Marks
|
Grade
|
<30
|
F
|
>= 30 and <50
|
P
|
>=50 and <60
|
D
|
>=60 and <70
|
C
|
>=70 and <80
|
B
|
>=80 and <90
|
A
|
>=90
|
Ex
|
During black box testing of the function, how many equivalence class test cases need to be designed, assuming that robust testing is not targeted?
- 6
- 7
- 8
- 9
- For the following program statement, which one of the following test suites would achieve basic condition/decision coverage?
if (a>10 && b<50) p++;
- (a=20,b=10), (a=0,b=15)
- (a=20,b=10), (a=0,b=15), (a=5,b=45)
- (a=50,b=70), (a=0,b=35)
- (a=50,b=20), (a=1,b=85)
- 8. Which one of the following is not an argument in support of automating regression testing?
- Regression test cases are executed frequently
- Regression test cases are essentially test cases that have been already executed once
- Effective capture and replay type of tools are available both from open source repositories as well as from commercial offerings
- Some of the original test cases may require maintenance after a change
- Which one of the following is a measure of the testing difficulty of a program?
- Number of statements in the program
- Number of decision statements in the program
- Complexity of the arithmetic expressions used in the program
- Time and space complexity of the program
- Suppose an untested program was determined to contain 1000 bugs. Three different testing techniques were applied to test the code. Each testing technique is effective to detect 25% of the bugs that exist before the concerned testing technique is applied. While fixing a bug, there is a 20% chance of creating another bug. How many bugs would exist in the code after the three testing and bug-fix cycles are carried out?
- 480
- 498
- 512
- 548
0 comments:
New comments are not allowed.