emailable-report.html question

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

emailable-report.html question

David Ramer
I created my own reportFactory and setup an @override to generateReport. This all works fine. But I want to control the creation of the emailable-report.html? Once the emailable-report is created I change some of the headers and add my own content then email the report.

Is there a function call that generated the emailable-report.html?


@Override
public void generateReport(List<XmlSuite> xml, List<ISuite> suites, String outdir){
super.generateReport(xml, suites, outdir);
System.out.println("reportFactory was called to overwrite generateReport");


.
.
.
. custom code

--
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: emailable-report.html question

Krishnan Mahadevan
David,

and maybe even override the method : createWriter() to control the html generation.

Earlier it used to be EmailableReporter, but then as part of the commit [https://github.com/cbeust/testng/commit/c2b24f9f5cd4581a4b62c5fb65edcff7db9a5cec] I guess this is now changed to EmailableReporter2 as the default Emailable Reporting listener.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Mon, Apr 1, 2013 at 7:43 AM, David Ramer <[hidden email]> wrote:
I created my own reportFactory and setup an @override to generateReport. This all works fine. But I want to control the creation of the emailable-report.html? Once the emailable-report is created I change some of the headers and add my own content then email the report.

Is there a function call that generated the emailable-report.html?


@Override
public void generateReport(List<XmlSuite> xml, List<ISuite> suites, String outdir){
super.generateReport(xml, suites, outdir);
System.out.println("reportFactory was called to overwrite generateReport");


.
.
.
. custom code

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

--
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: emailable-report.html question

David Ramer
Thank you for the reply, Ive done just that, built my own reporter.

Thank you for the reply.



On Tuesday, April 2, 2013 12:15:05 AM UTC-7, Krishnan wrote:
David,

and maybe even override the method : createWriter() to control the html generation.

Earlier it used to be EmailableReporter, but then as part of the commit [https://github.com/cbeust/testng/commit/c2b24f9f5cd4581a4b62c5fb65edcff7db9a5cec] I guess this is now changed to EmailableReporter2 as the default Emailable Reporting listener.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Mon, Apr 1, 2013 at 7:43 AM, David Ramer <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="PtfWSuntCAcJ">david...@...> wrote:
I created my own reportFactory and setup an @override to generateReport. This all works fine. But I want to control the creation of the emailable-report.html? Once the emailable-report is created I change some of the headers and add my own content then email the report.

Is there a function call that generated the emailable-report.html?


@Override
public void generateReport(List<XmlSuite> xml, List<ISuite> suites, String outdir){
super.generateReport(xml, suites, outdir);
System.out.println("reportFactory was called to overwrite generateReport");


.
.
.
. custom code

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="PtfWSuntCAcJ">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="PtfWSuntCAcJ">testng...@....
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
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: emailable-report.html question

Jampani Jagadish
Hi David,

Could you please explain how did built your custom report using emailablereporter2.

Thanks
Jagadish

On Wednesday, 1 May 2013 17:30:57 UTC-7, David Ramer wrote:
Thank you for the reply, Ive done just that, built my own reporter.

Thank you for the reply.



On Tuesday, April 2, 2013 12:15:05 AM UTC-7, Krishnan wrote:
David,

and maybe even override the method : createWriter() to control the html generation.

Earlier it used to be EmailableReporter, but then as part of the commit [https://github.com/cbeust/testng/commit/c2b24f9f5cd4581a4b62c5fb65edcff7db9a5cec] I guess this is now changed to EmailableReporter2 as the default Emailable Reporting listener.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Mon, Apr 1, 2013 at 7:43 AM, David Ramer <[hidden email]> wrote:
I created my own reportFactory and setup an @override to generateReport. This all works fine. But I want to control the creation of the emailable-report.html? Once the emailable-report is created I change some of the headers and add my own content then email the report.

Is there a function call that generated the emailable-report.html?


@Override
public void generateReport(List<XmlSuite> xml, List<ISuite> suites, String outdir){
super.generateReport(xml, suites, outdir);
System.out.println("reportFactory was called to overwrite generateReport");


.
.
.
. custom code

--
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...@googlegroups.com.
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.
 
 

--
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.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: emailable-report.html question

shiva2191
hi David can you explain the how to change my emailable report using emailablereporter2.
I copy the emailablereporter2.java file in my project while running my testng suite I am calling the emailablereporter2.java file with help of listener but I am getting same old emailable-report file.can you help me
 
 

On Friday, October 11, 2013 at 10:51:58 AM UTC+5:30, Jagadish wrote:
Hi David,

Could you please explain how did built your custom report using emailablereporter2.

Thanks
Jagadish

On Wednesday, 1 May 2013 17:30:57 UTC-7, David Ramer wrote:
Thank you for the reply, Ive done just that, built my own reporter.

Thank you for the reply.



On Tuesday, April 2, 2013 12:15:05 AM UTC-7, Krishnan wrote:
David,
You may instead want to extend the EmailableReporter2 [ <a onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fcbeust%2Ftestng%2Fblob%2Fmaster%2Fsrc%2Fmain%2Fjava%2Forg%2Ftestng%2Freporters%2FEmailableReporter2.java\46sa\75D\46sntz\0751\46usg\75AFQjCNHeHtNVbLfMfwFBIfx36Qh2P0wcaQ';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fcbeust%2Ftestng%2Fblob%2Fmaster%2Fsrc%2Fmain%2Fjava%2Forg%2Ftestng%2Freporters%2FEmailableReporter2.java\46sa\75D\46sntz\0751\46usg\75AFQjCNHeHtNVbLfMfwFBIfx36Qh2P0wcaQ';return true;" href="https://github.com/cbeust/testng/blob/master/src/main/java/org/testng/reporters/EmailableReporter2.java" target="_blank" rel="nofollow">https://github.com/cbeust/testng/blob/master/src/main/java/org/testng/reporters/EmailableReporter2.java]

and maybe even override the method : createWriter() to control the html generation.

Earlier it used to be EmailableReporter, but then as part of the commit [<a onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fcbeust%2Ftestng%2Fcommit%2Fc2b24f9f5cd4581a4b62c5fb65edcff7db9a5cec\46sa\75D\46sntz\0751\46usg\75AFQjCNE8CA4m6tgjsjmtu4PumSMmcTCjuA';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fcbeust%2Ftestng%2Fcommit%2Fc2b24f9f5cd4581a4b62c5fb65edcff7db9a5cec\46sa\75D\46sntz\0751\46usg\75AFQjCNE8CA4m6tgjsjmtu4PumSMmcTCjuA';return true;" href="https://github.com/cbeust/testng/commit/c2b24f9f5cd4581a4b62c5fb65edcff7db9a5cec" target="_blank" rel="nofollow">https://github.com/cbeust/testng/commit/c2b24f9f5cd4581a4b62c5fb65edcff7db9a5cec] I guess this is now changed to EmailableReporter2 as the default Emailable Reporting listener.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Mon, Apr 1, 2013 at 7:43 AM, David Ramer <[hidden email]> wrote:
I created my own reportFactory and setup an @override to generateReport. This all works fine. But I want to control the creation of the emailable-report.html? Once the emailable-report is created I change some of the headers and add my own content then email the report.

Is there a function call that generated the emailable-report.html?


@Override
public void generateReport(List<XmlSuite> xml, List<ISuite> suites, String outdir){
super.generateReport(xml, suites, outdir);
System.out.println("reportFactory was called to overwrite generateReport");


.
.
.
. custom code

--
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...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a onmousedown="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;" onclick="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;" href="http://groups.google.com/group/testng-users?hl=en" target="_blank" rel="nofollow">http://groups.google.com/group/testng-users?hl=en.
For more options, visit <a onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;" href="https://groups.google.com/groups/opt_out" target="_blank" rel="nofollow">https://groups.google.com/groups/opt_out.
 
 

--
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.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: emailable-report.html question

Krishnan Mahadevan
Shiva,

Please take a look at my earlier response. You dont want to be copy pasting that entire class into your project. That is basically code duplication. Unless and until you are absolutely sure that you are causing a CLASSPATH override [ You do this by creating the same package as that of the EmailableReporter2 and then have this class in that package which contains your changes ] what you are essentially experiencing is a race condition perhaps between the two listeners. TestNG automatically invokes all of the default listeners and it also invokes the listener that you have provided via your service loader/xml file listeners tag/@Listeners annotation and the order of the listener invocation is never guaranteed.


What you should be doing is basically to extend the EmailableReporter2, override the specific method, disable the default listeners of TestNG and plug in your listener. That way you aren't duplicating code.




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 Fri, Mar 13, 2015 at 10:12 AM, Shiva Krishna <[hidden email]> wrote:
hi David can you explain the how to change my emailable report using emailablereporter2.
I copy the emailablereporter2.java file in my project while running my testng suite I am calling the emailablereporter2.java file with help of listener but I am getting same old emailable-report file.can you help me
 
 

On Friday, October 11, 2013 at 10:51:58 AM UTC+5:30, Jagadish wrote:
Hi David,

Could you please explain how did built your custom report using emailablereporter2.

Thanks
Jagadish

On Wednesday, 1 May 2013 17:30:57 UTC-7, David Ramer wrote:
Thank you for the reply, Ive done just that, built my own reporter.

Thank you for the reply.



On Tuesday, April 2, 2013 12:15:05 AM UTC-7, Krishnan wrote:
David,

and maybe even override the method : createWriter() to control the html generation.

Earlier it used to be EmailableReporter, but then as part of the commit [https://github.com/cbeust/testng/commit/c2b24f9f5cd4581a4b62c5fb65edcff7db9a5cec] I guess this is now changed to EmailableReporter2 as the default Emailable Reporting listener.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Mon, Apr 1, 2013 at 7:43 AM, David Ramer <[hidden email]> wrote:
I created my own reportFactory and setup an @override to generateReport. This all works fine. But I want to control the creation of the emailable-report.html? Once the emailable-report is created I change some of the headers and add my own content then email the report.

Is there a function call that generated the emailable-report.html?


@Override
public void generateReport(List<XmlSuite> xml, List<ISuite> suites, String outdir){
super.generateReport(xml, suites, outdir);
System.out.println("reportFactory was called to overwrite generateReport");


.
.
.
. custom code

--
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...@googlegroups.com.
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.
 
 

--
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.
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 http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.