Software Testing Multiple Choice Question Answers

1. Which of the following is NOT a white box technique?

a) Statement testing
b) Path testing
c) State transition testing
d) Data flow testing

Ans: C

2. Which of these activities provides the biggest potential cost saving from the use of CAST?

a) Test management
b) Test execution
c) Test design
d) Test planning

Ans: B

3. Which of the following would NOT normally form part of a test plan?

a) Features to be tested
b) Risks
c) Incident reports
d) Schedule

Ans: C

4. What is the main difference between a walkthrough and an inspection?

a) A walkthrough is lead by the author, whilst an inspection is lead by a
trained moderator.
b) An inspection has a trained leader, whilst a walkthrough has no
leader.
c) Authors are not present during inspections, whilst they are during
walkthroughs.
d) An inspection is lead by the author, whilst a walkthrough is lead by a
trained moderator.

Ans: A

5. Which of the following is NOT true of test coverage criteria?

a) A measure of test coverage criteria is the percentage of user
requirements covered.
b) Test coverage criteria can be measured in terms of items exercised
by a test suite.
c) A measure of test coverage criteria is the percentage of faults found.
d) Test coverage criteria are often used when specifying test
completion criteria.

Ans: C

6. Which one of the following statements about system testing is NOT true?

a) System tests are often performed by independent teams.
b) Functional testing is used more than structural testing.
c) Faults found during system tests can be very expensive to fix.
d) End-users should be involved in system tests.

Ans: D

7. Which of the following characterizes the cost of faults?

a) They are easiest to find during system testing but the most
expensive to fix then.
b) They are cheapest to find in the early development phases and the
most expensive to fix in the latest test phases.
c) Faults are cheapest to find in the early development phases but the
most expensive to fix then.
d) Although faults are most expensive to find during early development
phases, they are cheapest to fix then.

Ans: B

8. Integration testing in the small:

a) Tests the individual components that have been developed.
b) Only uses components that form part of the live system.
c) Tests interactions between modules or subsystems.
d) Tests interfaces to other systems.

Ans: C

9. Alpha testing is:

a) Post-release testing by end user representatives at the developer’s
site.
b) The first testing that is performed.
c) Pre-release testing by end user representatives at their sites.
d) Pre-release testing by end user representatives at the developer’s            site.

Ans: D

10. An incident logging system

a) Is a valuable source of project information during testing if it contains           all incidents
b) Is of limited value
c) Only records defects
d) Should be used only by the test team.

Ans: A

11. Increasing the quality of the software, by better development methods, will affect the time needed for testing (the test phases) by:

a) Reducing test time
b) Increasing test time
c) No change
d) Can’t say

Ans: A

12. Coverage measurement

a) Can only be applied at unit or module testing, not at system testing
b) Is a partial measure of test thoroughness
c) Branch coverage should be mandatory for all software
d) Is nothing to do with testing

Ans: B

13. What is the important criterion in deciding what testing technique to use?

a) How well you know a particular technique
b) How appropriate the technique is for testing the application
c) The objective of the test
d) Whether there is a tool to support the technique

Ans: C

14. A program with high cyclometic complexity is almost likely to be:

a) Difficult to test
b) Small
c) Difficult to write
d) Large

Ans: A

15. Given the following sets of test management terms (v-z), and activity descriptions (1-5), which one of the following best pairs the two sets?

v – Test control
w – Test monitoring
x – Test estimation
y – Incident management
z – Configuration control

1 – Calculation of required test resources
2 – Maintenance of record of test results
3 – Re-allocation of resources when tests overrun
4 – Report on deviation from test plan
5 – Tracking of anomalous test results

a) v-3,w-2,x-1,y-5,z-4
b) v-2,w-5,x-1,y-4,z-3
c) v-3,w-4,x-1,y-5,z-2
d) v-2,w-1,x-4,y-3,z-5

Ans: C

16. The oracle assumption:

a) Is that there is some existing system against which test output may
be checked.
b) Is that the tests are reviewed by experienced testers.
c) Is that the tester knows everything about the software under test.
d) Is that the tester can routinely identify the correct outcome of a test.

Ans: D

17. Static analysis is best described as:

a) The analysis of batch programs.
b) The reviewing of test plans.
c) The use of black box testing.
d) The analysis of program code.

Ans: D

18. A failure is:

a) Found in the software; the result of an error.
b) A human action that produces an incorrect result.
c) An incorrect step, process or data definition in a computer program.
d) Departure from specified behavior.

Ans: D

19. The most important thing about early test design is that it:

a) Means inspections are not required.
b) Makes test preparation easier.
c) Can prevent fault multiplication.
d) Will find all faults.

Ans: C

20. Which of the following statements about reviews is true?

a) Reviews are the least effective way of testing code.
b) Reviews cannot be performed on user requirements specifications.
c) Reviews are unlikely to find faults in test plans.
d) Reviews should be performed on specifications, code, and test
plans.

Ans: D

***********************************E*n*D**************************************

Testing Objective Questions and Answers Manual Testing

Objective Questions on Software Testing

1. Which of the following is the odd one out?

a) White box
b) Functional
c) Structural
d) Glass box

Ans: B

2. Which of the following is a static test?

a) Coverage analysis
b) Code inspection
c) Usability assessment
d) Installation test

Ans: B

3. Which of the following is a black box design technique?

a) statement testing
b) error- guessing
c) equivalence partitioning
d) usability testing

Ans: C

4. Which of the following is not the integration strategy?

a) Design based
b) Bottom-up
c) Big-bang
d) Top-down

Ans: A

5. Which of the following is NOT a reasonable test objective:

a) To find faults in the software
b) To give confidence in the software
c) To prove that the software has no faults
d) To find performance problems

Ans: C

6. Which of the following uses Impact Analysis most?

a) Non-functional system testing
b) Component testing
c) User acceptance testing
d) Maintenance testing

Ans: D

7. Expected results are:

a) Only important in system testing
b) Most useful when specified in advance
c) Only used in component testing
d) Derived from the code

Ans: B

8. What type of review requires formal entry and exit criteria, including metrics?

a) Management review
b) Inspection
c) Walkthrough
d) Post project review

Ans: B

9. The difference between re-testing and regression testing is:

a) Re-testing ensures the original fault has been removed; regression
testing looks for unexpected side-effects
b) Re-testing looks for unexpected side-effects; regression testing
ensures the original fault has been removed
c) Re-testing is done by developers; regression testing is done by
independent testers
d) Re-testing is done after faults are fixed; regression testing is done
earlier

Ans: A

10. Given the following types of tool, which tools would typically be used by developers, and which by an independent system test team?

i) static analysis
ii) performance testing
iii. test management
iv) dynamic analysis

a) Developers would typically use i and iv; test team ii and iii
b) Developers would typically use i and iii; test team ii and iv
c) Developers would typically use i, iii and iv; test team ii
d) Developers would typically use ii and iv; test team i and iii

Ans: A

11.Functional system testing is:

a) Testing that the system functions with other systems
b) Testing the end to end functionality of the system as a whole
c) Testing that the components that comprise the system function
together
d) Testing the system performs functions within specified response
times

Ans: B

12. Which of the following items would not come under Configuration Management?

a) Operating systems
b) Live data
c) Test documentation
d) User requirement documents

Ans: B

13. Incidents would not be raised against:

a) Requirements
b) Documentation
c) Improvements suggested by users
d) Test cases

Ans: C

14. Maintenance testing is:

a) Testing to maintain business advantage
b) Testing a released system that has been changed
c) Testing by users to ensure that the system meets a business need
d) Updating tests when the software has changed

Ans: B

15. Which of the following techniques is NOT a black box technique?

a) State transition testing
b) Syntax testing
c) LCSAJ
d) Boundary value analysis

Ans: C

16. What can static analysis NOT find?

a) Memory leaks
b) Unreachable (“dead”) code
c) The use of a variable before it has been defined
d) Array bound violations

Ans: A

17. Which of the following is likely to benefit most from the use of test tools providing test capture and replay facilities?

a) Integration testing
b) Regression testing
c) System testing
d) User acceptance testing

Ans: B

18. Which of the following requirements is testable?

a) The system shall be user friendly.
b) The response time shall be less than one second for the specified
design load.
c) The safety-critical parts of the system shall contain 0 faults.
d) The system shall be built to be portable.

Ans: B

19.. In prioritizing what to test, the most important objective is to:

a) Test high risk areas.
b) Find as many faults as possible.
c) Obtain good test coverage.
d) Test whatever is easiest to test.

Ans: A

20. Which of the following is false?

a) An incident can be raised against documentation.
b) An incident occurs when expected and actual results differ.
c) Incidents can be analysed to assist in test process improvement.
d) Incidents should always be fixed.

Ans: D

***********************************e*n*d**************************************

software testing objective interview questions and answers

1. We split testing into distinct stages primarily because:

a) It is easier to manage testing in stages.
b) Each test stage has a different purpose.
c) We can run different tests in different environments.
d) The more stages we have, the better the testing.

Ans: B

2. Error guessing:

a) is not repeatable and should not be used.
b) can only be used in component, integration and system testing.
c) is only performed in user acceptance testing.
d) supplements formal test design techniques.

Ans: D

3. Which of the following is not described in a unit test standard?

a) Syntax testing
b) Equivalence partitioning
c) Modified condition/decision coverage
d) Stress testing

Ans: D

4. Data flow analysis studies:

a) The use of data on paths through the code.
b) The rate of change of data values as a program executes.
c) Possible communications bottlenecks in a program.
d) The intrinsic complexity of the code.

Ans: A

5. An important benefit of code inspections is that they:

a) Enable the code to be tested before the execution environment is ready.
b) Are cheap to perform.
c) Can be performed by inexperienced staff.
d) Can be performed by the person who wrote the code.

Ans: A

6. Which of the following is the best source of Expected Outcomes for User Acceptance Test scripts?

a) Actual results
b) Program specification
c) User requirements
d) System specification

Ans: C

7. Non-functional system testing includes:

a) Testing to see where the system does not function correctly
b) Testing quality attributes of the system including performance and usability
c) Testing for functions that should not exist
d) Testing a system function using only the software required for that function

Ans: B

8. Which of the following is NOT part of configuration management?

a) Identification of test versions
b) Status accounting of configuration items
c) Auditing conformance to ISO 9000
d) controlled library access

Ans: C

9. What is the purpose of a test completion criterion?

a) To know when a specific test has finished its execution
b) To determine when to stop testing
c) To set the criteria used in generating test inputs
d) To ensure that the test case specification is complete

Ans: B

10.Beta testing is:

a) Performed by an Independent Test Team
b) Performed by customers at the software developer’s site
c) Performed by customers at their own site
d) Performed as early as possible in the lifecycle

Ans: C

11. The main focus of acceptance testing is:

a) Finding faults in the system
b) Testing the system with other systems
c) Ensuring that the system is acceptable to all users
d) Testing from a business perspective

Ans: D

12. Which of the following statements about component testing is FALSE?

a) Black box test design techniques all have an associated test measurement technique
b) Cyclomatic complexity is not a test measurement technique
c) White box test design techniques all have an associated test measurement technique
d) Black box test measurement techniques all have an associated test design technique

Ans: A

13. Which of the following statements is NOT true?

a) Managers can perform inspections on management documents
b) Inspections should be led by a trained leader
c) Inspection is the most formal review process
d) Inspection is appropriate even when there are no written documents

Ans: D

14. A typical commercial test execution tool would be able to perform all of the following, EXCEPT:

a) Calculating expected outputs
b) Recording test inputs
c) Comparison of expected outcomes with actual outcomes
d) Reading test values from a data file

Ans: A

15. Which of the following is not part of performance testing?

a) Measuring response times
b) Generating many transactions
c) Simulating many users
d) Recovery testing

Ans: D

16. Error guessing is best used:

a) As the first approach to deriving test cases
b) After more formal techniques have been applied
c) By inexperienced testers
d) After the system has gone live

Ans: B

17. Software testing activities should start

a) As soon as the code is written
b) During the design stage
c) As soon as possible in the development life cycle
d) When the requirements have been formally documented

Ans: C

18. Faults found by users are due to:

a) Poor quality software
b) Bad luck
c) Poor software and poor testing
d) Insufficient time for testing

Ans: C

19. Which is not true-The black box tester

a) Should be able to understand the source code.
b) Should be able to understand a functional specification or requirements document
c) Is highly motivated to find faults
d) Is creative to find the system’s weaknesses

Ans: A

20. A test design technique is

a) A way to measure in a test plan what has to be done
b) A process for determining expected outputs
c) A way to measure the quality of software
d) A process for selecting test cases

Ans: D

 

 

Equivalence partitioning and Boundary value analysis Objective question answer:

What is Equivalence partitioning?
Equivalence partitioning is a method for deriving test cases. In this method, equivalence classes (for input values) are identified such that each member of the class causes the same kind of processing and output to occur.

What is Boundary value analysis?
The values at the extremes (start/end values or lower/upper end values) of such class are known as Boundary values. Analyzing the behavior of a system using such values is called Boundary value analysis (BVA).

1. One of the fields on a form contains a text box which accepts numeric values in the range of 18 to 25. Identify the invalid Equivalence class.

a)    17
b)    19
c)    24
d)    21
Answer is ‘A’

Solution: The text box accepts numeric values in the range 18 to 25 (18 and 25 are also part of the class). So this class becomes our valid class. But the question is to identify invalid equivalence class. The classes will be as follows:

Class I: values < 18   => invalid class
Class II: 18 to 25       => valid class
Class III: values > 25 => invalid class
17 fall under invalid class. 19, 24 and 21 fall under valid class.

2. In an Examination a candidate has to score minimum of 24 marks in order to clear the exam. The maximum that he can score is 40 marks.  Identify the Valid Equivalence values if the student clears the exam.

a)    22, 23, 26
b)    21, 39, 40
c)    29, 30, 31
d)    0, 15, 22
Answer is ‘C’

Solution: The classes will be as follows:
Class I: values < 24   => invalid class
Class II: 24 to 40       => valid class
Class III: values > 40 => invalid class
We have to identify Valid Equivalence values. Valid Equivalence values will be there in Valid Equivalence class. All the values should be in Class II.

3. One of the fields on a form contains a text box which accepts alpha numeric values. Identify the Valid Equivalence class

a)    BOOK
b)    Book
c)    Boo01k
d)    Book
Answer is ‘C’

Solution: Alpha numeric is combination of alphabets and numbers. Hence we have to choose an option which has both of these. A valid equivalence class will consist of both alphabets and numbers. Option ‘c’ contains both alphabets and numbers.  

4. The Switch is switched off once the temperature falls below 18 and then it is turned on when the temperature is more than 21. When the temperature is more than 21. Identify the Equivalence values which belong to the same class.

a)    12, 16, 22
b)    24, 27, 17
c)    22, 23, 24
d)    14, 15, 19
Answer is ‘C’

Solution: we have to choose values from same class (it can be valid or invalid class). The classes will be as follows:
Class I: less than 18 (switch turned off)
Class II: 18 to 21
Class III: above 21 (switch turned on)
Only in Option ‘c’ all values are from one class.

5. A program validates a numeric field as follows: values less than 10 are rejected, values between 10 and 21 are accepted, values greater than or equal to 22 are rejected. Which of the following input values cover all of the equivalence partitions?

a. 10, 11, 21
b. 3, 20, 21
c. 3, 10, 22
d. 10, 21, 22
Answer is ‘C’

Solution: We have to select values which fall in all the equivalence class (valid and invalid both). The classes will be as follows:
Class I: values <= 9   => invalid class
Class II: 10 to 21       => valid class
Class III: values >= 22 => invalid class
All the values from option ‘c’ fall under all different equivalence clas

6. A program validates a numeric field as follows: values less than 10 are rejected, values between 10 and 21 are accepted, values greater than or equal to 22 are rejected. Which of the following covers the MOST boundary values?

a. 9,10,11,22
b. 9,10,21,22
c. 10,11,21,22
d. 10,11,20,21
Answer is ‘B’

Solution: We have already come up with the classes as shown in question 5. The boundaries can be identified as 9, 10, 21, and 22. These four values are in option ‘b’.

7. In a system designed to work out the tax to be paid:
An employee has £4000 of salary tax free.
The next £1500 is taxed at 10%.
The next £28000 after that is taxed at 22%.
Any further amount is taxed at 40%.

To the nearest whole pound, which of these groups of numbers fall into three DIFFERENT equivalence classes?
a)    £4000; £5000; £5500
b)    £32001; £34000; £36500
c)    £28000; £28001; £32001
d)    £4000; £4200; £5600
Answer is ‘D’

Solution: The classes will be as follows:
Class I   : 0 to £4000          => no tax
Class II  : £4001 to £5500   => 10 % tax
Class III : £5501 to £33500 => 22 % tax
Class IV : £33501 and above => 40 % tax

Select the values which fall in three different equivalence classes. Option‘d’ has values from three different equivalence classes.

8. In a system designed to work out the tax to be paid:
An employee has £4000 of salary tax free.
The next £1500 is taxed at 10%.

The next £28000 after that is taxed at 22%.
Any further amount is taxed at 40%.

To the nearest whole pound, which of these is a valid Boundary Value Analysis test case?
a)    £28000
b)    £33501
c)    £32001
d)    £1500
Answer is ‘B’

Solution: The classes are already divided in question # 7. We have to select a value which is a boundary value (start/end value). 33501 is a boundary value.

9. Given the following specification, which of the following values for age are in the SAME equivalence partition?
If you are less than 18, you are too young to be insured.
Between 18 and 30 inclusive, you will receive a 20% discount.Anyone over 30 is not eligible for a discount.
a)    17, 18, 19
b)    29, 30, 31
c)    18, 29, 30
d)    17, 29, 31
Answer is ‘C’

Solution: The classes will be as follows:
Class I: age < 18       => not insured
Class II: age 18 to 30 => 20 % discount
Class III: age > 30     => no discount
Here we cannot determine if the above classes are valid or invalid, as nothing is mentioned in the question. (But according to our guess we can say I and II are valid and III is invalid. But this is not required here.) We have to select values which are in SAME equivalence partition. Values from option ‘c’ fall in same partition.

10. Which of the following statements is NOT correct?
a)    A minimal test set that achieves 100% LCSAJ coverage will also achieve 100% branch coverage.
b)    A minimal test set that achieves 100% path coverage will also achieve 100% statement coverage.
c)    A minimal test set that achieves 100% path coverage will generally detect more faults than one that achieves 100% statement coverage.
d)    A minimal test set that achieves 100% statement coverage will generally detect more faults than one that achieves 100% branch coverage.
Ans: D

p3

********************************************************************************

11. Analise the following highly simplified procedure:

Ask: “What type of ticket do you require, single or return?”
IF the customer wants ‘return’
Ask: “What rate, Standard or Cheap-day?”
IF the customer replies ‘Cheap-day’
Say: “That will be £11:20″
ELSE
Say: “That will be £19:50″
ENDIF
ELSE
Say: “That will be £9:75″
ENDIF

Now decide the minimum number of tests that are needed to ensure that all the questions have been asked, all combinations have occurred and all
replies given.
a)    3
b)    4
c)    5
d)    6
Ans:A

12. In a system designed to work out the tax to be paid:
An employee has £4000 of salary tax free. The next £1500 is taxed at 10% The next £28000 is taxed at 22% Any further amount is taxed at 40% To the nearest whole pound, which of these is a valid Boundary Value Analysis test case?
a)    £1500
b)    £32001
c)    £33501
d)    £28000
Ans:C

13. Given the following fragment of code, how many tests are
required for 100% decision coverage?

If width > length
thenbiggest_dimension = width
if height > width
thenbiggest_dimension = height
End if
elsebiggest_dimension = length
If height > length
thenbiggest_dimension = height
end if
End if
Ans: 4

14. In a system designed to work out the tax to be paid:
An employee has £4000 of salary tax free. The next £1500 is taxed at 10%
The next £28000 is taxed at 22%
Any further amount is taxed at 40%
Which of these groups of numbers would fall into the same equivalence class?
a) £4800; £14000; £28000
b) £5200; £5500; £28000
c) £28001; £32000; £35000
d) £5800; £28000; £32000
Ans: D

15. Order numbers on a stock control system can range between 10000 and 99999 inclusive. Which of the following inputs might be a result of designing tests for only valid equivalence classes and valid boundaries?
a) 1000, 50000, 99999
b) 9999, 50000, 100000
c) 10000, 50000, 99999
d) 10000, 99999, 100000
Ans: C

16. Given the following code, which statement is true about the minimum number of test cases required for full statement and branch coverage?
Read p
Read q
IF p+q > 100 THEN
Print “Large”
ENDIF
IF p > 50 THEN
Print “p Large”
ENDIF
a) 1 test for statement coverage, 3 for branch coverage
b) 1 test for statement coverage, 2 for branch coverage
c) 1 test for statement coverage, 1 for branch coverage
d) 2 tests for statement coverage, 2 for branch coverage
Ans: B

17. Consider the following statements:
i.100% statement coverage guarantees 100% branch coverage.
ii.100% branch coverage guarantees 100% statement coverage.
iii.100% branch coverage guarantees 100% decision coverage.
iv.100% decision coverage guarantees 100% branch coverage.
v.100% statement coverage guarantees 100% decision coverage.
a) ii is True; i, iii, iv & v are False
b) i & v are True; ii, iii & iv are False
c) ii & iii are True; i, iv & v are False
d) ii, iii & iv are True; i & v are False
Ans: D

18. If the pseudo code below were a programming language, how many tests are required to achieve 100% statement coverage?
If x=3 then
Display_messageX;
If y=2 then
Display_messageY;
Else
Display_messageZ;
Else
Display_messageZ;
a. 1
b. 2
c. 3
d. 4
Ans: C

19. Using the same code example as question 17, how many tests are required to achieve 100% branch/decision coverage?
a. 1
b. 2
c. 3
d. 4
Ans: C

20. A program validates a numeric field as follows:
Values less than 10 are rejected, values between 10 and 21 are accepted, values greater than or equal to 22 are rejected. Which of the following input values cover all of the equivalence partitions?
a. 10, 11, 21
b. 3, 20, 21
c. 3, 10, 22
d. 10, 21, 22
Ans: C

p4

********************************************************************************

21. Using the same specifications as question 29, which of the following covers the MOST boundary values?
a. 9,10,11,22
b. 9,10,21,22
c. 10,11,21,22
d. 10,11,20,21
Ans: B

22. An input field takes the year of birth between 1900 and 2004.
The boundary values for testing this field are:

a. 0,1900,2004,2005
b. 1900, 2004
c. 1899,1900,2004,2005
d. 1899, 1900, 1901,2003,2004,2005
Ans: C

23. Given the Following program
IF X < Y
THEN Statement 1;
ELSE IF Y >= Z
THEN Statement 2;
END
Cyclomatic Complexity is :

a. 2
b. 3
c. 4
d. 5
Ans: B

p