elie
elie

Reputation: 197

jmeter different number of threads for different http request in the same thread

i'm trying to implement a test plan using JMeter.

I want to do the following scenario: in the same thread i have 2 HTTP Request

HTTP Request login
HTTP Request getStudentsName

the thing is HTTP Request getStudentsName can't be done unless i run the login first , so lets say i want to do the login for 1 user and then getStudentsName for 50 users.

if i put the login and getStudentsName in 2 different threads login give a success but the getStudentsName failed.

My question is can i implement this example in the same thread?or any other help?

Thanks.

Upvotes: 1

Views: 891

Answers (2)

Gabriel
Gabriel

Reputation: 130

You can use in the same thread group, Config Elements like HTTP Authorization Manager or HTTP Header Manager depending on what exactly the login implies.

Upvotes: 0

Ori Marko
Ori Marko

Reputation: 58774

To run login only once use Once Only Controller as its parent by right click, Insert Parent on the UI.

The Once Only Logic Controller tells JMeter to process the controller(s) inside it only once per Thread, and pass over any requests under it during further iterations through the test plan.

Upvotes: 1

Related Questions