Need to generate report on methods called by Test

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

Need to generate report on methods called by Test

shubhambindlish
Hi

I want to generate reports for each method invoked in my tests. Details like
start-time, end-time, name, status of the method etc.
Is there any way I can do the same using TestNG? Or do I use something else?

Shubham

--
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 http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Need to generate report on methods called by Test

Tomek Kaczanowski-3
Hi,

please read about listeners and reporters -
http://testng.org/doc/documentation-main.html#logging

I guess reporters are what you are after.


--
Regards / Pozdrawiam
Tomek Kaczanowski
http://practicalunittesting.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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Need to generate report on methods called by Test

shubhambindlish
Hi

Thanks for the reply. But I dont think reporters handle that case. Atleast I think they dont. 
Let me give you an example.

@Test
public void test(){
     test1();
     test2();
     test3();
}
now test is annotated with Test but test1, test2, test3 are not. 
And I want to print a report saying test1 started at this particular and ended at this particular time, and so on and so forth. 
Right now I get that test() details and not the methods invoked inside it. 
Any help in this matter?

Regards
Shubham

On Friday, January 25, 2013 11:37:07 PM UTC+5:30, Tomek Kaczanowski wrote:
Hi,

please read about listeners and reporters -
http://testng.org/doc/documentation-main.html#logging

I guess reporters are what you are after.


--
Regards / Pozdrawiam
Tomek Kaczanowski
http://practicalunittesting.com

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Need to generate report on methods called by Test

Tomek Kaczanowski-3
Hi,

> @Test
> public void test(){
>      test1();
>      test2();
>      test3();
> }

why do you have such a weird structure? Why test1, test2, test3 are
not separate test methods?

--
Regards / Pozdrawiam
Tomek Kaczanowski
http://practicalunittesting.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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Need to generate report on methods called by Test

shubhambindlish
Hi

This was just an example. Cant possibly make each and every method I invoke in my code as Test. 
Which is why I was looking for some way to get reports on the methods invoked by these Tests. 
Hence the weird structure in the example

Regards
Shubham

On Friday, January 25, 2013 11:54:00 PM UTC+5:30, Tomek Kaczanowski wrote:
Hi,

> @Test
> public void test(){
>      test1();
>      test2();
>      test3();
> }

why do you have such a weird structure? Why test1, test2, test3 are
not separate test methods?

--
Regards / Pozdrawiam
Tomek Kaczanowski
http://practicalunittesting.com

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.