Information Technology Software Testing

Software testing : Approaches and levels

Today I am going to talk about approaches and levels of software testing

Testing aims to examine multiple facets of quality.There are two main approaches to test the software ie. Black box and White box testing

1.Black box testing

Software product is evaluated in the context of business or user requirements using black box testing .

Requirement refers to feature of software with help of which user of system completes certain task. For Ex : Booking a movie ticket

In black box testing, software tester does not have a knowledge of code written(box to be tested is black for tester). He /she tests application based only on functionality expected

For example : Requirement to test is that in movie ticket booking application, user should be able to search movie by name in movie list. Suppose user is on home page where there is search box for movie name and search button ,this scenario can be tested by just entering movie name and clicking search button and verifying movie names displayed as required.

2.White box testing

In white box testing , software tester understands the code written inside program (white box)and tests program with respect to code to target defects inside.

For example : In movie ticket booking application, a code to display movie list should display 10 movies on each page for every category of movie. Count of movies to be displayed can be reviewed by examining code of respective program.

Black box testing is more prevalent in software testing.

Till now , we have seen approaches for software testing. Now let’s see what are levels of testing.

1.Unit testing

In unit testing, individual units of software code are tested to verify it’s functionality. Unit test scripts are generally developed by developers using unit testing frameworks like NUnit, JUnit etc. A simple unit test case calls or simulates unit under test , sends required inputs and asserts actual output against expected output. Unit testing framework has features like reporting, which helps in automating unit test cases effectively.With optimal unit testing , we can achieve optimum code coverage which prevents functional defects.

For example :

Unit test for search movie name

In movie ticket booking application, a class ” Search “is written for Search feature. This class which has some properties and methods. One of the method to search movies is SearchMovieByName

public String SearchMovieByName (String name)

This method is called by another dummy method for ex: CallerMethod which verifies return data

public void CallerMethod() {

Search obj= new Search();

String result = obj. SearchMovieByName (“ClassicMovie”);

String st=” ClassicMovie “;


Console.WriteLine(“Matching movie found”);


Console.WriteLine(“Matching movie not found”);


Search class can be unit tested for various input values for search box and expected movies details to be displayed depending on requirement.

2.Integration testing

Integration testing tests subsystem or system formed when two or more units of software product are coupled. Units so far developed and tested independently , may fail to function as expected when coupled together.

For example : When user makes payment for a selected movie show, program for ticket information is integrated with payment gateway processing program for which, we can test integration

3.System testing

System testing refers to testing application as a whole system. It examines functional requirements and it also verifies non functional aspects of system(For example : Performance, Stress, Accessibility etc). It is generally conducted by independent software testing team.

For example : In movie ticket booking application, end to end testing scenario of ticket selection to payment and ticket confirmation can be considered as system test scenario

4.User acceptance testing

In User acceptance testing (UAT) , the software is tested in the “real world” by the intended audience. UAT is final last phase of the software testing process, before the software is released to real word. In UAT, group of business or end users review system to verify functionality and find issues if any.In case if software follows any contract or regulation guidelines, relevant test scenarios are included in UAT.

Alpha testing and beta testing are also types of UATs. Alpha testing of ready to use software is conducted by in house testers or developers , before it is released to business users. Beta testing takes place at customers’ sites, where a group of customers or end users use the system and report observations and issues , before the system is released to live environment.

In next post we will have at look types of software testing . Keep reading. Keep testing.