Sunday 16 October 2016

Final Exam 2

This document provides solution to the second 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.
Section A


  1. Pick the correct statement from the following:
    1. Every programming  error causes  a fault
    2. Every programming  error is  caused by  a failure
    3. Every failure is caused by a fault
    4. Every  bug causes  a failure


  1. Why is it necessary to test a large program at three different levels: unit, integration, and system rather than testing only at the system level?
    1. Reduces the number of test cases  that can be designed
    2. Reduces the  test execution effort
    3. Reduces the debugging effort
    4. Reduces test case design effort.


  1. Which one of the following can be considered as a fault-based testing technique?
    1. Cause-effect graphing
    2. Data flow testing
    3. Orthogonal array testing
    4. Mutation testing


  1. Among the following test techniques, which one of the following is the strongest testing technique?
    1. Multiple condition testing
    2. Decision testing
    3. Basic condition testing
    4. MC/DC testing


  1. Why is all path testing rarely used in practice?
    1. Too many test cases are required
    2. Too weak a testing technique
    3. It is subsumed by basis path testing
    4. It is subsumed by statement coverage


  1. Customers typically carry out which of the following types of testing?
    1. Unit testing
    2. Integration testing
    3. Acceptance testing
    4. Regression testing


  1. Regression testing needs to be carried out at which of the following levels of testing?
    1. Unit
    2. Integration
    3. System
    4. At all levels, i.e. at unit, integration, as well as system testing level
  1. Which one of the following is a suitable unit for testing object-oriented programs?
    1. Statement
    2. Method
    3. Class
    4. Polymorphism
  1. If  it is required that a a web based application needs to work seamlessly and satisfactorily with Chrome, Mozilla, and Explorer web browsers, which type of performance testing is applicable?
    1. Stress testing
    2. Recovery testing
    3. Compatibility testing
    4. Configuration testing


  1. Which one of the following techniques can a manager use estimate the number of  errors still remaining in a program after  all the testing is over?
    1. Mutation testing
    2. Error seeding
    3. Pair-wise testing
    4. Cause-effect graphing


Section B
  1. Code coverage analysis is used to measure:
  1. Thoroughness of testing
  2. Testing efficiency
  3. Quality of  code
  4. Distribution of bugs


  1. Which one of the following attributes of a program can be inferred from its Cyclomatic complexity?
  1. Computational complexity
  2. Lines of code (LoC)
  3. Executable code size
  4. Testability


  1. Which one of the following types  of bugs may not get detected in white-box testing, but  are very likely to be get detected  by white-box testing?
    1. Syntax  errors
    2. Behavioral errors
    3. Trojans
    4. Performance errors


  1. Beta  testing is usually performed by which one of the following?
  1. Test team
  2. Development team
  3. Friendly customers
  4. Customers


  1. Suppose a certain function takes 5 Integer  input parameters. The valid values for each parameter form a range of integer values. What is the minimum number of  test cases required for robust  boundary value testing?
    1. 20
    2. 25
    3. 30
    4. 31


  1. During which phase of the V model of software development are the integration test cases designed?
    1. Requirements specification
    2. High-level design
    3. Detailed design
    4. Coding


  1. If MC/DC  coverage has been achieved on a unit under test, which one of the following test coverage is implicitly implied?
  1. Path coverage
  2. Multiple condition coverage
  3. Condition/decision  coverage
  4. Data flow coverage


  1. In which one of the following integration testing strategies are stubs  redundant?
    1. Top-down
    2. Bottom-up
    3. Sandwich
    4. Both bottom up and Sandwich


  1. For the following program statement, which one of the following test suites  would achieve basic condition coverage?
 if (a>10 || b<50)  p++;
    1. (a=20,b=10), (a=0,b=15)
    2. (a=20,b=10), (a=0,b=15), (a=5,b=45)
    3. (a=50,b=20), (a=0,b=35)
    4. (a=50,b=20), (a=1,b=85)


  1. Which one of the following problems is an obstacle in developing tools to make Mutation testing completely automatic?
    1. Too many mutants can result
    2. Some mutants can cause compilation error
    3. Some mutants may not cause compilation error
    4. Equivalent mutants


Section C
Consider the following “C” code segment and answer questions 1 to 5 based on this code segment.
int main (){
  int a,b=0;


   scanf(“%d”,&a);
   if( a > 10 || a<0)   {
      b=b+10;}
   else if( a == 20 ){
    b=b+20;}
   else if( a == 30 ){
      b=b+30;}
  else{
      b=b+40; }


}


  1. At least how many test cases are needed for the given C code for achieving decision coverage?
  1. 3
  2. 4
  3. 5
  4. 6


  1. At least how many test cases are needed for the given C code for achieving basic  condition coverage?
  1. 3
  2. 4
  3. 5
  4. Basic condition coverage is not achievable


  1. At least how many test cases are needed for the given C code for achieving multiple  condition coverage?
  1. 4
  2. 6
  3. 8
  4. Multiple  condition coverage is not achievable
  1. At least how many test cases are needed for the given C code for achieving MC/DC coverage?
  1. 3
  2. 5
  3. 7
  4. MC/DC  coverage is not achievable


  1. At least how many test cases are needed for the given C code for achieving  basis path coverage?
  1. 4
  2. 6
  3. 8
  4. Basis path coverage is not achievable
  1. Non-functional requirements are tested at which  of the following levels of testing:
    1. Unit testing
    2. Integration testing
    3. System testing
    4. Both unit and integration testing


  1. Consider  the following function that takes an integer a (that can assume values between 0 to 100) as argument and  carries out the following actions  involving setting the value of a variable b.
Condition
Action
  (a<10)||(a>80)
b=b+10
(a== 30)
b=b+20;
(a==40)
B=b+30;
For all other cases
B=b+40;


During black box testing of the function, how many valid equivalence case test cases are required?
    1. 4
    2. 5
    3. 8
    4. 10


  1. Consider  the following function that takes an integer a (that can assume values between 0 to 100) as argument and  carries out the following actions  involving setting the value of a variable b.
Condition
Action
  (a<10)||(a>80)
b=b+10
For all other cases
B=b+40;


During black box testing of the function, how many boundary value  test cases are required assuming that robust testing is not targetted?
  1. 4
  2. 5
  3. 13
  4. 17


  1. Which one of the following is a popular integration testing strategy for  large object-oriented programs?
    1. Top-down
    2. Bottom-up
    3. Big-bang
    4. Use-based


  1. Suppose an untested program was determined to contain 640 bugs. Three  different  testing techniques were applied to test the code. Each testing technique is effective to detect 50% of the bugs that exist before the concerned testing technique is applied. While fixing a bug, there is a 50% chance of creating another bug. How many bugs would  exist in the code after the three testing and bug-fix cycles are carried out?
    1. 200
    2. 270
    3. 350
    4. 448


Share:

Contact Me

Name

Email *

Message *

Popular Posts