Sunday 16 October 2016

Final Exam 1

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.

Section A

  1. A tester observes which one of the following during testing?
    1. Error
    2. Fault
    3. Failure
    4. Bug

  1. Which one of the following is true concerning verification:
    1. Helps answer the question: “Have you built the right thing?”
    2. Checks the final product against the specification.
    3. Usually carried out by  the Test team.
    4. Checks whether an artifact produced in a phase conforms to the corresponding artifact produced in a  previous  phase.

  1. Of the following, who conducts acceptance testing?
    1. The development team
    2. The test team
    3. A set of friendly clients
    4. Customer

  1. Which one of the following testing techniques  is  effective for testing whether a developed software meets its non-functional requirements?
    1. Path testing
    2. Dataflow testing
    3. Robust boundary-value testing
    4. Performance testing

  1. Which one of the following is a fault-based testing technique?
    1. Pair wise testing
    2. Dataflow testing
    3. Path testing
    4. Mutation testing

  1. Which of the following is an example of a negative test case?
    1. A test designed to crash the software
    2. A test designed with negative integral values
    3. A test case causing software failure
    4. A test case with  values outside the valid range of values

  1. For pure top-down integration testing, which one of the following is redundant?
    1. Stubs
    2. Drivers
    3. Both stubs and drivers
    4. Usually drivers, but sometimes can be stubs also
  1. Which one of the following are grey box test cases?
    1. Test cases designed based on the requirements document
    2. Test cases designed using  Design documents
    3. Test cases designed using the source code
    4. Test cases designed using the maintenance log
  1. Cause-effect test cases are,  in effect,  designed using which one of the following types of testing techniques?
    1. Decision-table based testing
    2. Coverage-based testing
    3. Fault-based testing
    4. Path-based testing

  1. Which one of the following is not a popular integration testing strategy for object-oriented programs?
    1. Thread-based
    2. Cluster-based
    3. Use-based
    4. Top-down






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

  1. Which one of the following statements is not an objective of software verification?
  1. Ensuring that product development steps are carried out correctly.
  2. Ensuring that the correct product has been developed.
  3. Achieving phase containment of errors.
  4. Ensuring that the outputs produced at a stage conform to the corresponding outputs of the previous phase.

  1. 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.
  1. 125
  2. 400
  3. 500
  4. 1200

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

  1. 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. 1
  2. 2
  3. 3
  4. 4

  1. 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. 1
  2. 2
  3. 3
  4. 4

  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. 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;
}

    1. 2
    2. 3
    3. 4
    4. 5

  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. Mutation testing is most effective for which one of the following types of bugs?
    1. Algorithmic errors
    2. Programming errors
    3. Design  errors
    4. Requirements errors

Section C

  1. The purpose of error seeding is which one of the following?
  1. Determine the origin of the bugs
  2. Plant  trojans
  3. Determine the number of latent bugs
  4. Plant insidious bugs before delivery to the customer

  1. The main purpose of integration testing is to find  which one of the following types of errors?
  1. Logic  errors
  2. algorithm errors
  3. Arithmetic  errors
  4. interface errors

  1. Which of the following types of testing is usually not performed during system testing?
  1. Stress testing
  2. Functionality testing
  3. Recovery testing
  4. White box testing

  1. Usability issues are tested during which one of the following levels of testing?
    1. Unit testing
    2. Integration testing
    3. Performance testing
    4. Regression testing
  1. Which one of the following is the correct ordering of the coverage-based white box  testing techniques from the  strongest to the  weakest:
    1. Condition/Decision coverage,  multiple condition coverage, MC/DC coverage, Statement coverage
    2. Statement coverage, Condition/Decision coverage,  multiple condition coverage, MC/DC coverage
    3. MC/DC coverage, Condition/Decision coverage, Multiple condition coverage,, Statement coverage
    4. Multiple condition coverage, MC/DC coverage, Condition/Decision coverage,  Statement coverage

  1. 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?
    1. 6
    2. 7
    3. 8
    4. 9

  1. For the following program statement, which one of the following test suites  would achieve basic condition/decision  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=70), (a=0,b=35)
    4. (a=50,b=20), (a=1,b=85)

  1. 8. Which one of the following is not an argument in support of automating regression testing?

    1. Regression test cases are executed frequently
    2. Regression test cases are essentially test cases that have been already executed once
    3. Effective capture and replay type of tools are available both from open source repositories as well as from commercial offerings
    4. Some of the original test cases may require maintenance after a change

  1. Which one of the following is a measure of the testing difficulty of a program?
    1. Number of statements in the program
    2. Number of decision statements in the program
    3. Complexity of the arithmetic expressions used in the program
    4. Time and space complexity of the program

  1. 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?


    1. 480
    2. 498
    3. 512
    4. 548
Share:

0 comments:

Contact Me

Name

Email *

Message *

Popular Posts