TestNG Thread Count

91 views
Skip to first unread message

Arun Vats

unread,
Aug 25, 2016, 5:15:18 AM8/25/16
to testng-users
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

⇜Krishnan Mahadevan⇝

unread,
Aug 25, 2016, 11:56:16 PM8/25/16
to testng...@googlegroups.com
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/

--
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 testng-users+unsubscribe@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

Shiva Krishna

unread,
Aug 26, 2016, 9:40:33 AM8/26/16
to testng-users
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.

Arun Vats

unread,
Aug 29, 2016, 12:20:34 AM8/29/16
to testng-users
Hi Shiva,

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

Panikera Raj

unread,
Aug 29, 2016, 8:54:07 AM8/29/16
to testng...@googlegroups.com
What is exception you are getting, and what was your approach.

-Panikera


--
Reply all
Reply to author
Forward
0 new messages