The Wayback Machine - https://web.archive.org/web/20240930171242/https://www.geeksforgeeks.org/software-testing-techniques/
Open In App

Software Testing Techniques

Last Updated : 26 Sep, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Software testing techniques are methods used to design and execute tests to evaluate software applications. The following are common testing techniques:

  1. Manual testing – Involves manual inspection and testing of the software by a human tester.
  2. Automated testing – Involves using software tools to automate the testing process.
  3. Functional testing – Tests the functional requirements of the software to ensure they are met.
  4. Non-functional testing – Tests non-functional requirements such as performance, security, and usability.
  5. Unit testing – Tests individual units or components of the software to ensure they are functioning as intended.
  6. Integration testing – Tests the integration of different components of the software to ensure they work together as a system.
  7. System testing – Tests the complete software system to ensure it meets the specified requirements.
  8. Acceptance testing – Tests the software to ensure it meets the customer’s or end-user’s expectations.
  9. Regression testing – Tests the software after changes or modifications have been made to ensure the changes have not introduced new defects.
  10. Performance testing – Tests the software to determine its performance characteristics such as speed, scalability, and stability.
  11. Security testing – Tests the software to identify vulnerabilities and ensure it meets security requirements.
  12. Exploratory testing – A type of testing where the tester actively explores the software to find defects, without following a specific test plan.
  13. Boundary value testing – Tests the software at the boundaries of input values to identify any defects.
  14. Usability testing – Tests the software to evaluate its user-friendliness and ease of use.
  15. User acceptance testing (UAT) – Tests the software to determine if it meets the end-user’s needs and expectations.

Software testing techniques are the ways employed to test the application under test against the functional or non-functional requirements gathered from business. Each testing technique helps to find a specific type of defect . For example, Techniques that may find structural defects might not be able to find the defects against the end-to-end business flow. Hence, multiple testing techniques are applied in a testing project to conclude it with acceptable quality.

Just as applying a variety of software testing techniques is crucial for ensuring a software application meets all functional and non-functional requirements, having a comprehensive understanding of these techniques is essential for effective testing. If you’re looking to deepen your knowledge and apply these techniques more effectively, consider exploring the Complete Guide to Software Testing & Automation by GeeksforGeeks . This course offers in-depth coverage of various testing methods, enabling you to identify and address different types of defects with precision, ultimately leading to a higher-quality software product.

Principles Of Testing

Below are the principles of software testing:

  1. All the tests should meet the customer’s requirements.
  2. To make our software testing should be performed by a third party.
  3. Exhaustive testing is not possible. As we need the optimal amount of testing based on the risk assessment of the application.
  4. All the tests to be conducted should be planned before implementing it.
  5. It follows the Pareto rule (80/20 rule) which states that 80% of errors come from 20% of program components.
  6. Start testing with small parts and extend it to large parts.

Types Of Software Testing Techniques

There are two main categories of software testing techniques:

  1. Static Testing Techniques are testing techniques that are used to find defects in an application under test without executing the code. Static Testing is done to avoid errors at an early stage of the development cycle thus reducing the cost of fixing them.
  2. Dynamic Testing Techniques are testing techniques that are used to test the dynamic behaviour of the application under test, that is by the execution of the code base.  The main purpose of dynamic testing is to test the application with dynamic inputs- some of which may be allowed as per requirement (Positive testing) and some are not allowed (Negative Testing).

Each testing technique has further types as showcased in the below diagram. Each one of them will be explained in detail with examples below.

Software testing techniques

Testing Techniques

Static Testing Techniques

As explained earlier, Static Testing techniques are testing techniques that do not require the execution of a code base. Static Testing Techniques are divided into two major categories:

  1. Reviews : They can range from purely informal peer reviews between two developers/testers on the artifacts (code/test cases/test data) to formal Inspections which are led by moderators who can be internal/external to the organization.
    1. Peer Reviews : Informal reviews are generally conducted without any formal setup. It is between peers. For Example- Two developers/Testers review each other’s artifacts like code/test cases.
    2. Walkthroughs : Walkthrough is a category where the author of work (code or test case or document under review) walks through what he/she has done and the logic behind it to the stakeholders to achieve a common understanding or for the intent of feedback.
    3. Technical review : It is a review meeting that focuses solely on the technical aspects of the document under review to achieve a consensus. It has less or no focus on the identification of defects based on reference documentation. Technical experts like architects/chief designers are required to do the review. It can vary from Informal to fully formal.
    4. Inspection : Inspection is the most formal category of reviews. Before the inspection, the document under review is thoroughly prepared before going for an inspection. Defects that are identified in the Inspection meeting are logged in the defect management tool and followed up until closure.  The discussion on defects is avoided and a separate discussion phase is used for discussions, which makes Inspections a very effective form of review.
  2. Static Analysis : Static Analysis is an examination of requirement/code or design to identify defects that may or may not cause failures. For Example- Review the code for the following standards. Not following a standard is a defect that may or may not cause a failure. Many tools for Static Analysis are mainly used by developers before or during Component or Integration Testing. Even Compiler is a Static Analysis tool as it points out incorrect usage of syntax, and it does not execute the code per se. There are several aspects to the code structure – Namely Data flow, Control flow, and Data Structure.
    1. Data Flow : It means how the data trail is followed in a given program – How data gets accessed and modified as per the instructions in the program. By Data flow analysis, you can identify defects like a variable definition that never got used.
    2. Control flow : It is the structure of how program instructions get executed i.e. conditions, iterations, or loops.  Control flow analysis helps to identify defects such as Dead code i.e. a code that never gets used under any condition.
    3. Data Structure : It refers to the organization of data irrespective of code. The complexity of data structures adds to the complexity of code. Thus, it provides information on how to test the control flow and data flow in a given code.

Dynamic Testing Techniques

Dynamic techniques are subdivided into three categories:

1. Structure-based Testing:

These are also called White box techniques . Structure-based testing techniques are focused on how the code structure works and test accordingly. To understand Structure-based techniques, we first need to understand the concept of code coverage.

Code Coverage is normally done in Component and Integration Testing . It establishes what code is covered by structural testing techniques out of the total code written. One drawback of code coverage is that- it does not talk about code that has not been written at all (Missed requirement), There are tools in the market that can help measure code coverage.

There are multiple ways to test code coverage:

1. Statement coverage: Number of Statements of code exercised/Total number of statements. For Example, if a code segment has 10 lines and the test designed by you covers only 5 of them then we can say that statement coverage given by the test is 50%.

2. Decision coverage: Number of decision outcomes exercised/Total number of Decisions. For Example, If a code segment has 4 decisions (If conditions) and your test executes just 1, then decision coverage is 25%

3. Conditional/Multiple condition coverage: It has the aim to identify that each outcome of every logical condition in a program has been exercised.

2. Experience-Based Techniques:

These are techniques for executing testing activities with the help of experience gained over the years. Domain skill and background are major contributors to this type of testing. These techniques are used majorly for UAT/business user testing . These work on top of structured techniques like Specification-based and Structure-based, and they complement them. Here are the types of experience-based techniques:

1. Error guessing : It is used by a tester who has either very good experience in testing or with the application under test and hence they may know where a system might have a weakness. It cannot be an effective technique when used stand-alone but is helpful when used along with structured techniques.

2. Exploratory testing : It is hands-on testing where the aim is to have maximum execution coverage with minimal planning. The test design and execution are carried out in parallel without documenting the test design steps. The key aspect of this type of testing is the tester’s learning about the strengths and weaknesses of an application under test. Similar to error guessing, it is used along with other formal techniques to be useful.

3. Specification-based Techniques:

This includes both functional and non-functional techniques (i.e. quality characteristics). It means creating and executing tests based on functional or non-functional specifications from the business. Its focus is on identifying defects corresponding to given specifications. Here are the types of specification-based techniques:

1. Equivalence partitioning : It is generally used together and can be applied to any level of testing. The idea is to partition the input range of data into valid and non-valid sections such that one partition is considered “equivalent”. Once we have the partitions identified, it only requires us to test with any value in a given partition assuming that all values in the partition will behave the same. For example, if the input field takes the value between 1-999, then values between 1-999 will yield similar results, and we need NOT test with each value to call the testing complete.

2. Boundary Value Analysis (BVA) : This analysis tests the boundaries of the range- both valid and invalid. In the example above, 0,1,999, and 1000 are boundaries that can be tested. The reasoning behind this kind of testing is that more often than not, boundaries are not handled gracefully in the code.

3. Decision Tables : These are a good way to test the combination of inputs. It is also called a Cause-Effect table. In layman’s language, one can structure the conditions applicable for the application segment under test as a table and identify the outcomes against each one of them to reach an effective test.

  1. It should be taken into consideration that there are not too many combinations so the table becomes too big to be effective.
  2. Take an example of a Credit Card that is issued if both credit score and salary limit are met. This can be illustrated in below decision table below:
Image

Decision Table

4. Use case-based Testing : This technique helps us to identify test cases that execute the system as a whole- like an actual user (Actor) , transaction by transaction. Use cases are a sequence of steps that describe the interaction between the Actor and the system. They are always defined in the language of the Actor, not the system. This testing is most effective in identifying integration defects. Use case also defines any preconditions and postconditions of the process flow. ATM example can be tested via use case:

Image

Use case-based Testing

5. State Transition Testing : It is used where an application under test or a part of it can be treated as FSM or finite state machine. Continuing the simplified ATM example above, We can say that ATM flow has finite states and hence can be tested with the State transition technique.  There are 4 basic things to consider –

  1. States a system can achieve
  2. Events that cause the change of state
  3. The transition from one state to another
  4. Outcomes of change of state

A state event pair table can be created to derive test conditions – both positive and negative.

Image

State Transition

Advantages of software testing techniques:

  1. Improves software quality and reliability – By using different testing techniques, software developers can identify and fix defects early in the development process, reducing the risk of failure or unexpected behaviour in the final product.
  2. Enhances user experience – Techniques like usability testing can help to identify usability issues and improve the overall user experience.
  3. Increases confidence – By testing the software, developers, and stakeholders can have confidence that the software meets the requirements and works as intended.
  4. Facilitates maintenance – By identifying and fixing defects early, testing makes it easier to maintain and update the software.
  5. Reduces costs – Finding and fixing defects early in the development process is less expensive than fixing them later in the life cycle.

Disadvantages of software testing techniques:

  1. Time-consuming – Testing can take a significant amount of time, particularly if thorough testing is performed.
  2. Resource-intensive – Testing requires specialized skills and resources, which can be expensive.
  3. Limited coverage – Testing can only reveal defects that are present in the test cases, and defects can be missed.
  4. Unpredictable results – The outcome of testing is not always predictable, and defects can be hard to replicate and fix.
  5. Delivery delays – Testing can delay the delivery of the software if testing takes longer than expected or if significant defects are identified.
  6. Automated testing limitations – Automated testing tools may have limitations, such as difficulty in testing certain aspects of the software, and may require significant maintenance and updates.


Similar Reads

Software Testing - Estimation Techniques
Test estimation is an important part of a project since test estimation plays a key role in test planning, scheduling project, and allocation of necessary resources. The following topics will be discussed here: What is Software Test Estimation?Why Test Estimation?What To Estimate?How To Estimate? Test Estimation Best PracticesOther TechniquesLet's
10 min read
Principles of software testing - Software Testing
Software testing is an important aspect of software development, ensuring that applications function correctly and meet user expectations. In this article, we will go into the principles of software testing, exploring key concepts and methodologies to enhance product quality. From test planning to execution and analysis, understanding these princip
10 min read
Unit Testing, Integration Testing, Priority Testing using TestNG in Java
TestNG is an automated testing framework. In this tutorial, let us explore more about how it can be used in a software lifecycle. Unit Testing Instead of testing the whole program, testing the code at the class level, method level, etc., is called Unit Testing The code has to be split into separate classes and methods so that testing can be carried
6 min read
Split Testing or Bucket Testing or A/B Testing
Bucket testing, also known as A/B testing or Split testing, is a method of comparing two versions of a web page to see which one performs better. The goal of split testing is to improve the conversion rate of a website by testing different versions of the page and seeing which one produces the most desired outcome. There are a few different ways to
15+ min read
Selenium Testing vs QTP Testing vs Cucumber Testing
Automation testing will ensure you great results because it's beneficial to increased test coverage. Manual testing used to cover only few test cases at one time as compared to manual testing cover more than that. During automated test cases it's not all test cases will perform under the tester. Automation testing is the best option out of there. S
6 min read
Agile Testing Techniques
Testing is an integral part of software development and it goes hand in hand with the requirement creation activities. There can be a structured and systematic approach to testing in agile projects too. As there are multiple releases usually defined in Agile projects, testing plays an important role in the quality control of the product or service.
15 min read
Software Testing - Testing Retail Point of Sale(POS) Systems with Test Cases Example
POS testing refers to testing the POS application to create a successful working POS application for market use. A Point of Sale (POS) system is an automated computer used for transactions that help retail businesses, hotels, and restaurants to carry out transactions easily. What is Retail Point of Sale (POS) Testing?POS is a complex system with a
14 min read
PEN Testing in Software Testing
Pen testing, a series of activities taken out in order to identify the various potential vulnerabilities present in the system which any attack can use to exploit the organization. It enables the organization to modify its security strategies and plans after knowing the currently present vulnerabilities and improper system configurations. This pape
3 min read
Basis Path Testing in Software Testing
Prerequisite - Path Testing Basis Path Testing is a white-box testing technique based on the control structure of a program or a module. Using this structure, a control flow graph is prepared and the various possible paths present in the graph are executed as a part of testing. Therefore, by definition, Basis path testing is a technique of selectin
5 min read
What is Code Driven Testing in Software Testing?
Prerequisite - TDD (Test Driven Testing) Code Driven Testing is a software development approach in which it uses testing frameworks that allows the execution of unit tests to determine whether various sections of the code are acting accordingly as expected under various conditions. That is, in Code Driven Testing test cases are developed to specify
2 min read
Decision Table Based Testing in Software Testing
What is a Decision Table : Decision tables are used in various engineering fields to represent complex logical relationships. This testing is a very effective tool in testing the software and its requirements management. The output may be dependent on many input conditions and decision tables give a tabular view of various combinations of input con
3 min read
Difference between Error Seeding and Mutation Testing in Software Testing
1. Error Seeding :Error seeding can be defined as a process of adding errors to the program code that can be used for evaluating the number of remaining errors after the system software test part. The process works by adding the errors to the program code that one can try to find & estimate the number of real errors in the code base with the he
3 min read
Response Testing in Software Testing
Software applications are developed to provide some specific service to the customers. When an end-user uses a software product/application between the software and the user, a request-response interaction takes place. This request-response interaction is one method of communication between users and systems or multiple systems in a network. When o
8 min read
Random Testing in Software Testing
Random testing is software testing in which the system is tested with the help of generating random and independent inputs and test cases. Random testing is also named monkey testing. It is a black box assessment outline technique in which the tests are being chosen randomly and the results are being compared by some software identification to chec
4 min read
Software Testing - REST Client Testing Using Restito Tool
REST (Representational State Transfer) is a current method of allowing two software systems to communicate. REST Client is one of these systems, whereas REST Server is another. It's a design technique that uses a stateless communication protocol like HTTP. It uses XML, YAML, and other machine-readable forms to organize and arrange data. However, JS
5 min read
Software Testing - Mainframe Testing
Mainframe testing is used to evaluate software, applications, and services built on Mainframe Systems. The major goal of mainframe testing is to ensure the application or service's dependability, performance, and excellence through verification and validation methodologies, and to determine if it is ready to launch or not. Because CICS screens are
15+ min read
Software Testing - Business Intelligence (BI) Testing with Sample Test Cases
The procedure in which gathering, cleaning, integrating, analyzing, and sharing data is done to determine actional experiences that drive business development is known as Business Intelligence (BI). Business Intelligence Testing checks the organizing information, ETL process, BI reports and guarantees the execution is right. BI Testing guarantees i
8 min read
Software Testing - Web Application Testing Checklist with Test Scenarios
Web testing or web application testing ensures that your website functions as you or your clients expect as per requirements gathered during the project's initial stages. It is a comprehensive scope that touches multiple disciplines, including usability, functionality, compatibility, security, performance, and data storage and retrieval. What is We
15+ min read
Software Testing - Mock Testing
Mock testing is the procedure of testing the code with non-interference of the dependencies and different variables like network problems and traffic fluctuations making it isolated from others. The dependent objects are replaced by mock objects which simulate the behavior of real objects and exhibit authentic characteristics. The motto of mock tes
9 min read
Software Testing - Cookie Testing
Cookie testing is the type of software testing that checks the cookie created in the web browser. A cookie is a small piece of information that is used to track where the user navigated throughout the pages of the website. The following topics of cookie testing will be discussed here: What are Cookies?Where cookies are stored?Why do we Need Cookie
5 min read
Software Testing - Insurance Domain Application Testing with Sample Test Cases
Insurance Domain Application Testing is a software testing process to test the insurance application to check if the designed insurance application meets the required customer's expectations by ensuring the quality, performance, and durability requirements of the application. The following topics of insurance domain application testing will be disc
9 min read
Software Testing - Testing Telecom Domain with Sample Test Cases
Testing the telecom domain is a process of testing the telecom applications. The Telecom domain is a vast area to test. It involves testing a lot of hardware components, back-end components, and front-end components. The various products in this domain are BSS, OSS, NMS, Billing System, etc. In the telecom domain, testing is performed to ensure tha
15+ min read
Confirmation Testing in Software Testing
This article describes Confirmation testing, one of the software testing techniques that is used to assure the quality of the software and covers the concepts of Confirmation testing that help testers in confirming that the software is bug-free by retesting the software till all bugs are fixed. Confirmation testing is a sub-part of change-based tes
8 min read
Software Testing - SOA Testing
SOA Testing is the process of evaluating a certain software where one can check web processes for functionality and make sure different components can communicate effectively throughout. Before diving deep into the testing model directly we need to understand SOA Architecture. What is SOA? Service Oriented Architecture (SOA) is an architectural str
13 min read
Software Testing - Back-to-Back Testing
Back-to-back testing is a method of comparing the performance of two or more systems or components by running them simultaneously and comparing their output. The goal of back-to-back testing is to determine if there is a significant difference in the performance of the systems or components being tested and identify any issues or defects that may e
9 min read
Software Testing - Multi-tenancy Testing
In software development, multi-tenancy refers to the ability of a software application or service to support multiple tenants or customers, each with its own unique data and configurations, on a single instance or deployment of the software. Multi-tenancy is often used in software as a service (SaaS) applications, where multiple customers or organi
15+ min read
Overview of Conversion Testing in Software Testing
Conversion Testing :Every software development process follows the Software Development Life Cycle (SDLC) for developing and delivering a good quality software product. In the testing phase of software development, different types of software testing are performed to check different check parameters or test cases. Where in each software data is an
6 min read
Data Integrity Testing in Software Testing
Every software development process follows the Software Development Life Cycle (SDLC) for the development and delivery of a good quality software product. In the testing phase of software development, different types of software testing are performed to check different check parameters or test cases. Where in each software data is an important part
5 min read
Incremental Testing in Software Testing
Incremental Testing :Like development, testing is also a phase of SDLC (Software Development Life Cycle). Different tests are performed at different stages of the development cycle. Incremental testing is one of the testing approaches that is commonly used in the software field during the testing phase of integration testing which is performed afte
3 min read
Internationalization Testing in Software Testing
Prerequisite: Software Testing Software testing is an important part of the software development life cycle. There are different types of software testing are performed during the development of a software product/service. Software testing ensures that our developed software product/service is bug-free and delivers fulfilling the desired requiremen
4 min read