New Post

Python Code || Path Planning with Grey Wolf Optimization (GWO) ~xRay Pixy

Image
Learn how to implement an obstacle-avoiding path planning for a robot using the Grey Wolf Optimization (GWO) in a static environment. #optimization #algorithm #metaheuristic #robotics #deeplearning #ArtificialIntelligence #MachineLearning #computervision #research #projects #thesis #Python

Software Testing using Metaheuristic Optimization Algorithms

Q. Where we can use Metaheuristic Optimization Algorithms?

A. Metaheuristic Algorithms are used in different fields to solve optimization problems in different fields either for minimization of for maximization. 

Metaheuristic Algorithms Categories. 

1. Single Based Metaheuristic Algorithms: Single Solution is generated at each iteration/generation. Single Based Metaheuristic Algorithms Examples.

  • Tabu Search
  • Guided Local Search
  • Iterated Local Search
  • Variable Neighborhood Search
  • Greedy Randomized Adaptive Search

2. Population-Based Metaheuristic Algorithms: Multiple Solutions are generated at each iteration/generation. Examples:

  • Nature-Inspired Metaheuristic Algorithm     
  • Evolutionary Algorithms
  • Swarm Based Algorithm
  • Human-Based Algorithm 
  • Physics-Based Algorithm
  • Bio-Inspired Algorithm
  • Art-Inspired Algorithm
  • Plant-Based Algorithm

Q. How we can use Metaheuristic Optimization Algorithms in Software Testing?

Metaheuristic Optimization Algorithm in Software Testing:
T = {T(1), T(2),..., T(n)}              // T: Test Suite contain T(1), T(2), T(3)…T(n) Test Cases.
For any Metaheuristic Algorithm:
T(1), T(2), T(3)...T(n) - Search Agents Positions     // For example In PSO, they are particles as search agents searching for the solution in the search Space or we can say Problem Space.

Absence of Test Cases are represented with 0 and Presence of Test Cases are represented by 1.

Search Space is also known as Problem Space. 
In Search Space agents / individuals search the problem solution randomly [so sometimes it is also mentioned as Problem Space]. 
NOTE: In Particle swarm optimization algorithm the search space converse towards the optimal solution found in each iteration [or towards the best search agent that is closer to the problem solution].

Search Space Creation : Suppose we have 3 dimensional search space, Lower Bound = [0  0  0], Upper Bound = [15 15 15]
Cost are computed using objective function [ also known as cost function, evaluation function].
Suppose we have 3 Search Agents.
1st Search Agent Position: [8 9 1]    AND Cost: 1.96        - BEST Among All
2nd Search Agent Position: [10 2 10]   AND Cost: 2.93
3rd Search Agent Position: [3 5 10]     AND Cost: 2.21

Here, you can see for each search agent position values are within bound [i.e., in between 0 and15]. Now just imagine After 1 iterations the position for each particles: 
1st Search Agent Position: [8.8 9.9 1.1]   AND Cost: 1.05      -   BEST Among All
2nd Search Agent Position: [11 2 11]  AND Cost: 3.69
3rd Search Agent Position: [3.3 5.5 11]   AND Cost: 1.56   

In each iteration the search space will converge towards the best solution [i.e., near optimal value].

Software testing techniques: Regression Testing.
Regression testing is expensive and repetitive process, in regression testing Test Cases will take a lot of TIME, COST and RESOURCES. Certain errors occur during regression testing:
Regression test case prioritization technique is:
  • Strong
  • Cost Effective
  • Reliable
  • Efficient
Test Case Prioritization techniques are used to sort the Test Cases. Sorting test cases can reduce Testing Cost and improve testing process efficiency. Test Case Prioritization (TCP) techniques do not draw test cases from original test suite. 

Q. How to sort the actual Test Suite?

Test case prioritization can schedule the test cases without eliminating any test case.  

Q. Why Regression Test Case Prioritization Methods are used?

Test Case Prioritization technique is widely accepted by researchers as compare to Test Suite Minimization (TSM) and Test Case Selection (TCS).

Q. How Regression TCP methods measure the results of Testing Process?

Some factors are used to measure the results of testing process using regression TCP:
  • Risk Management
  • Software Production
  • Requirements Information
  • Code
  • Metrics 

Q. Why it is important to perform Regression testing and how we can perform it?

When any software is release it goes through different testing phases/cycles. Whenever any new software is updated or released testing functions are tested by regression testing to ensure it is working properly or producing any error. Software maintenance involved: Optimization, Enhancement, Error correction, delete exiting features. Regression testing can be perform using different techniques:
  • Complete Reset: It means reexecute complete Test Suite [test suites include all test cases New versions release and updates to a Software Under Testing (SUT) ]
For Example: Test Suite size increase to 1000 or 10000000. 
Now as a tester, we need to adopt a suitable method to Reduce / Select / Prioritize the test cases. When test cases are 1000 or 10000 or 1000000 in such cases Complete Reset is not possible.  Other options testers have : Selection / Prioritization / Optimization (i.e., minimization).

PARAMETERS: Certain parameters are used to minimize, select or prioritize test suites Size, Time and Cost. Parameters:  Code Changes, Code Coverage, Fault detection ability, Cost [also known as regression testing parameters].
  • Test Case Selection: Focus on Code changes [select code changed part of Software Under Testing].
  • Test Case Prioritization: Focus on Fault Detection during software testing [ increase software quality by faults identification in early stages and decrease Cost by eliminating/fixing bugs].
  • Test Case Minimization: Focus on the elimination of Unused / non-productive Test cases from Test Suites. 
NOTE: Above different regression testing techniques are given among all Test Case Prioritization technique is widely accepted and used by researchers. Because faults detection of any Software Under Testing is the primary goal. Test case minimization techniques can delete / eliminate the test cases permanently [Drawback]. 


Comments

Popular Post

PARTICLE SWARM OPTIMIZATION ALGORITHM NUMERICAL EXAMPLE

Cuckoo Search Algorithm for Optimization Problems

Particle Swarm Optimization (PSO)

PSO (Particle Swarm Optimization) Example Step-by-Step

how is the LBP |Local Binary Pattern| values calculated? Step-by-Step with Example

PSO Python Code || Particle Swarm Optimization in Python || ~xRay Pixy

Bat algorithm Explanation Step by Step with example

Grey Wolf Optimization Algorithm

Grey Wolf Optimization Algorithm Numerical Example

Whale Optimization Algorithm Code Implementation || WOA CODE || ~xRay Pixy