1
votes

I am having a test plan in jmeter, that contains setUp, tearDown and one main thread.

setUp thread logins the application (open a session).

main thread executes to perform a task in same session.

tearDown thread logout the application (close the session).

This is not possible because the cookies of setup thread can not be used in other thread so we can not get the session in other threads.

Please tell me how this is possible?

Thanks for help.

1

1 Answers

1
votes

You can share data (including cookies) between thread groups using Inter-Thread Communication

But I can't understand why do you want to do it. I advice to do:

Thread Group
  HTTP Sampler (login)
  .
  Put your logic here. Maybe you need Loop Controller or Synchronizing Timer here
  .
  HTTP Sampler (logout)