No of times onTestStart will be called

62 views
Skip to first unread message

San

unread,
Nov 8, 2012, 8:38:29 AM11/8/12
to testng...@googlegroups.com
Hi,

Is there a way I can find how many times onTestStart will be called, basically I want to know how many total tests will get executed including the parameters 

regards,
San.

San

unread,
Nov 9, 2012, 4:11:57 AM11/9/12
to testng...@googlegroups.com
Hi,

My basic requirement is to know how many tests will be performed including the data provider after providing the testng.xml to TestNG object. Any hint will be appreciated. I'm a beginner here, so my question might sound rudimentary.

TestNG tng = new TestNG();
List<XmlSuite>  suites = (List<XmlSuite>) new Parser("testng.xml").parse();
tng.setXmlSuites(suites);

regards,
San

San

unread,
Dec 11, 2012, 5:04:55 AM12/11/12
to testng...@googlegroups.com
Could anybody please respond, is it possible to find the total no. of tests which will be executed by TestNG before the execution of tests start. I'm looking at the complete no including the  @DataProviders.

If possible, small snippet of code or hint on how it can achieved would be highly appreciated.

jeevan

unread,
Dec 11, 2012, 9:57:31 AM12/11/12
to testng...@googlegroups.com
I can give you a hint,Well with the help of reflection Class you can do it.
 
Thanks,
Jeevan
 

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/GEsWJMFSkDMJ.

To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

Cédric Beust ♔

unread,
Dec 11, 2012, 12:18:21 PM12/11/12
to testng...@googlegroups.com
No, it is not possible, if only because the only way to find out is to invoke each data provider and also instantiate each factory and then run them.


-- 
Cédric




--
You received this message because you are subscribed to the Google Groups "testng-users" group.

jeevan

unread,
Dec 11, 2012, 1:04:37 PM12/11/12
to testng...@googlegroups.com
I meant, we can count number of test cases with the help of Class reflector but not the other one.
 
Thanks,
Jeevan.

San

unread,
Dec 12, 2012, 9:05:14 AM12/12/12
to testng...@googlegroups.com
Hey Jeevan,

Could you please through more light how it can be done. Like some sample code from where I can start... Thanks in advance

regards,
San
Reply all
Reply to author
Forward
0 new messages