Testing Techniques
Tags: testing, testingtechniques, manualtesting, softwaretestingty
Published: 2023-10-22 15:49:53



Test case design techniques play a major role in planning, designing, and implementing tests for software applications. These techniques involve various steps to ensure the desired test cases to detect the bugs in the test software. These techniques help us to test all the software’s features and functionalities effectively.

**Why are test case design techniques used? **
These techniques are developed to reduce the testing process by identifying critical testing and reducing unused test cases. It helps better design and reduce the number of test cases to be executed. These techniques reduce data and more coverage. 

**What are the advantages of test case design techniques? **

- Possibility to reproduce a test.

- Finding more bugs/defects.

- Long-term maintenance.

- Using these techniques, testers can identify complex scenarios, generate effective test data, and design test cases that evaluate full system functionality.

**Types of Testing**
There are two main categories of software testing techniques:

1. Static Testing
2. Dynamic Testing

**Static Testing Techniques** 
 Static Testing is done to avoid errors at an early stage of the development cycle.

Static Testing is a software testing technique that involves reviewing and analyzing the software documentation – design, or code without executing the software. This can save time, resources, and costs in the long run. Also, it catches bugs early.

We can identify issues like coding errors, inconsistent naming conventions., etc. That could negatively impact the software’s performance or quality.

Static testing will be done during the design, documentation, and development phases before dynamic testing occurs.

**Few Examples of Static Testing**

The primary goal of static testing is to reduce defect by reducing defects in the documentation from which the software is developed.

**Review: ** is a type of static testing | done before execution 
 Review is a process or meeting during which a work product or set of work products, is presented to managers, users, and customers.

**Walkthrough Review: **
• The document owner guides the participants through the document according to his or her thought process 
to achieve a common understanding and to gather feedback. 

** Inspection Review: **
It is the most formal review type; this will be done by senior-level management. During inspection, the documents are prepared and checked thoroughly by the reviewers.



**Dynamic Testing Techniques** 
It is a software testing technique that involves executing and evaluating a program or system during runtime. The main purpose of dynamic testing is to test the application with dynamic inputs- some of which may be allowed as per requirement (Positive test cases) and some are not allowed (Negative test cases).

**Why Do We Need to Perform Dynamic Testing? ** 

- Dynamic testing helps identify bugs, errors, and defects in the software that may affect its functionality, reliability, or performance. 

- By executing the software with various inputs and scenarios, this testing ensures that it working as expected and meets the specified requirements from users/customers.
- Detecting and addressing defects early stages of the development process, will reduce software failures or malfunctions.

**Few Examples of Dynamic testing: **

1. **Boundary Value Analysis (BVA): ** To perform boundary value analysis, we need to test cases that include values at the boundaries of the input domain.

- By testing these boundary values, we can ensure that the software program correctly handles the edge cases of the input and produces correct results for all possible inputs.

- For each input variable, we will define the range of values and then determine the extreme values for each input variable. 

Example:
To write the UPSC exam the person should have an age limit of 21 to 37 years old.

The following are possible test cases to check the boundary range for the above input.

1. min = 18(pass)            2. max = 37(pass)
3. min - 1 = 17(fail)        4. min - 1 = 36 (pass)
5. min + 1 = 19 (pass)       6. min + 1 = 38 (fail)

7. It shouldn't allow characters/special characters/spaces.

2.** Decision table: **

The technique is used if we have more conditions. Based on the condition we have to perform the action.

This test technique is appropriate for functionalities which has logical relationships between inputs (if-else logic). In the Decision table technique, we have to deal with combinations of inputs. While writing the test cases with a decision table, we have to consider conditions and their actions. We take conditions as inputs and actions as outputs.

- It is a structured exercise to prepare requirements when dealing with complex business rules.

Example:
If the user has to submit a photo under particular situations, such as -
condition 1: 
You can only upload images in the '.jpg' format.
condition 2: 
a file with a size of fewer than 64 kilobytes

**Test cases: **


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0r9k2lifwszhea3ehu9u.png)

Test case 1 is passed, the remaining cases failed due to the conditions mismatch (this is not allowed as per the customer requirements). 

**3. Use case Testing: **

Use case testing is a part of the functional testing technique that helps to identify and test the scenarios on end-to-end scenarios. It helps to identify the gaps in software that might not be identified by testing individual components. It is used to develop test cases at the system level or acceptance level.

The purpose of use case testing is to understand the end-user actions with the software/application as well as the system’s behavior.

The following things are carried out in the Use Case Testing

a) Use Case Identification -
b) Test Case Design
c) Positive and Negative Testing
d) Preconditions and Postconditions
e) End-to-End Testing
f) Test Data
g) Traceability
h) Regression Testing

Use-case testing is a valuable technique for ensuring that a software system meets its intended functional requirements and acts correctly when used by its intended audience. It aids in ensuring that the program meets user expectations and that frequent usage scenarios are extensively tested.

**Example**:
Students Web portal: Students can log in and check their attendance and results for each semester.

Module 1: Log in and log out with their registered number. 

Module 2: Students can check their attendance for every semester.

Module 3: Students can check their marks for every semester.


Here each module is called a user case/user story.

When we want to test the module 2:

After logging into the portal, the user should be able to click the attendance symbol/text and it should redirect the attendance for every month in that semester.

In the attendance portal, the average attendance for a semester and along with that each month's attendance will be shown.

If the attendance <= 60:
        the wheel will be in red color.
If the attendance >= 65 or <= 75:
        the wheel will be in yellow color.
If the attendance >= 76:
        the wheel will be in green color.

For the above requirements, will write the test cases and execute the testing.

**LCSAJ Testing: **

LCSAJ stands for Linear Code Sequence and Jump, a white box testing technique to identify the code coverage, which begins at the start of the program or branch and ends at the end of the program or the branch.

LCSAJ consists of testing and is equivalent to statement coverage.

LCSAJ Testing is nothing but a test design technique, which is used to design and create test cases, effective in executing the LCSAJ present in the program.

**Example:**
A user can check if he/she is eligible for gov jobs.
Min= 18, Max= 35

**Test cases**
1. Minimum age: >=18
2. Maximum age <=35
3. Minimum -1: 17
4. Maximum +1: 36