ISTQB - Unit Testing Levels

In last article we have listed down the different levels of software testing and this unit testing is the first level. We can consider unit testing as a small part of an application or product and we need to perform testing activity on it. Function testing, Interface testing and Procedure testing can be done in this part. Unit testing will be done by the developer team to verify that code have been written as per expectation and it will meet with all the requirement & design of the product.

As we have discussed, Unit test cases have been written and executed by developer team only. They will prepare test cases and execute it and then they will pass the release to the testing team members. Main goal of the unit testing is, each and every part of the application or product should be verified once in perspective of code and design. Not a single part of the product will be remain without the testing. This will give surety that every part of the application or product will work as expected. 

Here test data will be passed to the respected fields as input data and output should be displayed as expected for each and every part of the application and product. That is the main procedure of unit testing. Individually each part should be worked and all the integration between all modules should be worked perfectly. 

It may possible that given input data is invalid but still application should display a failure message or validation message on screen which shows that application or product will not accepts invalid data and for that kind of data, expected result will not come on screen.

Unit testing came under white box testing technique. Unit testing is required to be done before integration testing so we can say that unit testing is the first step of software testing. Unit testing will have different kind of tasks like Unit test plan will be prepared by the developer team in which they need to include preparation steps and requirement specifications, Review of the procedures, Is rework required to upgrade application. Next is preparing test cases and need to review it and need to rework on it by updating test steps and expected results. Last step is need to define performance of the application or final product.

By doing the unit testing of the application we can maintain the code efficiency. When in every release, unit testing will be done then code quality will be increased and we can find more bugs in the very early stage of the development life cycle. Due to unit testing, code reuse can be possible & code will be maintain in each release. In unit testing mostly GUI testing will not be included as it is basically done for improve the code quality. The Cost of fixing defects are less in the unit testing but it would be increased if the defect will be caught at the time of regression testing and it will cost high.

Debugging of the code will be easier in unit testing phase and code will be more reliable. To apply unit testing into the code we can select the suitable tool or language or any framework which can save our time in testing procedures. We can also isolate the developer environment with testing environment. In unit testing, we should apply test data for inputs which are more similar to the production release. This will be give chance us to find more defect in the application.

We should write unit testing test cases independently, not a single test cases will be depend on each other like application’s front end test cases and database testing should be written differently. While doing unit testing, we should concentrate on the loop conditions for finding defects. And all the test scrips and code should be maintained with the version controlling system. To improve the performance of the code, unit testing should be applied frequently. Generally unit testing can be ignored by the developer team as they are giving more time for development but as per the observation, unit testing is the mandatory phase of the software testing which should not be ignored.

This is all about the unit testing procedure. We will further understand about the component testing ans integration testing which can be performed after unit testing.

No comments:

Post a Comment