Reporter in @After... and @Before... methods

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

Reporter in @After... and @Before... methods

cytoe
 When I use @AfterMethod (or any other Before or After annotations) and there is no test failure, nothing shows up in the report.  When there is a test failure, it does show up on the report (good).  Is there a way to make these Before and After methods always show up in the report?  Perhaps have an alwaysReport=true attribute.

Thanks,
Ron

TestNG kicks ass btw.
Reply | Threaded
Open this post in threaded view
|

Re: Reporter in @After... and @Before... methods

Cédric Beust ♔
Hi Ron,

Can you be more specific?  What exactly would you like to see about the configuration methods in the reports?

--
Cedric


On 2/2/07, cytoe <[hidden email]> wrote:


When I use @AfterMethod (or any other Before or After annotations) and there
is no test failure, nothing shows up in the report.  When there is a test
failure, it does show up on the report (good).  Is there a way to make these
Before and After methods always show up in the report?  Perhaps have an
alwaysReport=true attribute.

Thanks,
Ron

TestNG kicks ass btw.
--
View this message in context: http://www.nabble.com/Reporter-in-%40After...-and-%40Before...-methods-tf3164290.html#a8777899
Sent from the testng-users mailing list archive at Nabble.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]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Reporter in @After... and @Before... methods

cytoe
I'd like to see the Before* and After* methods reported as the @Test methods are.  At the very least, the Reporter.log() calls should show up in the report.  I view these "configuration" methods the same as @Test methods...but with the the specific ordering behaviors.

Thanks,
Ron
Cédric Beust ♔ wrote
Hi Ron,

Can you be more specific?  What exactly would you like to see about the
configuration methods in the reports?

--
Cedric


On 2/2/07, cytoe <cytoe@msn.com> wrote:
>
>
>
> When I use @AfterMethod (or any other Before or After annotations) and
> there
> is no test failure, nothing shows up in the report.  When there is a test
> failure, it does show up on the report (good).  Is there a way to make
> these
> Before and After methods always show up in the report?  Perhaps have an
> alwaysReport=true attribute.
>
> Thanks,
> Ron
>
> TestNG kicks ass btw.
> --
> View this message in context:
> http://www.nabble.com/Reporter-in-%40After...-and-%40Before...-methods-tf3164290.html#a8777899
> Sent from the testng-users mailing list archive at Nabble.com.
>
>
> >
>


--
Cédric

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

Re: Reporter in @After... and @Before... methods

Alexandru Popescu ☀
Hi Ron!

I think this should work. I am wondering if you can send us a small
test reproducing the problem.

TIA,

./alex
--
.w( the_mindstorm )p.
  TestNG co-founder
EclipseTestNG Creator


On 2/4/07, cytoe <[hidden email]> wrote:

>
>
> I'd like to see the Before* and After* methods reported as the @Test methods
> are.  At the very least, the Reporter.log() calls should show up in the
> report.  I view these "configuration" methods the same as @Test
> methods...but with the the specific ordering behaviors.
>
> Thanks,
> Ron
>
> Cédric Beust ♔ wrote:
> >
> > Hi Ron,
> >
> > Can you be more specific?  What exactly would you like to see about the
> > configuration methods in the reports?
> >
> > --
> > Cedric
> >
> >
> > On 2/2/07, cytoe <[hidden email]> wrote:
> >>
> >>
> >>
> >> When I use @AfterMethod (or any other Before or After annotations) and
> >> there
> >> is no test failure, nothing shows up in the report.  When there is a test
> >> failure, it does show up on the report (good).  Is there a way to make
> >> these
> >> Before and After methods always show up in the report?  Perhaps have an
> >> alwaysReport=true attribute.
> >>
> >> Thanks,
> >> Ron
> >>
> >> TestNG kicks ass btw.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Reporter-in-%40After...-and-%40Before...-methods-tf3164290.html#a8777899
> >> Sent from the testng-users mailing list archive at Nabble.com.
> >>
> >>
> >> >
> >>
> >
> >
> > --
> > Cédric
> >
> > >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Reporter-in-%40After...-and-%40Before...-methods-tf3164290.html#a8795183
> Sent from the testng-users mailing list archive at Nabble.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]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Reporter in @After... and @Before... methods

cytoe
To clarify, the Reporter.log() entries are viewable via the "reporter output" link, but not via the "Results" link.  I think it should be in the Results report under passed tests (and marked as @After* or @Before*...just like it is if there is if this method fails) .  Here is a simple test case:

public class Test2 {

        @AfterMethod
        public void aftermethodtest() throws Exception {
                Reporter.log("in aftermethodtest");
        }

        @Test
        public void mytest1() throws Exception {
                Reporter.log("in mytest1");
        }

}

Thanks!
Ron

Alexandru Popescu-3 wrote
Hi Ron!

I think this should work. I am wondering if you can send us a small
test reproducing the problem.

TIA,

./alex
--
.w( the_mindstorm )p.
  TestNG co-founder
EclipseTestNG Creator


On 2/4/07, cytoe <cytoe@msn.com> wrote:
>
>
> I'd like to see the Before* and After* methods reported as the @Test methods
> are.  At the very least, the Reporter.log() calls should show up in the
> report.  I view these "configuration" methods the same as @Test
> methods...but with the the specific ordering behaviors.
>
> Thanks,
> Ron
>
> Cédric Beust ♔ wrote:
> >
> > Hi Ron,
> >
> > Can you be more specific?  What exactly would you like to see about the
> > configuration methods in the reports?
> >
> > --
> > Cedric
> >
> >
> > On 2/2/07, cytoe <cytoe@msn.com> wrote:
> >>
> >>
> >>
> >> When I use @AfterMethod (or any other Before or After annotations) and
> >> there
> >> is no test failure, nothing shows up in the report.  When there is a test
> >> failure, it does show up on the report (good).  Is there a way to make
> >> these
> >> Before and After methods always show up in the report?  Perhaps have an
> >> alwaysReport=true attribute.
> >>
> >> Thanks,
> >> Ron
> >>
> >> TestNG kicks ass btw.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Reporter-in-%40After...-and-%40Before...-methods-tf3164290.html#a8777899
> >> Sent from the testng-users mailing list archive at Nabble.com.
> >>
> >>
> >> >
> >>
> >
> >
> > --
> > Cédric
> >
> > >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Reporter-in-%40After...-and-%40Before...-methods-tf3164290.html#a8795183
> Sent from the testng-users mailing list archive at Nabble.com.
>
>
> >
>

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