Now I suppose I had found a solution: 
It has nothing to do with threads, but with the login process: I simply forget 
to add the bearer token to the HTTP header of each step after the login. Now it 
works as expected.

With best regards

Georg 
-------------------------

Hi Felix,

thanks for your quick reply!

In JMeter I add "Pre Processor | User Parameters" to define my test users 
(https://jmeter.apache.org/usermanual/component_reference.html#User_Parameters).
 The table has got the rows "API_KEY" and "USERNAME".

"API_KEY" is used by the login process: It uses GET to the IdentityProvider, 
loads the Auth session ID and uses a Cookie PostProcessor.

Afterwards the file upload starts inside this user session.

If I use more than one thread, the second login for the second user starts 
before the first session is finished. The system tries to assign a first 
session file upload to the second session - which is wrong (HTTP 403 forbidden).

It only works if I use a 20 sec ramp-up period - but this is not good for 
stress tests.

With best regards
Georg

-----Ursprüngliche Nachricht-----
Von: Felix Schumacher <[email protected]> 
Gesendet: Sonntag, 8. März 2020 12:59
An: [email protected]
Betreff: Re: Running JMeter tests with different threads


Am 05.03.20 um 10:38 schrieb Hüsing Georg:
> Hi,
>
> I'm running JMeter test in a thread group with "Number of threads (users)" = 
> 3.
>
> I also use the User Parameters table with 3 users.
Normally I set up different users by using a CSV Data Set Config element. What 
are you doing here exactly?
>
> The tests succeeds if I set "Ramp-up period (seconds)" = 20.
>
> But if I set "Ramp-up period (seconds)" = 0 the test fails with HTTP 403 
> Forbidden.
>
> This is because the next Login starts before the prior actions with the prior 
> login are finished:
> Not Ok:
> GET Login
> POST blob 1
> GET Login
> POST blob 2
> POST blob 1
>
> Ok:
> GET Login
> POST blob 1
> POST blob 2
> GET LOGIN
> POST blob 1
>
> Is there a way to run the threads at the same time but the first thread is 
> "encapsulated" so that the second thread does not interfere with the first 
> thread?

Can you post a simple test plan, that shows what you are doing exactly?

Each thread should be separated by default when JMeter runs. There should be no 
interaction by default.

Felix

>
>
> With best regards
>
> Georg Hüsing
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to