What Is Software Testing
Stock market crashes causing billions of losses.
Millions of cars by popular automakers get recalled.
Airplanes and fighter planes crash leading to tragic loss of life.
Medical equipment fail leading to serious consequences for patients.
Defects in banking software lead to incalculable losses.
We often hear such news occurring with alarming frequency around the world. But why do they happen? What can we do to prevent such tragedies?
There is a single common answer to all these issues: software testing!
Yes! And that is because all these tragedies could have been avoided by a process of rigorous software testing.
Simply put, software testing is the investigation of the properties of a software system to determine its feasibility for a given task or purpose. Software testing checks to ascertain whether the software functions the way it is expected to function, under a wide variety of different circumstances.
As the purpose of different software systems is wide and varied, so also the types of testing vary accordingly. In fact, there are more than 150 types of software testing, and more are being added regularly, to keep pace with the advances being made in leaps and bounds in the domain of software technology. Naturally, not all tests apply to all software products or services. Each test is carefully crafted according to the exact requirements of the application being tested.
Generally speaking, software testing aims to identify errors and deficiencies in software systems with respect to the expected requirements. All of the disasters that we mentioned occurred because the tests that were conducted on them failed to spot the defects or ‘bugs’ in them. Thus, one of the characteristics of good software testing is its ability to identify defects.
The achievement of 100% accuracy or zero-defects is the holy grail of software testing. However, this is easier said than done. One of the primary weapons in the software testers arsenal is the development of test cases. Test cases are written with the aim of maximizing test coverage—in other words, conducting tests under as many different situations as possible.
Considering the serious consequences of software defects, the efforts spent in maximizing test coverage are well worth the effort. Other important reasons for extensive software testing are:
Certain applications such as banking, defense, and other critical applications need to meet a higher degree of security requirements than most other software.
All applications aim to improve quality to ensure superior functionality.
Testing can also improve cost-effectiveness by optimizing the performance of applications.
Another major consideration in software testing is to exceed customers’ expectations by delivering superior features.
Definition of Software Testing
According to the ANSI/IEEE 1059 standard, software testing is defined as the systematic analysis of any software to detect differences between existing and required conditions and to evaluate its features.
There are different broad categories of software testing based on the approach and methodology, among others:
- For instance, software testing can be conducted manually or by using test automation. With the immense complexity of software code, manual testing is fast being replaced by automated testing. Automated testing uses tools, with the most popular one being Selenium, to execute test scripts and generate test results. On the other hand, manual testing relies on human intervention to find out what is or is not working. It involves testers trying out the software from the point of view of the end-user using manual test plans. Even manual testing does rely on tools such as Testpad to create test plans and can be used when automation is not possible.
- Another popular differentiation is between Black Box and White Box testing. In the former case, testers do not learn or examine the internal functioning of the software. Testing is done purely on the basis of functionality with little or no knowledge of the implementation. Regression and functional testing are the most common Black Box testing types. White Box testing, on the other hand, is generally conducted by developers who have a thorough understanding of the internal structure/code and implementation of the application or product. It is more suitable for testing algorithms and includes path/loop/conditional testing.
Software Testing Life Cycle (STLC)
The Software Testing Life Cycle (STLC) is a subset of the Software Development Life Cycle (SDLC). However, it is one of the most critical phases in software development, for reasons we have already seen.
While software testing varies widely, there are several common steps that form a part of the STLC, irrespective of the testing goals.
During the requirements phase, testing teams study and define the scope of testing, communicate the need for mitigation strategies where tests are not feasible, and prepare test plans.
Test plans include identification of key metrics, as well as methodologies for measurement and tracking them. It involves the creation of test strategies and risk management and mitigation. The Analysis phase identifies test conditions depending on the degree of testing, complexity, risks, and exit criteria. The more detailed the test conditions, the better the test coverage and test results that can be obtained. The Design phase splits the test conditions into further detail, sets up testing environments, and creates traceability and coverage metrics.
Based on Analysis and Design, detailed test cases are created and reviewed for accuracy and coverage. They are prioritized and segregated into automated/manual tests and test scripts are created.
In the actual execution, the tests are conducted, defects are logged, and traceability metrics are monitored.
In the Conclusion phase, exit criteria are checked and reports are generated. In the Closure phase, all tests are checked for completion, and reviews are conducted to record key learnings and opportunities for improvement.
While software development goes through its stages, so does the STLC. This generates a series of Test Artifacts, which are deliverables that are created before, during, and after the testing phases.
Common Test Artifacts generated during the STLC.
Software Testing is one of the most critical phases of the software development process. There are hundreds of types of testing, designed according to the specific applications being tested. The sign of good software testing is the extent of test coverage and the ability to detect errors and deficiencies. With the plethora of applications being developed and used globally, software testing is vital to ensure human safety, achieve high quality and cost-efficiency, and deliver customer satisfaction.