Software Testing ⚙ in a nutshell

Software Testing ⚙ in a nutshell

Photo by Tudor Baciu on Unsplash

Testing can simply mean putting something under strain, and challenge to reveal its capabilities or behaviours. This can be through a simulated or an actual environment. This applies everywhere including in the software industry which is referred to as software testing.

This article aims to explain what software testing is at a basic level. covers the importance of testing and some of the important testing strategies that every developer should know.

Software Testing refers to the set of activities that are carried out to examine the correctness, accuracy and completeness of software, before pushing it to the production environment.

Why Software Testing?

Software testing is important since it helps in the discovery of bugs which can cause social or economical damage to the end-users. For example, would you take the risk of boarding a plane or a ship that has not to been tested? I guess your answer is no, the same case applies to software.

When software is not tested it can cause economic or social damage to the end-users for example:

One of the biggest American market makers for stocks struggled to stay afloat after a software bug triggered a $440 million loss in just 30 minutes. The firm’s shares lost 75 per cent in two days after the faulty software flooded the market with unintended trades.

Types Of Software Testing

Though there are more than 100 software testing techniques, only a few are selected during SDLC depending on the type of development model and the application under development.

In this section, we intend to uncover some of the most widely used testing techniques that at least every developer should know.

Unit Testing

Usually, the software is broken down into units/modules/components that serve a specific functionality in the software. for example in an eCommerce application, we can have an authentication module that handles all authentication operations in the application.

This module integrates with other modules to provide a fully functional application. But before integration, it would be necessary to test this module to ensure that it's bug-free, functional and meets all the requirements and integrating it with other components will not result in the failure of the software.

This is the stage where unit testing takes part, the components are tested independently and if there are dependencies required for the module to work, these dependencies are replaced with stubs/mocks. for example, replacing a database integration with an interface that is not an actual database but mocks the database behaviour.

Note: for a test to be referred to as a unit test the tested component should not interact with any dependencies ie. database, network, files etc.

Integration Testing

After the software modules are tested to satisfaction, the modules are integrated and tested using the integration testing technique. The goal of integration testing is to detect any irregularity between the units that are integrated together.

From our earlier example assuming the authentication module and the rest of the modules have been tested to satisfaction. It's time to integrate these components together.

This test can take two-approach:

  1. Big-bang, where all the modules are required to run integration tests.
  2. Incremental, where tests can be run on existing modules and stubs/mocks can be used to provide the functionality of non-existing modules.

System Testing

Once all the units/modules/components that make up the application are integrated and tested, System testing also referred to as end-end testing is carried out. System testing detects defects within both the integrated units and the whole system.

In this type of test, the application is treated as a black box. The goal is to ensure the application meets the expected system behaviour without having to worry about how it works internally.

Acceptance Testing

At this stage, the software is tested for compliance with specified requirements. This ensures users' satisfaction is met before deployment.

This test involves:

  1. Alpha testing, the system is tested in the development testing environment these testers are referred to as alpha testers.
  2. Beta testing, the system is tested by end-users, and feedback is collected for improving the system's user experience or fixing defects. These users are referred to as better testers.
  3. User Acceptance testing, this test determines whether the software meets the user's expectations.
  4. Business acceptance testing, this test determines whether the software meets the business goals.
  5. Contract Acceptance Testing, this is a contract that once the product goes live, within a predetermined period, the acceptance test must be performed and it should pass all the acceptance use cases.
  6. Regulations Acceptance Testing, is used to determine whether the product violates the rules and regulations that are defined by the government of the country where it is being released.
  7. Operational Acceptance Testing, is used to determine the operational readiness of the product and is non-functional testing.

The End!

Thanks for reading this article to this end. Hope the article was helpful and informative.

Did you find this article valuable?

Support Evans Opilo by becoming a sponsor. Any amount is appreciated!