Levels of Testing

  • Home
  • Levels of Testing
Shape Image One

There are mainly four Levels of Testing in Software Testing:

1. Unit Testing: checks if software components are fulfilling functionalities or not.
2. Integration Testing: checks the data flow from one module to other modules.
3. System Testing: evaluates both functional and non-functional needs for the testing.
4. Acceptance Testing: checks the requirements of a specification or contract are met as per its delivery.

Each of these testing levels has a specific purpose. These testing level provide value to the software development lifecycle.

Unit Testing: A Unit is a smallest testable portion of system or application which can be compiled, liked, loaded, and executed. This kind of testing helps to test each module separately.

The aim is to test each part of the software by separating it. It checks that component are fulfilling functionalities or not. This kind of testing is performed by developers.

Objectives of  Unit Testing

  • Unit Test cases should be independent. In case of any enhancements or change in requirements, unit test cases should not be affected.
  • Test only one code at a time.
  • Follow clear and consistent naming conventions for your unit tests.
  • In case of a change in code in any module, ensure there is a corresponding unit Test Case for the module, and the module passes the tests before changing the implementation.
  • Bugs identified during unit testing must be fixed before proceeding to the next phase in SDLC.
  • Adopt a “test as your code” approach. The more code you write without testing, the more paths you have to check for errors.

Unit Testing is of two types:-

Manual: Unit testing is commonly automated but may still be performed manually. Software Engineering does not favor one over the other but automation is preferred. A manual approach to unit testing may employ a step- by-step instructional document.

The workflow of Unit Testing

  • Create Test Cases
  • Review/Rework
  • Baseline
  • Execute Test Cases

Automated: A developer writes a section of code in the application just to test the function. They would later comment out and finally remove the test code when the application is deployed. A developer could also isolate the function to test it more rigorously. This is a more thorough unit testing practice that involves copy and paste of code to its own testing environment than its natural environment. Isolating the code helps in revealing unnecessary dependencies between the code being tested and other units or data spaces in the product. These dependencies can then be eliminated. A coder generally uses a Unit Test Framework to develop automated test cases. Using an automation framework, the developer codes criteria into the test to verify the correctness of the code. During execution of the test cases, the framework logs failing test cases. Many frameworks will also automatically flag and report, in summary, these failed test cases.

Automation Testing Tools

1. Junit: Junit is a free to use testing tool used for Java programming language. It provides assertions to identify test method. This tool test data first and then inserted in the piece of code.
2. PHPUnit: PHPUnit is a unit testing tool for PHP programmer. It takes small portions of code which is called units and test each of them separately.  The tool also allows developers to use pre-define assertion methods to assert that a system behave in a certain manner.

Integration Testing: Integration means combining. For Example, In this testing phase, different software modules are combined and tested as a group to make sure that integrated system is ready for system testing.

Integrating testing checks the data flow from one module to other modules. This kind of testing is performed by testers.

Types of Integration Testing

Big Bang Testing is an Integration testing approach in which all the components or modules are integrated together at once and then tested as a unit. This combined set of components is considered as an entity while testing. If all of the components in the unit are not completed, the integration process will not execute.


  • Convenient for small systems.


  • Fault Localization is difficult.
  • Given the sheer number of interfaces that need to be tested in this approach, some interfaces link to be tested could be missed easily.
  • Since the Integration testing can commence only after “all”the modules are designed, the testing team will have less time for execution in the testing phase.
  • Since all modules are tested at once, high-risk critical modules are not isolated and tested on priority. Peripheral modules which deal with user interfaces are also not isolated and tested on priority.

Incremental Testing

In the Incremental Testing approach, testing is done by integrating two or more modules that are logically related to each other and then tested for proper functioning of the application. Then the other related modules are integrated incrementally and the process continues until all the logically related modules are integrated and tested successfully.

Incremental Approach, in turn, is carried out by two different Methods:

  • Bottom Up
  • Top Down

Stubs and Drivers

Stubs and Drivers are the dummy programs in Integration testing used to facilitate the software testing activity. These programs act as a substitutes for the missing models in the testing. They do not implement the entire programming logic of the software module but they simulate data communication with the calling module while testing.

Stub: Is called by the Module under Test.

Driver: Calls the Module to be tested.

Bottom-up Integration Testing is a strategy in which the lower level modules are tested first. These tested modules are then further used to facilitate the testing of higher level modules. The process continues until all modules at top level are tested. Once the lower level modules are tested and integrated, then the next level of modules are formed.


  • Fault localization is easier.
  • No time  is wasted waiting for all modules to be developed unlike Big-bang approach.


  • Critical modules (at the top level of software architecture) which control the flow of application are tested last and may be prone to defects.
  • An early prototype is not possible.

Top Down Integration Testing is a method in which integration testing takes place from top to bottom following the control flow of software system. The higher level modules are tested first and then lower level modules are tested and integrated in order to check the software functionality. Stubs are used for testing if some modules are not ready.


  • Fault Localization is easier.
  • Possibility to obtain an early prototype.
  • Critical Modules are tested on priority; major design flaws could be found and fixed first.


  • Needs many Stubs.
  • Modules at a lower level are tested inadequately.

Sandwich Testing is a strategy in which top level modules are tested with lower level modules at the same time lower modules are integrated with top modules and tested as a system. It is a combination of Top-down and Bottom-up approaches therefore it is called Hybrid Integration Testing. It makes use of both stubs as well as drivers.

3) System Testing:
System testing is performed on a complete, integrated system. It allows checking system’s compliance as per the requirements. It tests the overall interaction of components. It involves load, performance, reliability and security testing.

System testing most often the final test to verify that the system meets the specification. It evaluates both functional and non-functional need for the testing.

Functional Testing:
Functional testing is a type of testing which verifies that each function of the software application operates in conformance with the requirement specification. This testing mainly involves black box testing, and it is not concerned about the source code of the application. Every functionality of the system is tested by providing appropriate input, verifying the output and comparing the actual results with the expected results. This testing involves checking of User Interface, APIs, Database, security, client/ server applications and functionality of the Application Under Test. The testing can be done either manually or using automation.

Non-Functional Testing:

Non-functional testing is a type of testing to check non-functional aspects (performance, usability, reliability, etc.) of a software
application. It is explicitly designed to test the readiness of a system as per non-functional parameters which are never addressed by functional testing.

A good example of non-functional test would be to check how many people can simultaneously login into a software.

Non-functional testing is equally important as functional testing and affects client satisfaction.

Functional Vs. Non-Functional Testing


4) Acceptance Testing:

Acceptance testing is a test conducted to find if the requirements of a specification or contract are met as per its delivery. Acceptance testing is basically done by the user or customer. However, other stockholders can be involved in this process.

Purpose of UAT

The main Purpose of UAT is to validate end to end business flow. It does not focus on cosmetic errors, spelling mistakes or system testing. User Acceptance Testing is carried out in a separate testing environment with production-like data setup. It is kind of black box testing where two or more end-users will be involved.

Who Performs UAT?

  • Client.
  • End users.

Need of User Acceptance Testing: arises once software has undergone Unit, Integration and System testing because developers might have built software based on requirements document by their own understanding and further required changes during development may not be effectively communicated to them, so for testing whether the final product is accepted by client/end-user, user acceptance testing is needed.

  • Developers code software based on requirements document which is their “own” understanding of the requirements and may not actually be what the client needs from the software.
  • Requirements changes during the course of the project may not be communicated effectively to the developers.

Acceptance Testing and V-Model

In VModel, User acceptance testing corresponds to the requirement phase of the Software Development life cycle(SDLC).

Following are the entry criteria for User Acceptance Testing:

  • Business Requirements must be available.
  • Application Code should be fully developed.
  • Unit Testing, Integration Testing & System Testing should be completed.
  • No Showstoppers, High, Medium defects in System Integration Test.
    Phase –
  •  Only Cosmetic error is acceptable before UAT.
  • Regression Testing should be completed with no major defects.
  • All the reported defects should be fixed and tested before UAT.
  • Traceability matrix for all testing should be completed.
  • UAT Environment must be ready.
  • Sign off mail or communication from System Testing Team that the system is ready for UAT execution

How to do UAT Testing

UAT is done by the intended users of the system or software. This type of Software Testing usually happens at the client location which is known as Beta Testing. Once Entry criteria for UAT are satisfied, following are the tasks need to be performed by the testers:

  • Analysis of Business Requirements.
  • Creation of UAT test plan.
  • Identify Test Scenarios.
  • Create UAT Test Cases.
  • Preparation of Test Data(Production like Data).
  • Run the Test cases.
  • Record the Results.
  • Confirm business objectives.

Leave a Reply

Your email address will not be published.