Automation Engineer Masters Program (4 Blogs)
AWS Global Infrastructure

MI-new-launch

myMock Interview Service for Real Tech Jobs

myMock-widget-banner-bg

Everything that you need to know about software testing methodologies and techniques

Last updated on Nov 28,2019 283 Views

MI-new-launch

myMock Interview Service for Real Tech Jobs

myMock-mobile-banner-bg

myMock Interview Service for Real Tech Jobs

  • Mock interview in latest tech domains i.e JAVA, AI, DEVOPS,etc
  • Get interviewed by leading tech experts
  • Real time assessment report and video recording

History is full of examples of incidents when software flaws have caused billions of dollars in waste and sometimes even lead to casualties. In order to make sure the released software is safe and functions as expected, the concept of software testing was introduced. As a phase of the software development cycle, software testing is based on specific methodologies. In this article, you will be learning about a variety of different software testing methodologies and techniques that software development organizations use.

Listed below are the topics that we will be discussing in this article:

Software Testing Methodologies

Testing Methodologies are various combinations of strategies, principles, ideas, methods, and concepts that help you ensure that a particular software product or an application is bug-free, fit for purpose and well according to user requirements.

Many companies use the term software development methodologies & testing methodologies colloquially. As software applications become more and more complex it is important to have a robust testing methodology. Listed below are some benefits of employing a testing methodology:

  • Manages requirements, test cases, bugs, issues in a single integrated environment
  • Offers full traceability throughout the testing lifecycle
  • Acts as a complete testing solution that includes management requirements, test case designs, release management, etc
  • Provides a complete picture of the software product and health status
  • Leverages current technology investments with many automated testing solutions

Nowadays, there are dozens of highly effective software testing methodologies each with different logic, start points, duration of execution, and methods. As the first part of this ‘Software Testing Methodologies and Techniques’ article let’s take a look at more well-known software testing methodologies. 

Testing Methodologies - Software Testing Methodologies and Techniques - Edureka

Waterfall Model

The waterfall model is one of the oldest models developed by Winston Royce in 1970. Also known as a linear-sequential life cycle model, the traditional waterfall testing approach represents multiple stages in a sequential manner that flows progressively downward(like a waterfall). It means that you can move to the next phase of development or testing only after you have completed the previous phase successfully. Once you proceed to the next phase, there is no turning back. Waterfall model’s main phases are shown in the image below.

Waterfall Model Phases Testing Methodologies - Software Testing Methodologies and Techniques - Edureka

Advantages of Waterfall Model:

  • Simple to understand and use
  • Allows for easy testing and analysis
  • Saves a significant amount of time and money
  • Good for small projects if all requirements are clearly defined
  • Allows for departmentalization & managerial control

Disadvantages of Waterfall Model:

  • Risky and uncertain
  • Lack of visibility of the current progress
  • Not suitable when the requirements keep changing
  • Difficult to make changes to the product when it is in the testing phase
  • The end product is available only at the end of the cycle
  • Not suitable for large and complex projects

V – Model (Verification and Validation Model)

V – Model is an extension of the Waterfall Model where the process execution takes place in a sequential manner in V-Shape. As you can see in the image below there exists a directly associated testing phase in every single phase of the development cycle. According to this testing methodology, the process begins when requirements are ready. Then you can perform static testing, verification, and review, that helps to prevent possible defects in the latest stages. Well, you can say that this model is divided into 3 phases: Verification Phase, Coding Phase, and Validation Phase. In the image below you have verification phase on left and validation phase on right.

V - Model Testing Methodologies - Software Testing Methodologies and Techniques - Edureka

Advantages of V – Model

  • It’s simple and easy to use
  • Works well for small projects when requirements are understood
  • Overlapping is avoided as phases are executed sequentially
  • Much more cost-effective when compared to the waterfall model

Disadvantages of V – Model

  • No inherent ability to respond to requirements changes
  • No clear solutions that can eliminate the software defects
  • Leads to testing being squeezed in at the end of development
  • Not suitable for large and complex projects

Incremental Model

You can consider the incremental model as multi-waterfall-model of software testing. The whole incremental process is divided into the various number of cycles. Each increment adds additional functionality to the software. An increment includes three cycles: software designing and development, testing, and implementation. Using this model it’s possible to simultaneously develop different product version. For example, you can have the first version in the testing phase, the second one is in the development phase and the third one in the designing phase. This continues until the project is finished.

Incremental Model - Testing Methodologies - Software Testing Methodologies and Techniques - Edureka

The advantages it has over other models is that it’s more flexible and it’s cheaper to change the requirements. Also, the software testing process is more effective since it’s easier to test and debug if you use smaller iterations. But the disadvantage is that its costlier when compared to the waterfall model.

Agile Model

Agile Model, a form of iterative & incremental approach that breaks the development process into smaller parts, iterations, and sprints.  So, there will be small incremental releases of the software, each one building on previous functionalities. This allows testers to work in parallel with the rest of the project team throughout the process and fix the flaws and errors immediately after they occur. The main goal of this approach is to deliver new software features fast and with the best quality. It focuses on responding to change rather than extensive planning. Agile testing has become the most popular and most used software development methodology in recent years. The majority of organizations use agile techniques for software development projects.

Advantages of Agile Model

  • An adaptive approach that responds to requirement changes favorably
  • Fixing errors early in the development process makes this process more cost-effective
  • Improves the quality of the product and makes it highly bug-free
  • Allows for direct communication between people involved in software project
  • Highly suitable for large & long-term projects
  • Minimum resource requirements & very easy to manage

Disadvantages of Agile Model

  • Highly dependent on clear customer requirements
  • Difficult to predict time and effort for larger projects 
  • Not suitable for complex projects
  • Lacks documentation efficiency
  • Increased maintainability risks

RAD Model (Rapid Application Development Testing Model)

Rapid Application Development (RAD) model is also a form of an incremental model where components are developed in parallel. With RAD, the focus is mainly on building a prototype that looks and acts like the final product that caters to the user requirements. In this approach, a prototype is created by assembling the different components of the software product that have been developed in parallel. That prototype is then used to gather feedback from the customer.

Phases of the RAD model:

  • Business Modeling: Identifies vital information flow between various business channels
  • Data Modeling: Information gathered in the previous phase is used to define data objects
  • Process Modeling: Data objects are then converted to get business objective
  • Application Generation: Various automation tools are used to process models to code
  • Testing & Turnover: New components and all the connecting interfaces are tested

Advantages of RAD Model

  • Reduces development/testing cycle time
  • Less cost and risk due to time-box approach
  • Enhances customer feedback, due to customer involvement throughout the cycle

Disadvantages of RAD Model

  • Requires highly skilled resources
  • High-cost estimation
  • Requires a system that can be modularized
  • Hard to use with legacy systems

Spiral Model

The spiral model incorporates iterative development approach along with the systematic approach of the waterfall model. It has four phases: Planning, Risk Analysis, Engineering, and Evaluation. After the first cycle is completed, the second cycle starts. After the second cycle is done, the next cycle starts. This way the product repeatedly passes through these phases in iterations (called spirals in this model). Each subsequent spiral builds on the baseline spiral. The main thing to note here is that high importance is given to the risk analysis phase.

Advantages of Spiral Model

  • Lower risk due to the high amount of risk analysis
  • Highly suitable for large and mission-critical projects
  • Immediate feedback at the third stage of the cycle ensures a high-quality product
  • Requirement changes can be easily accommodated at a later date
  • Offers strong documentation control
  • Ensures rapid development of product

Disadvantages of Spiral Model

  • Expensive process
  • Not suitable for small projects
  • Highly dependent on the risk analysis phase
  • Requires a lot of technical expertise
  • Involves a large number of intermediate stages

This brings us to end of software testing methodologies, the first part of “Software Testing Methodologies and Techniques” article. Each of these models employs a different testing methodology to test the quality and security of software in different ways and different stages. Choosing one among them can be quite complex and I hope what you learned here will help you do that.

This brings us to the next topic of this ‘Software Testing Methodologies and Techniques’ article.

As you guys already know the main purpose of the software testing is to deliver an optimum quality product at a faster pace. To help tester achieve that there are a multitude of software testing techniques each with its strengths and weakness. But, what exactly is a software testing technique?

Software Testing Techniques

Testing Technique refers to the procedure or a way to test the software under test by comparing the actual and expected results. A good software testing technique helps testers to design the test case in such a way that minimal steps of the test cases are able to test maximum functionalities of the software. They can develop smarter test cases, reducing the number of steps required in the test cases. Rest of this ‘Software Testing Methodologies and Techniques’ article, we will discuss some of the most popular techniques, divided into the categories.

Black-Box Testing Techniques

Black-Box Testing, which is also known as specification-based testing, analyses the functionality of a software/application without knowing much about the internal structure/design of the item. The purpose of this method is to check the functionality of the system as a whole to make sure that it works correctly and meets user demands. There are a lot of testing techniques that come under black-box testing. Most popular techniques are discussed in this ‘Software Testing Methodologies and Techniques’ article.

Equivalence Partitioning

In equivalence partitioning, input values to the system or application are divided into different partitions/group based on its similarity in the outcome. So instead of using each and every input value, you can use a value from each partition/group which covers all possible scenarios, to execute test cases. Doing so, you can easily identify valid as well as invalid equivalence classes. That way you can maintain the test coverage as well as save a lot of time spent on testing each test input value. Since it is a black-box testing technique, the code is not visible to testers. Here’s a simple example to understand the concept.

Test Scenario: Let’s suppose you are testing for an input box that accepts numbers from ’01 to 10 & 20 to 30′.

There is no point writing thousand test cases for all valid input numbers plus other test cases for invalid data. Using the equivalence partitioning method above test cases can be divided into five sets of input data called classes. Each test case will be representative of the respective class. The classes possible here are as follows:

  • — to 0 (invalid)
  • 1 to 10 (valid)
  • 11 to 19 (invalid)
  • 20 to 30 (valid)
  • 31 to —  (invalid)

You can select a value for each of these classes and generalize the result to the rest of the values from that class. This way you don’t have to test for all the input values.

Boundary Value Analysis

It is a well-observed truth that a greater number of errors occur at the boundaries rather than in the center of the input domain for a test. When I say boundary, it means the values near the limit where the behavior of the system usually changes. In boundary value analysis technique test cases are designed to include values at the boundaries. If the input is within the boundary value, it is considered ‘Positive testing.’ If the input is outside of the boundary value, it is considered ‘Negative testing.’ It includes maximum, minimum, inside or outside edge, typical values or error values. Here’s an example:

Test Scenario: Let’s suppose you are testing for an input box that accepts numbers from ’01 to 10′.

 Using the boundary value analysis we can define three classes of test cases:

  • Test cases with test data exactly as the input boundaries of input: 1 and 10 (in this case)
  • Values just below the extreme edges of input domains: 0 and 9
  • Test data with values just above the extreme edges of input domains: 2 and 11

So the boundary values would be 0, 1, 2 and 9, 10, 11.

Decision Table Based Technique

A Decision Table basically is a tabular representation of different possible conditions versus test actions. You can think of conditions as inputs, while actions can be considered as outputs. In this technique, we deal with a different combination of input values. This helps tester identify all input values if he has overlooked any. Hence its also referred to as a cause-effect table technique. Here’s a simple example.

Test Scenario: A submit button should be enabled if the user has entered all required fields. Required fields here would be name, e-mail, and message. 

In the above table, you can see either a ‘T’ or ‘F’ against each field. Only when there is a ‘T’ against all fields ie, only when a valid name, valid e-mail, and valid message are inputted, the submit will be enabled.

State Transition Diagram

In this approach, the tester analyzes the behavior of an application under test for different input conditions in a sequence. You can provide positive as well as negative values to check how the application responds. You can apply this technique when an application/system gives a different output for the same input, depending on what has happened in the earlier state. We call such a system as a finite state system. Here’s an example. 

Test Scenario: Booking a hotel room. You log in to the hotel website and book a room. Your room is booked. After that, there are no more rooms available. So, if you try to book again, you are shown a message saying ‘Rooms not available’. So here the transition, which caused the change in state is your booking or booking by somebody else. Take a look at the transition diagram to understand better.

State Transition testing technique is a unique approach for testing highly complex applications, which would increase test execution productivity without compromising on test coverage.

Use Case Testing

First of all, a use case is a tool for defining the required user interaction.  It depends on ‘User Actions’ and ‘Response of System’ to those User Actions. This technique is completely functional testing technique, as in no programming skill is required. You can follow these three simple steps to perform use case testing:

    1. Identify all the possible scenarios from a Use Case
    2. For each scenario, define a test case and a condition for that test case to be executed
    3. For each scenario, determine the test data for the test

Here’s a use case diagram representing a typical ATM System functionality and use cases that you can consider.

White-Box Testing

White-Box Testing is also known as structure-based testing, Unlike black box testing, this method requires a profound knowledge of the code as it includes testing of some structural part of the application. The main purpose is to enhance security, check the flow of inputs/outputs through application and to improve design and usability. There are a lot of testing techniques that come under white-box testing. Let’s discuss each of them in detail.

Statement Coverage or Line Coverage

In this technique, every statement in the source code is executed at least once. So, each line of the code is tested which helps in pointing faulty code. In the case of a flowchart, every node is to be traversed and tested at least once. It’s based on the assumption that more the code covered, the better is the testing of the functionality. However, with this technique, we cannot test the false condition in the source code.

INPUT A, B
C = A + B
IF C > 100
PRINT "Check Complete"

As you can see, we are nor testing what happens when c<100. This was a simples sequential statement. As the type of statement progresses from a simple sequential statement to if-then-else and through loops, the number of test cases required to achieve statement coverage increases. 

Branch Coverage or Decision Coverage

In branch coverage, we make sure that each branch from all the decision points is traversed and tested at least once. That is, each point of entry to a program or subroutine is invoked at least once. Every branch decision should be either true or false. Using branch coverage we can make sure that no branch leads to any abnormal behavior. Let’s consider the same example that we did before, except I have added a few more lines of code.

INPUT A, B
C = A + B
IF C > 100
PRINT "Check Complete"
ELSE
PRINT "Its Pending"

Since just with statement coverage we cannot cover the entire pseudo code, we would have to use branch coverage to ensure maximum coverage. So, decision coverage is more powerful than statement coverage.

Condition Coverage or Predicate Coverage

Condition coverage is usually used for boolean expression. This technique monitors whether every all the individual boolean expressions have been covered and evaluated to both true or false. Stronger criteria when compared to line coverage.  Let’s consider a simple example to understand the concept.

READ X, Y
IF(X == 0 || Y == 0)
PRINT '0'

As you can see we have two conditions, X == 0 and Y == 0. To check for these conditions to be true or false, we can use two test cases as shown below

#TestCase1: X = 0, Y = 55
#TestCase2: X = 55, Y = 0

This is one possible example. In the first test case, we have 1st condition as true and second condition as false. In the second test case, we have 1st condition as false and second condition as true.

Multiple Condition Coverage

Here, all the possible combinations of possible outcomes of conditions are tested at least once. Let’s consider the example that we did for condition testing. Instead of just two test cases, we will have to write four test cases here.

READ X, Y
IF(X == 0 || Y == 0)
PRINT '0'

Test Cases:

 
#TestCase1: X = 0, Y = 0
#TestCase2: X = 0, Y = 5
#TestCase3: X = 55, Y = 0
#TestCase4: X = 55, Y = 5

As you can see, four test cases required for two individual conditions. Similarly, if there are n conditions then 2n test cases would be required.

Experience-Based Testing

Experience-based techniques depend on the experience in designing test cases and test conditions. They are based on the experience, background, and skills of a person in the field of testing. Here, the tester makes use of proper strategy and documentation plan along with the gained experience. Let’s discuss testing techniques that come under experience-based testing.

Exploratory Testing

This testing technique is all about discovery, investigation, and learning. Here, the tester constantly studies and analyzes the product and accordingly applies his skills, traits, and experience to develop test strategy and test cases to perform necessary testing. It’s a very suitable technique when the testing team has an inadequate number of specifications, requirements and severely limited time.

Error Guessing

It’s a simple technique of guessing and detecting potential defects, bugs and errors that are likely to occur in the software product. In error guessing, there are no rules. It takes advantage of tester’s skill, intuition, and experience to find defects that formal Black Box techniques could not identify. So, this technique totally depends on the tester’s experience. The more experienced the tester is, the more errors he can identify. Another way is to regularly create defect and failure lists. 

There is no such thing as one suitable methodology or technique for all the software projects. The choice depends on many aspects such as the type of the project, customer requirements, project schedule, and others. Hope the things that you have learned in this “Software Testing Methodologies and Techniques” article will help you as you head out on your software testing journey.

If you found this ‘Software Testing Methodologies and Techniques’ article relevant, check out the live-online Selenium Certification Training by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe. 

Got a question for us? Please mention it in the comments section of this ‘Software Testing Methodologies and Techniques’ article and we will get back to you.

Comments
0 Comments

Browse Categories

Subscribe to our Newsletter, and get personalized recommendations.