Monday, July 9, 2012
List out the technical details of mock object?
Posted by
Sunflower
at
7/09/2012 04:07:00 PM
0
comments
Labels: Application, Behavior, Conditions, Data, Details, Developers, Fake, Functionality, Information, Methods, Mock objects, Objects, Requirements, Simulate, Software testing, Stubs, Systems, Technical
|
| Subscribe by Email |
|
Saturday, April 23, 2011
How are programs tested? Explaining Unit Testing and Integration Testing
In testing programs, individual units are tested and this comes under unit testing. Then, their relationship with one another is tested which comes under integration testing.
UNIT TESTING
- It tests the smaller building blocks of a program.
- It confirms that each module performs its assigned task.
- It involves testing the interface, local data structures, boundary conditions, independent paths and error handling paths.
- Two things are used for unit testing : Driver and Stub.
- Driver is a program that accepts test case data, passes data to the component to be tested, and prints relevant results.
- Stub is program that performs support activities such as data manipulation, queries of states of the component being tested and prints verification of entry.
INTEGRATION TESTING
- Integration testing is followed after unit testing.
- All classes are tested for integration.
- Each component performs correctly within collaboration and that each interface is correct.
- Integration testing can be done by thread based testing approach. A thread is a path of communication among classes that needs to process a single input or respond to an event.
- Regression testing is re-execution of some subset of tests to ensure that changes have not produced unintended side effects.
Posted by
Sunflower
at
4/23/2011 07:06:00 PM
0
comments
Labels: Classes, Drivers, Integration, Integration testing, Interface, Module, program, Regression Testing, Software testing, Stubs, Subset, Tests, Unit, Unit Testing
|
| Subscribe by Email |
|
Saturday, October 16, 2010
Validation phase - Integration Testing - Top Down Integration and Bottom Up Integration
Integration testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated with interfacing. The objective is to take unit tested components and build a program structure that has been dictated by design. There are two methods of integration testing:
- Top-down integration approach
- Bottom-up integration approach
Top-down Integration Approach
It is an incremental approach to construction of program structure. Modules are integrated by moving downward through the control hierarchy beginning with the main control module. Modules subordinate to the main control module are incorporated into the structure in either a depth-first or breadth-first manner.
- The main control module is used as a test driver and stubs are substituted for all components directly subordinate to the main control module.
- Depending upon integration approach, selected subordinate stubs are replaced one at a time with actual components.
- Tests are conducted as each component is integrated.
- On completion of each set of tests, stub is replaced with real component.
- Regression testing may be conducted to ensure that new errors have not been introduced.
Bottom-Up Integration Approach
It begins construction and testing with atomic modules. Because components are integrated from bottom up, processing required for components subordinate to a given level is always available and the need for stubs is eliminated.
- Low level components are combined into clusters that perform a specific software sub function.
- A driver is written to coordinate test case input and output.
- The cluster is tested.
- Drivers are removed and clusters are combined moving upward in the program structure.
Posted by
Sunflower
at
10/16/2010 12:23:00 PM
0
comments
Labels: Approaches, Bottom Up, Components, Drivers, Function, Integration, Integration Testing, Levels, Phases, Software testing, Structure, Stubs, Techniques, Test cases, Top Down, Validation phase
|
| Subscribe by Email |
|
Wednesday, October 13, 2010
Validation phase - Unit Testing - Stubs and Drivers
The validation phase falls into picture after the software is ready or when the code is being written. There are various techniques and testing types that can be appropriately used while performing the testing activities.
Unit Testing
A unit is allocated to a programmer for programming. Functional Specifications document is used as an input for programmer's work. The programmer prepares program specifications for his unit from the functional specifications. Program specifications describe the programming approach, coding tips for the unit's coding.
Using these program specifications as input, the programmer prepares unit test cases document for that particular unit. A unit test cases checklist may be used to check the completeness of unit test cases document. Program Specifications and unit test cases are reviewed and approved by quality assurance analyst or by peer programmer. The programmer implements some functionality for the system to be developed. The same is tested by referring the unit test cases. While testing that functionality if any defects have been found, they are recorded using the defect logging tool whichever is applicable. The programmer fixes the bugs found and tests the same for any errors.
Stubs and Drivers
A software application is made up of a number of units where output of one unit goes as an input of another unit. Due to such interfaces, independent testing of a unit becomes impossible. So here, we use stub and driver.
A driver is a piece of software that drives the unit being tested. A driver creates necessary inputs required for the unit and then invokes the unit.
A unit may reference another unit in its logic. A stub takes place of such subordinate unit during the unit testing. A stub is a piece of software that works similar to a unit which is referenced by the unit being tested but it is much simpler than the actual unit. A stub works as a stand-in for the subordinate unit and provides the minimum required behavior for that unit.
Programmers needs to create such drivers and stubs for carrying out unit testing. Both the driver and stub are kept at a minimum level of complexity, so that they do not induce any errors while testing the unit in question.
Posted by
Sunflower
at
10/13/2010 01:04:00 PM
0
comments
Labels: Application, Drivers, Input, Output, Phase, Phases, Programming, Quality, Software, Software testing, Stubs, Unit, Unit Testing, Validation
|
| Subscribe by Email |
|