JMeter - a collaborative session between thread groups

I am new to JMeter; I was looking for a way to share the session identifier between HTTP requests as part of executing Thread groups at the same time. I checked other questions, but they don't seem to consider sessions, and I have already achieved my goal of exchanging CSV-vars between threads.

The structure of My Test Suite:

Test Plan - HTTP Cookie Manager - CSV Data Set (sharing mode: all threads) - HTTP URL Re-Writing Modifier (session arg name: jsessionid, caches session id) - Thread Group 1 ---Controller ------HTTP Request (uses csv value) ... - Thread Group N (duplicates of TG 1) ---Controller ------HTTP Request (uses csv value) 

This is the thread that accepts my test plan (as seen from the viewer's listener):

 HTTP Request (TG 1-1) CSV Value: (1) *caches session id, let say 123 ... HTTP Request (TG N-1) CSV Value: (1) *caches different session id, let say 456 HTTP Request (TG 1-2) CSV Value: (2) jsessionid=123 ... HTTP Request (TG N-2) CSV Value: (2) jsessionid=456 

My goal is to send multiple identical requests with the same session id at the same time. As you can see, they are identical except for the session identifier. What can I do to fix this?

+4
source share
2 answers

A rather unsuccessful, manual solution:

Grab the session identifier manually, put it in a user variable, add the session variable to the URLs in my HTTP requests without the URL rewriting modifier.

0
source

Take a look at jMeter InterThreadCommunication plugins .

With it, you can put a string value in the global parameter queue from one thread, and then get this value from another thread even in another thread group.

0
source

Source: https://habr.com/ru/post/1438507/


All Articles