/ Testing

Software Testing

What is Software Testing?

Software testing is a process that when applied helps identify the correctness and the quality of the software. It evaluates a system or parts of a system to find any errors, lack of functionalities, or missing requirements.

It is defined in Wikipedia as the following.

Software testing is an investigation conducted to provide stakeholders with information about the quality of the software product or service under test. Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include the process of executing a program or application with the intent of finding software bugs (errors or other defects), and verifying that the software product is fit for use.

Without testing, the system is error-prone, and there is no guarantee of it working as expected.

Verification and Validation

Verification and validation are two terms that are associated with software testing. They are confusing and used interchangeably, so the following are the definitions of these two.

  • Verification is the process to make sure the product satisfies the conditions imposed at the start of the development phase. Think of it as answering the question "are we building it right?". In other words, to make sure the product behaves the way we want it to. It ensures that the software system meets all the functionality. It takes place first and includes the checking for documentation, code, etc. Verification is done by the development team.

  • Validation is the process to make sure the product satisfies the specified requirements at the end of the development phase. Think of it as answering the question "are we building the right thing?". In other words, to make sure the product is built as per customer requirements. It ensures that the functionalities meet the intended behavior. It occurs after verification and mainly involves the checking of the overall product. Validation is done by the QA testers.

Testing Types

Testing shows the presence, not the absence of bugs. - Edsger W. Dijkstra

There are different types of testing, but all fall into two categories or techniques. All have the same purpose, which is to check whether the software satisfies the specific requirements, needs, and expectations. These two classes or categories are known as black-box testing and white-box testing.

Black-box Testing

Black-box testing (also known as functional testing) treats software under test as a black-box without knowing its internals. Tests are using software interfaces and trying to ensure that they work as expected. As long as the functionality of interfaces remains unchanged, tests should pass even if the internals are changed.

It ignores the internal mechanism of the system and focuses on the output generated against any input and execution of the system. Usually done by software tester.

Pros:

  • Efficient for large segments of code
  • Code access is not required
  • Separation between user’s and developer’s perspectives

Cons:

  • Limited coverage since only a fraction of test scenarios is performed
  • Inefficient testing due to tester’s lack of knowledge about software internals
  • Blind coverage since tester has limited experience with the application

White-box Testing

White-box testing (also known as clear box testing, glass box testing, transparent box testing, and structural testing) looks inside the software that is being tested and uses that knowledge as part of the testing process. White-box testing requires internal knowledge of the system and programming skills. It provides internal perspective of the software under test.

It takes into account the internal mechanism of a system. Usually done by the developer.

Pros:

  • Efficient in finding errors and problems
  • Required knowledge of internals of the software under test is beneficial for thorough testing
  • Allows finding hidden errors
  • Programmers introspection
  • Helps to optimize the code
  • Due to required internal knowledge of the software, maximum coverage is obtained

Cons:

  • Might not find unimplemented or missing features
  • Requires high-level knowledge of internals of the software under test
  • Requires code access

Types of Testing

Now that we know the general categories of software testing let's briefly discuss the types of testing.

  • Unit Testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use. It is often done by the programmer to test that the unit he/she has implemented is producing expected output against given input. It falls under white-box testing.

  • Integration Testing (sometimes called integration and testing, abbreviated I&T) is the phase in software testing in which individual software modules are combined and tested as a group. It occurs after unit testing and before validation testing. Integration testing takes as its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing. It falls under both white-box testing and black-box testing.

  • System Testing (of software or hardware) is testing conducted on a complete, integrated system to evaluate the system's compliance with its specified requirements. System testing falls within the scope of black-box testing, and as such, should require no knowledge of the inner design of the code or logic.

  • Stress Testing is the testing to evaluate how the system behaves under unfavorable conditions. Testing is conducted within beyond limits of the specifications. It falls under black-box testing.

  • Performance Testing is in general, a testing practice performed to determine how a system performs regarding responsiveness and stability under a particular workload. It can also serve to investigate, measure, validate or verify other quality attributes of the system, such as scalability, reliability and resource usage. It falls under black-box testing.

  • Functional Testing is a quality assurance (QA) process and a type of black-box testing that bases its test cases on the specifications of the software component under test. Functions are tested by feeding them input and examining the output, and internal program structure is rarely considered. Functional testing usually describes what the system does.

  • Acceptance Testing is often done by the customer to ensure that the delivered product meets the requirements and works as the customer expected. And, of course, it falls under black-box testing.

  • Usability Testing is performed to the perspective of the client, to evaluate how the GUI is user-friendly, how quickly can the client learn, after learning how to use, how proficiently can the client perform, and how pleasing is it to use its design. It also falls under black-box testing.

  • Beta Testing is the testing which is done by end users, a team outside development, or publicly releasing full pre-version of the product which is known as the beta version. Beta testing aims to cover unexpected errors. It falls under the class of black-box testing.

Conclusion

As noticed, not all the testing are done by only one group be it software testers group, software developers/engineers group, or the group of users, but all takes part in the process. Not all of the testing processes are required, but the more applied, the better the quality of the software. As for developers, unit testing and integration testing are essentials, and we will discuss that in more details in future articles.

Anas Shekhamis

Anas Shekhamis

A software engineer who specializes in architecting and developing web applications. On a daily basis, I use Python, JavaScript, Ruby, and PHP to design and implement API's and build web applications.

Read More
Software Testing
Share this