CSC/ECE 517 Fall 2009/wiki1b 4 xy

From Expertiza_Wiki
Jump to navigation Jump to search

Functional and integration testing and beyond

Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability.

The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.

Terms

  1. Driver: Supporting code or data used for testing the whole or part of the software system
  2. Sub-system: Component or Module of a software system
  3. System Under Test: The software system which has to be tested
  4. Stub: Dummy procedure or module that can be used to simulate or substitute an actual portion of a system
  5. Test: Sequence of steps to validate the system design and implementation
  6. Usecase :Scenario that describing an interaction between a user and a system

Integration testing

Integration is a systematic approach to build the complete software structure specified in the design from unit-tested modules.Integration testing is the next phase of unit testing. Generally in software development complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems. So the main focus of integration tests is not the functionality of individual modules but the interaction between these modules like interaction with operating system, interaction between client and server

There are many approaches that can be followed for Integration Testing

  • Big-Bang: As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components.
    • Advantages:


      • Since all the modules are combined and all are tested at the same time, this approach of integration is less time consuming


    • Disadvantages:


      1. Debugging and solving a fault is not that trivial. Because in this type of testing many modules are integrated one cannot be sure whether the bug found was present in any sub-system or interaction between different sub-systems.


      1. Testing process cannot be started until all the sub-systems have finished their development.


      1. Writing test cases are also non-trivial.
  • Incremental Testing: As the name suggests testing is done after integration of one sub-system at a time. This solves the disadvantages of the Big-Bang.
    • Disadvantages:
      1. This approach is a time taking process. For a large system

Functional testing

Functional testing is designed to ensure the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application compiles with the organizational policies and procedures.



Regression testing is another form of functional testing where you test the earlier features and functionality of the module which were working on the desired lines but have to be tested currently after some changes have been in the system. The changes might not be in the particular module but it can be affected due to inter dependencies. During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.

As an example, suppose we are to develop the software for an elevator. For designing the test cases for this software, all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and odd floors separately).The elevator should stop at the desired floor.