Software Testing


Wikipedia says: “Software testing is an investigation conducted to provide stakeholders with information about the quality of the software product or service under test.” It is a process of executing a program or part of a program for the purpose of finding bugs or defects.

The expected properties of interest are as follows (as per Wikipedia):

  1. meets the requirements that guided its design and development,
  2. responds correctly to all kinds of inputs,
  3. performs its functions within an acceptable time,
  4. is sufficiently usable,
  5. can be installed and run in its intended environments, and
  6. achieves the general result its stakeholders desire.

The overall approach to software development often determines when and how testing is conducted. For example, in a phased process, most testing occurs after system requirements have been defined and then implemented in testable programs. In contrast, under an Agile approach, requirements, programming, and testing are often done concurrently.

Two Types

Testing can be static or dynamic. Wikipedia says: “Reviews, walkthroughs, or inspections are referred to as static testing, whereas actually executing programmed code with a given set of test cases is referred to as dynamic testing.” Static testing includes using programming tools that check for syntax errors as well as proofreading. Dynamic testing will probably begin before the program is 100% complete in order to test particular sections of code.

Levels of Software Testing

They are: unit, integration, system and acceptance. Regression Testing is not a separate level of testing; it is just a type of testing that can be performed during any of the four main software testing stages.

Unit Testing

Segue Technologies on their website say: “During this first round of testing, the program is submitted to assessments that focus on specific units or components of the software to determine whether each one is fully functional. The main aim of this endeavor is to determine whether the application functions as designed. In this phase, a unit can refer to a function, individual program or even a procedure, and a White-box Testing method is usually used to get the job done. One of the biggest benefits of this testing phase is that it can be run every time a piece of code is changed, allowing issues to be resolved as quickly as possible. It’s quite common for software developers to perform unit tests before delivering software to testers for formal testing.”

Integration Testing

Seque says: “Integration testing allows individuals the opportunity to combine all of the units within a program and test them as a group. This testing level is designed to find interface defects between the modules/functions. This is particularly beneficial because it determines how efficiently the units are running together. Keep in mind that no matter how efficiently each unit is running, if they aren’t properly integrated, it will affect the functionality of the software program. In order to run these types of tests, individuals can make use of various testing methods, but the specific method that will be used to get the job done will depend greatly on the way in which the units are defined.”

System Testing

This type may also be classified as Component Interface Testing followed by System Testing, thereby creating two stages instead of one. Segue says of System Testing: “System testing is the first level in which the complete application is tested as a whole. The goal at this level is to evaluate whether the system has complied with all of the outlined requirements and to see that it meets Quality Standards. System testing is undertaken by independent testers who haven’t played a role in developing the program. This testing is performed in an environment that closely mirrors production. System Testing is very important because it verifies that the application meets the technical, functional, and business requirements that were set by the customer.”

Acceptance Testing

This may also be called Operational Acceptance Testing. Segue says: “The final level, Acceptance testing (or User Acceptance Testing), is conducted to determine whether the system is ready for release. During the Software development life cycle, requirements changes can sometimes be misinterpreted in a fashion that does not meet the intended needs of the users. During this final phase, the user will test the system to find out whether the application meets their business’ needs. Once this process has been completed and the software has passed, the program will then be delivered to production.”

Methods of Software Testing

Segue Technologies on their website says: “Software testing is the exercise of verifying that the code being deployed will meet the users’ functional requirements. Software development can be a challenging endeavor, and involves taking requests from the customer and turning those requirements into actionable code. To ensure that this translation has been successful, software companies enlist several different software testing methods”.

Smoke Testing

Segue says: “Smoke testing is the practice of performing basic functionality and workflow actions against the deployed code. This verifies that additional testing can be conducted, and that the code build is working as intended at a basic level. Smoke testing is typically performed by an internal team, several times over the course of a software development project. For example, when a new version of a software application is released, testers will smoke test the new version to ensure basic functionality (e.g. a login page) works as intended.”

Alpha and Beta Testing

Segue says: “Alpha or Beta testing is performed by a small external group of users against a deployed software application. These testers perform actions to verify the functionality, look and feel, and workflow of the application before its wide release. It’s common now for software slated for a wide commercial audience (e.g. Microsoft Operating Systems) to have a set of alpha testers perform initial testing. Feedback from that group of alpha testers is used to correct bugs and improve functionality. A subsequent version of the software is then released to a wider, but still limited, audience. This round of testing is considered “beta testing”, which should allow for any remaining bugs and errors to be identified before final release.” Beta testing comes after alpha testing and can be considered a form of external user acceptance testing.

Regression Testing

Segue says: “Over the course of a software development project, several releases (or builds) of the application are deployed. These releases can cover new functionality to the application, or correct existing bugs. Regression testing is the practice of ensuring each build not only successfully meets the application’s functional requirements, but that it did not break functionality which was deployed in previous releases. Here is an example: Build “A” is released and tested, then build “B” is released but during testing functionality from build “A” didn’t work. Regression testing verifies functionality of build “B” and build “A”.”

The V-Model

The V-model is an Software Development Lifecycle (SDLC) model where execution of processes happens in a sequential manner in a V-shape. It is also known as Verification and Validation model. The V-Model is an extension of the waterfall model and is based on the association of a testing phase for each corresponding development stage. This means that for every single phase in the development cycle, there is a directly associated testing phase. This is a highly-disciplined model and the next phase starts only after completion of the previous phase.

What is the SDLC model? Wikipedia says: “The software development life cycle (SDLC) is a framework defining tasks performed at each step in the software development process. SDLC is a structure followed by a development team within the software organization. It consists of a detailed plan describing how to develop, maintain and replace specific software.”

The software waterfall model is, according to Wikipedia: “a sequential (non-iterative) design process, used in software development processes, in which progress is seen as flowing steadily downwards (like a waterfall) through the phases of conception, initiation, analysis, design, construction, testing, production/implementation and maintenance.”

Principles of Software Testing

The website Guru99 has seven principals of software testing in an article called 7 Software Testing Principles: Learn with a Case Study.

Exhaustive testing is not possible

We need the optimal amount of testing based on the risk assessment of the application.

Defect Clustering

A small number of modules contain most of the defects detected.

Pesticide Paradox

Repetitive use of the same pesticide mix to eradicate insects during farming will over time lead to the insects developing resistance to the pesticide. The same applies to software testing. The test cases need to be regularly reviewed & revised , adding new & different test cases to help find more defects.

Testing shows presence of defects

Testing does not talk about the absence of defects. Even if no defects are found, it is not a proof of correctness

Absence of Error

It is possible that software which is 99% bug-free is still unusable. Finding and fixing defects does not help if the system build is unusable and does not fulfill the user’s needs & requirements.

Early Testing

Testing should start as early as possible in the Software Development Life Cycle.

Testing is context dependent

The way you test an e-commerce site will be different from the way you test a commercial off the shelf application.