Software Testing Technique

Software Testing Technique

What is Software Testing Technique

Software Testing Technique is a process of writing or designing Test Cases in an efficient way. Now, We might get a question, that why should we use Software Testing Technique for writing or designing test cases. So, the answer to that question is, We can not write Test Cases Randomly. We must follow some rules to write test cases, So that We will do maximum coverage by writing minimum number of test cases which means we will be putting minimum efforts.

The Software Testing Techniques, that we are going to discuss here in this session are Black Box Software Testing Technique not White Box Software Testing Technique. We are only going to focus on Black Box Software Testing technique.

Types of Software Testing Technique

There are 5 Types of Software Testing Technique

  1. Boundary Value Analysis (BVA)
  2. Equivalence Class Partitioning
  3. Decision Table Based Testing
  4. State Transition
  5. Error Guessing

Boundary Value Analysis (BVA)

What is Boundary Value Analysis (BVA)

Boundary Value Analysis is a type of Software Testing Technique which is based on testing the boundary values of valid and invalid partitions and helps us in designing test cases in an effective way.

Example of Boundary Value Analysis

When we were reading about Software Testing Principle, then the very first Software Testing Principle was “Exhaustive (Complete) Testing is not possible”. We had seen 1 example there. The example was. There is a field in a website

  1. which accepts 4 digits at the most, and 
  2. only positive numbers are allowed, and 
  3. we have to test this functionality in 10 minutes, 

then it is not possible to test this functionality in 10 minutes by entering all the numbers.

So, We can see with this example, that Exhaustive (Complete) Testing is not possible.

So, We need to complete this testing using some other alternative approach and those approaches are a part of Software Testing Technique.

Boundary Value Analysis (BVA) is one of those techniques.

In this Technique, We focus on Boundary values of the Input. So, As we know that the field accepts numbers from 0 to 9999. So, the Boundary Values of the Input will be 0 and 9999.

Boundary Value Analysis says that We must test the field with Boundary Values, Values less than 1 Boundary Values and Values more than 1 Boundary Values. So

  1. Boundary Values = 0, 9999
  2. Values less than 1 Boundary Values = -1, 9998
  3. Values more than 1 Boundary Values = 1, 10000

So, the input values will be.

-1, 0, 1 and 9998, 9999, 10000.

So our test cases should be 

  1. -1 should be not allowed – Negative Testing
  2. 0 should be allowed – Positive Testing
  3. 1 should be allowed – Positive Testing
  4. 9998 should be allowed – Positive Testing
  5. 9999 should be allowed – Positive Testing
  6. 10000 should be not allowed – Negative Testing

So, now it is very easy to Test this field in 10 minutes, as we don’t have to enter all the numbers and we have to test the field only 6 numbers. That’s why we say that Software Testing Technique helps us in designing our test cases in an effective and efficient way.

Equivalence Class Partitioning

What is Equivalence Class Partitioning

Equivalence Class Partitioning is a type of Software Testing Technique in which input data is divided into partitions of valid and invalid values. This Techniques divides the input data of software into different equivalence partitions.

Example of Equivalence Class Partitioning

When we were reading about Software Testing Principle, then the very first Software Testing Principle was “Exhaustive (Complete) Testing is not possible”. We had seen 1 example there. The example was. There is a field in a website

  1. which accepts 4 digits at the most, and 
  2. only positive numbers are allowed, and 
  3. we have to test this functionality in 10 minutes, 

So, this field accepts numbers between 0 and 9999, then it is not possible to test this functionality in 10 minutes by entering all the numbers.

So, We can see with this example, that Exhaustive (Complete) Testing is not possible.

So, We need to complete this testing using some other alternative approach and those approaches are a part of Software Testing Technique.

Equivalence Class Partitioning is one of those techniques.

Now, Let’s see What is Equivalence Class Partitioning

It is a technique where the input data is divided into partitions of valid and invalid values.
In this, the inputs data is divided into groups to see the expected behavior.

  1. 1st Partition – Values less then 0 – Invalid Value Partition
  2. 2nd Partition – Values between 0 to 9999 – Valid Value Partition
  3. 3rd Partition – Values greater then 9999 – Invalid Value Partition

So, It will become very easy to write or design test cases now, We can write 

  • 2 test cases to test values less then 0
  • 2 test cases to test values between 0 to 9999
  • 2 test cases to test values greater then 9999

and we can test the functionality in 10 minutes now very easily. So, this way, Software Testing Techniques help in designing test cases in an efficient and effective way.

Decision Table Testing

What is Decision Table Testing

Decision table testing is a Software Testing Technique which is used to test system behavior for different input combinations. Input Combinations and their respective output is captured in a table. This table is also called Cause-Effect Table. So, there are 2 names for this type of table.

  1. Decision Table
  2. Cause-Effect Table

Where to use Decision Table Testing

Decision Table Testing is especially useful for

  • complex systems with multiple decision points 
  • complex systems with multiple conditions
  • complex systems with multiple inputs

How to use Decision Table Testing

In this technique, 

  1. We create a Decision Table,
  2. Inputs or Conditions are listed in a row,
  3. Associated Actions are listed in the corresponding Columns.

Each Combination of Input and Action is called a Test Case.

Example of Decision Table Testing

Let’s understand this with an example.

Let’s take an example of a login functionality, where we have 2 input fields,

  1. username 
  2. password

So, if we have to test login functionality, then we need to find out

  1. all possible combination of inputs
  2. all possible combination of expected results

and we need to create a table for that 

Test CasesTest Case 1Test Case 2Test Case 3Test Case 4
User nameTrueFalseTrueFalse
PasswordTrueTrueFalseFalse
LoginLogin SuccessfulLogin FailedLogin FailedLogin Failed

So, We can see that there are 4 test cases when we have to test 2 input fields. This derives a formula of 2n where n is the number of input fields.

if n = 2 then there will be 4 test cases

if n = 3 then there will be 8 test cases.

So, this way, Software Testing Techniques help in designing test cases in an efficient and effective way.

State Transition Testing

What is State Transition Testing

State Transition Testing Technique is a Software Testing Technique, which is used to performed to check the state of an Application for different input values. We check the behavior of an application for different inputs. Testers can provide positive and negative input values and observe the system behavior.

Example of State Transition Testing

for example if we try to login to Gmail account

  1. then in login page, only username appears first, -> Let’s say This is state 1 -> S1
  2. If we are on S1 and we provide valid user name and click on Next, then the password field appears -> Let’s say this is state 2 -> S2
  3. If we are on S1 and we provide a user name that doesn’t exist and click on Next, then we get an error message “Couldn’t find your google account”-> Let’s say this is state 3 -> S3
  4. If we we are on S1 and we don’t provide user name and click on Next, then we get an error message “Enter an email or Phone Number” -> Let’s say this is state 4 -> S4

So, when we do this type of testing where different different state of transition appears, then this is called, State Transition testing.

So, we can see that we move from state to another state and that’s why this type of testing technique is called State Transition testing.

StateTest CaseTransition
S1valid user nameS2
S1Invalid user nameS3
S1don’t provide user nameS4

So, this way, Software Testing Techniques help in designing test cases in an efficient and effective way.

Error Guessing Testing

What is Error Guessing Testing

Error Guessing is a Software Testing Technique where we guess the errors part or Problematic Part of the Software Application.

As the name says Error Guessing, So we do nothing but guess the possible errors that might appear in the Software Application.

Now, this type of task can be done by experience, So this type of testing technique is used by mostly the experienced People like

  • Test Analyst
  • QA Lead
  • Business Analysts

Because they are very skilled and experience people when it comes to test the applications.
They use their previous experience to find the possible problematic area of the application.

They can take help of various data such as

  • Previous defects
  • Production Defects
  • Blocker Issues faced earlier
  • Risk Areas of the Application
  • Previous Test Results
  • Knowledge of the Application
  • Knowledge in the Domain
  • Experience of Test Analyst, QA Lead and Business Analyst

How to implement Error Guessing Testing Technique

We should do a detailed analysis of the Previous Test Results and Requirement Documents.

Requirement Document will be provided by the Business Analysts to us.

Previous Test Results include the list of document such as

  • Previous defects
  • Production Defects
  • Blocker Issues faced earlier
  • Risk Areas of the Application
  • Previous Test Results

Example of Error Guessing Testing

Let’s take an example Create Account or Sign up Functionality

So, there is a rule associated with password that

  1. the minimum length of the password should be 8 (********)
  2. It should have at least 1 lower case letter  (a, b, c, d, ……)
  3. it should have at least 1 upper case letter (A, B, C, D, ……)
  4. it should have at least 1 special character (@, #, $, %, …..)
  5. it should have at least 1 numeric digit (1, 2, 3, 4, ….)

Now, we know from our past experience that we got 2 defects in this functionality which were very critical

  1. We were allowed to create account without providing a special character in the password
  2. We were allowed to create account with a password of length less than 8 

So, we are going to focus more on these 2 areas in Sign up functionality.

So, this is how, error guessing technique can be used with the experience of Tester and Business Analyst.

Importance or Advantages of Software Testing Technique

Software testing technique are used to 

  • Identify Test Conditions.
  • Identify Test Cases.
  • We try to find all possible Combination of Inputs.
  • We try to find all possible combination of expected results.

The main advantage of Software Testing Technique is that We can design Test Cases effectively and efficiently, which means We can do a full coverage by writing minimum number of test cases if we use Software Test Case Design Technique while writing Test Cases. So, let’s make a list of various advantages of Software Testing Techniques.

  1. We can write efficient and effective test cases.
  2. We can do maximum coverage by putting minimum efforts. Minimum efforts means Minimum number of Test Cases.
  3. We can deliver a quality product to the Customer.
  4. Customer will be satisfied as we deliver a quality product to the Customer.

Summary

We have covered below topics in today’s session

  1. Software Testing Techniques
  2. Boundary Value Analysis (BVA)
  3. Example of Boundary Value Analysis (BVA)
  4. Equivalence Class Partitioning
  5. Example of Equivalence Class Partitioning
  6. Decision Table Based Testing
  7. Example of Decision Table Based Testing
  8. State Transition
  9. Example of State Transition
  10. Error Guessing
  11. Example of Error Guessing

Question

  1. Please list out the importance of Software Testing Technique.
  2. Give an example of each Software Testing Technique.

Leave a Comment