TestNG Thread Count

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

TestNG Thread Count

Arun Vats
Hi All,

I am using TestNG in my framework and its working pretty well. Here I got a requirement where I need to execute kind of load using same framework. 
TestNG provides Thread-Count parameter where we can pass n number of thread to execute. Here what I did:

I have created a script and its working perfectly when running alone (tried running more than 20-30 times).
Now I have to run same script in parallel with 3 users. so What I did is 

<suite name="Suite1" parallel="tests" thread-count="3" >

<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
</suite>

Now When I execute it my scripts start getting failed at random step. I tried introducing wait statement (even hard sleep) but still getting exception "Unable to find element" where I can see page is loaded already.
Any suggestion please. 

Thanks
Arun Vats

--
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: TestNG Thread Count

Krishnan Mahadevan
Arun,
With whatever you have provided as information, there's very little one can do in terms of figuring out what is going wrong.
I would request you to please submit a re-usable test which can be executed to recreate the problem.

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 Thu, Aug 25, 2016 at 2:45 PM, Arun Vats <[hidden email]> wrote:
Hi All,

I am using TestNG in my framework and its working pretty well. Here I got a requirement where I need to execute kind of load using same framework. 
TestNG provides Thread-Count parameter where we can pass n number of thread to execute. Here what I did:

I have created a script and its working perfectly when running alone (tried running more than 20-30 times).
Now I have to run same script in parallel with 3 users. so What I did is 

<suite name="Suite1" parallel="tests" thread-count="3" >

<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
</suite>

Now When I execute it my scripts start getting failed at random step. I tried introducing wait statement (even hard sleep) but still getting exception "Unable to find element" where I can see page is loaded already.
Any suggestion please. 

Thanks
Arun Vats

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: TestNG Thread Count

Shiva Krishna
In reply to this post by Arun Vats
Hi Arun,

check if the element is enabled or not before you perform action on the WebElement, if element is enabled you can go a head and perform action. if element is not enabled try retry mechanism till element gets enabled or you can use java script executer to enable the element.

On Thursday, August 25, 2016 at 2:45:18 PM UTC+5:30, Arun Vats wrote:
Hi All,

I am using TestNG in my framework and its working pretty well. Here I got a requirement where I need to execute kind of load using same framework. 
TestNG provides Thread-Count parameter where we can pass n number of thread to execute. Here what I did:

I have created a script and its working perfectly when running alone (tried running more than 20-30 times).
Now I have to run same script in parallel with 3 users. so What I did is 

<suite name="Suite1" parallel="tests" thread-count="3" >

<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
</suite>

Now When I execute it my scripts start getting failed at random step. I tried introducing wait statement (even hard sleep) but still getting exception "Unable to find element" where I can see page is loaded already.
Any suggestion please. 

Thanks
Arun Vats

--
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: TestNG Thread Count

Arun Vats
Hi Shiva,

All wait for element to be clickable are placed but still getting issue.

On Friday, 26 August 2016 19:10:33 UTC+5:30, Shiva Krishna wrote:
Hi Arun,

check if the element is enabled or not before you perform action on the WebElement, if element is enabled you can go a head and perform action. if element is not enabled try retry mechanism till element gets enabled or you can use java script executer to enable the element.

On Thursday, August 25, 2016 at 2:45:18 PM UTC+5:30, Arun Vats wrote:
Hi All,

I am using TestNG in my framework and its working pretty well. Here I got a requirement where I need to execute kind of load using same framework. 
TestNG provides Thread-Count parameter where we can pass n number of thread to execute. Here what I did:

I have created a script and its working perfectly when running alone (tried running more than 20-30 times).
Now I have to run same script in parallel with 3 users. so What I did is 

<suite name="Suite1" parallel="tests" thread-count="3" >

<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
</suite>

Now When I execute it my scripts start getting failed at random step. I tried introducing wait statement (even hard sleep) but still getting exception "Unable to find element" where I can see page is loaded already.
Any suggestion please. 

Thanks
Arun Vats

--
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: TestNG Thread Count

Panikera
What is exception you are getting, and what was your approach.

-Panikera


On Mon, Aug 29, 2016 at 9:50 AM, Arun Vats <[hidden email]> wrote:
Hi Shiva,

All wait for element to be clickable are placed but still getting issue.


On Friday, 26 August 2016 19:10:33 UTC+5:30, Shiva Krishna wrote:
Hi Arun,

check if the element is enabled or not before you perform action on the WebElement, if element is enabled you can go a head and perform action. if element is not enabled try retry mechanism till element gets enabled or you can use java script executer to enable the element.

On Thursday, August 25, 2016 at 2:45:18 PM UTC+5:30, Arun Vats wrote:
Hi All,

I am using TestNG in my framework and its working pretty well. Here I got a requirement where I need to execute kind of load using same framework. 
TestNG provides Thread-Count parameter where we can pass n number of thread to execute. Here what I did:

I have created a script and its working perfectly when running alone (tried running more than 20-30 times).
Now I have to run same script in parallel with 3 users. so What I did is 

<suite name="Suite1" parallel="tests" thread-count="3" >

<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
<test name="Reg1" >
<classes>      
      <class name="testCases.Test1" />
  </classes>
 
 </test>
</suite>

Now When I execute it my scripts start getting failed at random step. I tried introducing wait statement (even hard sleep) but still getting exception "Unable to find element" where I can see page is loaded already.
Any suggestion please. 

Thanks
Arun Vats

--
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.