Object Oriented Testing - Questions and Answers

Short Answer Questions

These short answer questions on object oriented testing can be asked in an interview or in an exam for 1 or 2 marks.

What is alpha testing?

Answer: A software testing which is carried out at developers location in which the customer operates the system and the developer watches it for recording errors and usage problems is called as Alpha testing.

What is beta testing?

Answer: A software testing which is carried out by one or more selective groups of friendly customers who used the system and report the faults they detect is called as better testing. [During this a developer is generally not present and does not control the environment. super user feels free in handling system and records all the problems that are found.]

Define test case.

Answer: A test case is a set of inputs and expected outputs (conditions or variables) under which a tester will determine whether a system under test satisfies the requirements and works correctly.

What is meant by stub?

Answer: A stub and a driver are partial, temporary implementations of a component and hence they are called as dummy modules. [Both may serve as placeholder for incomplete component or implement testing support code.]

What is acceptance testing?

Answer: A level of software testing which is used to evaluate system's compliance with business requirements and assess whether it is acceptable for delivery is called as acceptance testing.

Give any two attributes of a good test case.

Answer: The attributes of a good test case are:
  1. Test Case ID
  2. Test Data
  3. Test Steps

[ Test Case ID: Unique Test Case identification number.
Test Data: The data required for executing the test case.
Test Steps: Detailed steps for test case execution.
Result/Log: Success or Failure. ]

Long Answer Questions

These long answer questions on object oriented testing can be asked in exam for 5 marks.

Explain black box testing with any two methods used in it.

Answer: 1) Black Box testing consists of only the observation of the output for certain input test cases. Black box testing is not related with the internal code. If some input is given then whether specific output is produced by a unit is checked by Black box testing. It is also called as behavioural or functional testing.
2) Black box testing diagram:
3) BBT is used to find errors such as
  • Errors in external database access
  • Initialization and termination erros
  • Interfacing errors
  • Missing and incorrect functions
4) Methods used in Black box testing are:
  • Error Guessing: In this method, possible errors are listed and test cases are constructed accordingly. For example, divide by zero error.
  • Random Testing: In this method, program is tested against random subset of input values. Sampling process can be used to choose test data.
  • Input Partitioning: In this method, the whole domain of input values is divided into classes from which test cases are derived later. The classes are such that they represent set of valid and invalid states for input conditions. The input is either a numeric value, range of values or boolean values. The program is tested with the input conditions, if any one test case detects an error, all other test cases in the same class would detect the same error.
  • Output Partitioning: This method is same as input partitioning but here the partitioning is done for output domain.

How test cases are designed for object oriented software?

Answer: Following guidelines are used for developing Quality assurance test cases for object oriented software:
1) Test cases should be easy to understand and steps should be executed fast.
2) They should be independent with each other.
3) They should have defined their expected result.
4) A good test case should describe which feature or service the test attempts to cover.
5) They should help to test the normal use of object methods.
6) They should help to test the boundary conditions.
7) They should help to test the object interactions and messages sent among them.
8) A good test case should have defined attributes such as Test Case ID, test data, test steps, modules to be tested, result/log etc.

What is integration testing? Explain the role of stub.

Answer: 1) An Integration testing is the phase in software testing in which individual software modules are combined and tested as a group. 2) Integration testing is conducted to evaluate the compliance of a system or component with specified functional requirements. It occurs after unit testing and before validation testing. 3) A stub and driver are a partial, temporary implementations of a component and hence called as dummy modules. Both a stub and driver may serve as aceholders for incomplete component or implement testing support code.

What is the difference between alpha testing and beta testing

Answer:
Difference Between Alpha Testing and Beta Testing
Alpha Testing Beta Testing
Alpha Testing is conducted by a team of highly skilled testers at development site. Beta Testing is always conducted in Real Time environment by customers or end users at their own site.
Alpha Testing involves both black box testing as well as white box testing. Beta Testing is always a black box testing or functional testing
A developer is present during testing. During this a developer is not present and does not control the environment.
The main purpose of alpha testing is to refine the software product by finding (and fixing) the bugs that were not discovered through previous tests. As beta testing allows developers and testers to evaluate the overall system experience from a user's point of view, main purpose of beta testing is to maintain the quality, usability, performance; bug detection.
Alpha Testing is done before the launch of software product into the market. Beta Testing is done at the time of software product marketing.

Explain top down testing and give its advantages.

Answer: 1) A Top Down testing is an integration testing technique which is used to simulate the behaviour of the lower level modules that are not yet integrated.
2) The test starts with top level modules and then integrates the modules of the next layer down. The major benefit of this testing is that a working model is obtained which can be used for demonstration to the clients and top management.
3) Stubs are partial, temporary implementations of a component and hence they are called as dummy modules. Test stubs are used to simulate the modules of lower layers. Stubs help in data manipulation, verification of entries, returning some values etc.
5) Advantages of top down testing:
  1. Crucial interfaces are tested early in the implementation. Hence if errors are present those are rectified in earlier stages.
  2. This testing tests the navigation through screens and verify that it matches the requirements of the user.

Explain stress and volume testing.

Answer: 1) Stress Testing is a type of testing in which extreme limits of the system are tested. It imposes abnormal import to test the capabilities of the software. It is also known as endurance testing. Input data rate, processing time, utilization of memory etc are tested beyond the designed capacity of the system.
2) Volume Testing is a type of testing in which the processing ability or speed and the response time of the system are measured for particular use cases. These test cases are usually dependent on increasing the load. Observed values are compared with the theoretical values.

What is integration testing and its types.

Answer: 1) An Integration testing is the phase in software testing in which individual software modules are combined and tested as a group. Integration testing is conducted to evaluate the compliance of a system or component with specified functional requirements. It occurs after unit testing and before validation testing. 2) There are two types of integration testing
  1. Top-Down Testing
  2. Bottom-Up Testing