Concurrency Testing: Challenges, Techniques & Process

As the name suggests, Concurrency means two or more events happening at the same time. Similarly, concurrence testing is done to identify how the application will be affected when multiple users are logged in at the same time and doing the same action. Concurrency Testing is also known as multi-user testing.

When multiple users are performing the same action at the same time then there can be issues like increased response time, application crashes etc. which are detected by concurrence testing. Concurrence testing helps improving reliability and robustness of concurrent programs. Concurrent programs run a number of the program at the same time and involved in sharing information. The sharing of information controls the order of execution of tasks. If there is any change in the sequence of execution of these processes then it produces incorrect results which result in repeatability of error. Concurrent testing ensures the reliability of concurrent programs. A real-time example of concurrency is: Trains running on the different track at the same time or train running in same track at different timings.
 

Concurrency Testing Process:

  1. Creating a plan for concurrent testing.
  2. Analyzing the plan and defining scope.
  3. Creating a High level and low-level scenarios for concurrent testing.
  4. Creating the environment for testing.
  5. Now, testers two or more testers can begin the testing by performing the same task at the same timings.

 

Concurrency Testing

 

In load runner, a Rendezvous point is used to create concurrency. The tester can create a scenario after recording and enhancing script in Visual User Generator. In the controller component of load runner, the tester can add a number of concurrent users.

All the users involved in the testing can wait at the same point (For example Login Button), all the users can press the login button at the same time. (Rendezvous point).

These days due to increase in a number of internet users, there is a possibility that a web server may be handling many different clients at the same time, in such types of situation server can go to a deadlock state as it is handling multiple users at the same point. To make sure this flow should go smooth and there should be no deadlock, concurrency testing is done.

 

Concurrency Testing Techniques:

  1. Reviewing code: In this process embedded code and their structures are checked. This is a time-consuming process.
  2. Static Analysis: Static analysis is used for checking and evaluating coding system before executing the code. It is useful in detecting bugs and errors in the system.
  3. Con Testing: Contest removes synchronization faults in multithreaded java program. The contest also notes the deficiencies in unit testing.
  4. Reachability Testing: Reachability testing is usually not possible for many applications as it needs large subtests. There are some proposed research programs to make reachability testing more useful for concurrent testing.
  5. Fuzz Testing: In this testing, user feeds random incorrect data and then wait to see how the program responds. There is no logic behind fuzz testing, it is more of a guess where bad data is provided to crash a program.
  6. Random testing: Coverage area is increased by randomizing test inputs. Multiple threads are tested at one time. For better results, 5-10 threads should be tested at a time.
  7. Extending concolic testing: This can be used for testing multi-threaded or concurrent programs. This type of testing is easily extendable and expendable with flipping algorithms. Without an extension, concolic testing is effective for testing sequential program.

 

Key Challenges in Concurrency Testing:

  1. The test case creation for Concurrency Testing is time-consuming and a very tough job which requires the regular help of the developers.
  2. During concurrent testing, there are very high chances that new errors are introduced in code.
  3. Concurrent testing needs to be done on different platforms.
  4. This testing is more difficult as function return their results via notifications or call back functions instead of delivering immediately.
  5. Debugging of the concurrent program.
  6. The ratio of failure of Concurrency Testing is much more than the sequential program.
  7. Most of the defects are time related and difficult to reproduce.

 

Over to you:

  1. Concurrency Testing – To check the effect on the system when multiple users are logged in performing the same task at the same time.
  2. Help in removing robustness of concurrent programs.
  3. Used to detect issues like deadlock, increased response time, application crashes.

 
If you are not a regular reader of this website then highly recommends you Sign up for our free email newsletter!! Sign up just providing your email address below:

Enter your email address:

Check email in your inbox for confirmation to get latest updates Software Testing for free.

 
Happy Testing!!!
 

Leave a Comment

Share This Post