Does testContext get shared between parallel test threads?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Does testContext get shared between parallel test threads?

deepng
Hi

I am planning to run my tests in parallel. 
Say I want to login as a user but want to login as 3 different users in different threads and run through the same tests for these users. 
I am using TestContext to hold the various entities related to the user session between different testMethods. 
I am wondering if the testContext is shared between the various threads here? 

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Does testContext get shared between parallel test threads?

Krishnan Mahadevan
ITestContext is shared by one or more @Test methods that are part of the same <test> tag.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Mon, Feb 19, 2018 at 2:16 PM, deepng <[hidden email]> wrote:
Hi

I am planning to run my tests in parallel. 
Say I want to login as a user but want to login as 3 different users in different threads and run through the same tests for these users. 
I am using TestContext to hold the various entities related to the user session between different testMethods. 
I am wondering if the testContext is shared between the various threads here? 

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.