DEV Community

Cover image for Software Testing
Ahmed Boutaraa
Ahmed Boutaraa

Posted on

Software Testing

testing range from testing small, individual pieces in isolation to an entire system. in this article I will briefly talk about the three phases of testing and why testing is an essential part of any successful company or product.

Unit testing (U/T) refers to tests run on specific pieces of software. U/T is usually a part of the job of implementing those pieces. In fact, unit tests are typically written by developers themselves. When the tests are written before developing the unit, this practice is known as test-driven development. Certifying that a unit has passed its unit tests is a precondition for the delivery of that unit to integration activities. Unit tests test the software in a standalone fashion, often relying on stubs (small part of a larger piece) to play the role of other units with which the tested unit interacts, as those other units may not yet be available. Unit tests won’t usually catch errors dealing with the interaction between elements that comes later but unit tests provide confidence that each of the system’s building blocks is exhibiting as much correctness as is possible on its own. A unit corresponds to an element in one of the modules or system. In object-oriented software, a unit might correspond to a class. In a layered system, a unit might correspond to a layer or a part of a layer. Most often a unit corresponds to an element at the leaf of a module decomposition tree.

Integration testing (I/T) is the process of testing individual units or components together as a whole. units/components are combined and tested as a group. for example, if we are building a new car from a bunch of components, how can we tell that this car is going to work as expected when all pieces are put together. well, this when doing our I/T and we make sure that these new pieces can work well together in an isolated environment.
another example is how long does an end-to-end synchronization of a local database with a global database take? What happens if faults are injected into the system? What happens when a process fails? All of these conditions can be tested at integration time. Integration testing is also the time to test what happens when the system runs for an extended period. You could monitor resource usage during the testing and look for resources that are consumed but not freed. Does your pool of free database connections decrease over time? Then maybe database connections should be managed more aggressively. Does the thread pool show signs of degradation.

Acceptance testing (A/T) A/T is a kind of system testing that is performed by users,
often in the setting in which the system will run. in our car example, this will be testing the car on the road and making sure it won't crash or fail as a whole.
Two special cases of A/T are alpha and beta testing. In both of these, users are given free rein to use the system however they like, as opposed to testing that occurs under a preplanned regimen of a specific suite of tests. Alpha testing usually occurs in-house, whereas beta testing makes the system available to a select set of end-users under a “User beware”. A/T involves stressing the system’s quality attribute behavior by running it at extremely heavy loads, subjecting it to security attacks, depriving it of resources at critical times, and so forth.

Summary

so as you can see testing will turn out to be a very crucial step for making sure your product is ready, safe, and defect-free before the delivery to the client, which guarantees the quality of the software or product. It makes the product more reliable and easy to use and it brings people to trust in you and your company.

Top comments (0)