DevOps Certification Training
- 60k Enrolled Learners
- Live Class
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:
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:
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.
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.
Advantages of Waterfall Model:
Disadvantages of Waterfall 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.
Advantages of V – Model
Disadvantages of V – 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.
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, 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
Disadvantages of Agile 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:
Advantages of RAD Model
Disadvantages of RAD 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
Disadvantages of Spiral Model
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?
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, 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.
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:
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.
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:
So the boundary values would be 0, 1, 2 and 9, 10, 11.
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.
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.
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:
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.
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.
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 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.
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'
#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 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.
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.
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.