@BeforeGroups/@AfterGroups oddities with JavaDoc

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

@BeforeGroups/@AfterGroups oddities with JavaDoc

gerhard-8

Hi Alex,

I tried to translate the sample
http://groups.google.com/group/testng-users/browse_thread/thread/6529b5ca5c199479
(@BeforeGroups/@AfterGroups oddities)
to JavaDoc notation, but I couldn't do it because the parameter
@testng.before-groups groups = "group-a" didn't work.
Here's my code:

public class Groups1Test {

        /**
          * @testng.before-groups groups = "group-a"
          */
        public void init(){
                System.out.println("Init Group1Test");
        }

        /**
          * @testng.after-groups groups = "group-a"
          */
        public void destroy(){
                System.out.println("Destroy Group1Test");
        }

        /**
          * @testng.test groups = "group-a"
          */
        public void test1(){
                System.out.println("Group1Test - test1");
        }

}

result at the console

[Parser] Running:

D:\eclipse\workspace\TestNG_Bugs_5_3\test\testng\groups\testng_GroupsTest.xml

Group1Test - test1
PASSED: test1

when I do it with class instead of groups   @testng.after-class groups
= "group-a"

the result is is OK:

Init Group1Test
Group1Test - test1
Destroy Group1Test
PASSED: test1


here's a list of all before / after parameters and the result:

@testng.before-suite groups = "group-a" OK
@testng.after-suite groups = "group-a" doesn't work

@testng.before-test groups = "group-a" OK
@testng.after-test groups = "group-a" doesn't work

@testng.before-groups groups = "group-a" doesn't work
@testng.after-groups groups = "group-a"  doesn't work

@testng.before-class groups = "group-a" OK
@testng.after-class groups = "group-a" OK

@testng.before-method groups = "group-a" OK
@testng.after-method groups = "group-a"  OK

Gerhard


--~--~---------~--~----~------------~-------~--~----~
 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: @BeforeGroups/@AfterGroups oddities with JavaDoc

Cédric Beust ♔


On 12/6/06, gerhard <[hidden email]> wrote:

Hi Alex,

I tried to translate the sample
http://groups.google.com/group/testng-users/browse_thread/thread/6529b5ca5c199479
(@BeforeGroups/@AfterGroups oddities)
to JavaDoc notation, but I couldn't do it because the parameter
@testng.before-groups groups = "group-a" didn't work.
Here's my code:

public class Groups1Test {

        /**
          * @testng.before-groups groups = "group-a"

This is the problem.  Use this instead:

          * @testng.before-groups value = "group-a" groups = "group-a"

In order for this annotation to work, it needs to
  • Belong to the group you are currently including (you specify this with groups) or it will be skipped by TestNG (this is what's currently happening to you)
  • Specify which group(s) it will run before (you specify this with value)
The syntax is a bit unfortunate, but I'm not quite sure how to avoid it...

--
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 [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: @BeforeGroups/@AfterGroups oddities with JavaDoc

Alexandru Popescu ☀
On 12/6/06, Cédric Beust ♔ <[hidden email]> wrote:

>
>
> On 12/6/06, gerhard <[hidden email]> wrote:
> >
> > Hi Alex,
> >
> > I tried to translate the sample
> >
> http://groups.google.com/group/testng-users/browse_thread/thread/6529b5ca5c199479
> > (@BeforeGroups/@AfterGroups oddities)
> > to JavaDoc notation, but I couldn't do it because the parameter
> > @testng.before-groups groups = "group-a" didn't work.
> > Here's my code:
> >
> > public class Groups1Test {
> >
> >         /**
> >           * @testng.before-groups groups = "group-a"
>
> This is the problem.  Use this instead:
>
>           * @testng.before-groups value = "group-a" groups = "group-a"
>
> In order for this annotation to work, it needs to
>
> Belong to the group you are currently including (you specify this with
> groups) or it will be skipped by TestNG (this is what's currently happening
> to you)
>
> Specify which group(s) it will run before (you specify this with value)The
> syntax is a bit unfortunate, but I'm not quite sure how to avoid it...
>

Thinking about this a bit: a don't see any good scenarios for which a
@Before/AfterGroups should not be included by default in the groups on
which it should apply. Can you see any? If no, then I guess we can
very easily change this behavior resulting into a more intuitive usage
imo.

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

> --
> 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 [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: @BeforeGroups/@AfterGroups oddities with JavaDoc

Cedric-20


Alexandru Popescu wrote:

> Thinking about this a bit: a don't see any good scenarios for which a
> @Before/AfterGroups should not be included by default in the groups on
> which it should apply. Can you see any? If no, then I guess we can
> very easily change this behavior resulting into a more intuitive usage
> imo.

Agreed.

--
Cedric


--~--~---------~--~----~------------~-------~--~----~
 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: @BeforeGroups/@AfterGroups oddities with JavaDoc

gerhard-8
In reply to this post by Cédric Beust ♔

Cédric Beust ♔  schrieb:

> On 12/6/06, gerhard <[hidden email]> wrote:
> >
> >
> > Hi Alex,
> >
> > I tried to translate the sample
> >
> > http://groups.google.com/group/testng-users/browse_thread/thread/6529b5ca5c199479
> > (@BeforeGroups/@AfterGroups oddities)
> > to JavaDoc notation, but I couldn't do it because the parameter
> > @testng.before-groups groups = "group-a" didn't work.
> > Here's my code:
> >
> > public class Groups1Test {
> >
> >         /**
> >           * @testng.before-groups groups = "group-a"
>
>
> This is the problem.  Use this instead:
>
>           * @testng.before-groups value = "group-a" groups = "group-a"
>
> In order for this annotation to work, it needs to
>
>    - Belong to the group you are currently including (you specify this
>    with groups) or it will be skipped by TestNG (this is what's currently
>    happening to you)
>    - Specify which group(s) it will run before (you specify this with
>    value)
>
> The syntax is a bit unfortunate, but I'm not quite sure how to avoid it...
>
> --
> Cédric
>
> ------=_Part_261_13983245.1165420425566
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 1646
>
> <br><br><div><span class="gmail_quote">On 12/6/06, <b class="gmail_sendername">gerhard</b> &lt;<a href="mailto:[hidden email]">[hidden email]</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> <br>Hi Alex,<br><br>I tried to translate the sample<br><a href="http://groups.google.com/group/testng-users/browse_thread/thread/6529b5ca5c199479">http://groups.google.com/group/testng-users/browse_thread/thread/6529b5ca5c199479
> </a><br>(@BeforeGroups/@AfterGroups oddities)<br>to JavaDoc notation, but I couldn't do it because the parameter<br>@testng.before-groups groups = &quot;group-a&quot; didn't work.<br>Here's my code:<br><br>public class Groups1Test {
> <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/**<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @testng.before-groups groups = &quot;group-a&quot;</blockquote><div><br>This is the problem.&nbsp; Use this instead:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * @testng.before-groups value = &quot;group-a&quot; groups = &quot;group-a&quot;
> <br>

this syntax also doesn't work, were's the code:

public class Groups1Test {

        /**
      * @testng.before-groups value = "group-a" groups = "group-a"
      */
        public void init(){
                System.out.println("Init Group1Test");
        }

        /**
     * @testng.after-groups value = "group-a" groups = "group-a"
     */
        public void destroy(){
                System.out.println("Destroy Group1Test");
        }

        /**
          * @testng.test groups = "group-a"
          */
        public void test1(){
                System.out.println("Group1Test - test1");
        }

        /**
          * @testng.test groups = "group-a"
          */
        public void test2(){
                System.out.println("Group1Test - test2");
        }

}

the testng.xml:
        <test name="GroupsTest">
                <groups>
                        <run>
                                <include name="group-a"/>
                        </run>
                </groups>
                <classes>
                        <class name="testng.groups.Groups1Test"/>
                </classes>
  </test>

and the result from the console:
Group1Test - test1
Group1Test - test2
PASSED: test1
PASSED: test2

I also tried this syntax:
     * @testng.before-groups = "group-a" groups = "group-a"
with the same result

> <br>In order for this annotation to work, it needs to<br><ul><li>Belong to the group you are currently including (you specify this with groups) or it will be skipped by TestNG (this is what's currently happening to you)<br>
> </li><li>Specify which group(s) it will run before (you specify this with value)</li></ul>The syntax is a bit unfortunate, but I'm not quite sure how to avoid it...<br></div></div><br>-- <br>Cédric<br><br>
>

I've also done some more tests with dependsOnGroups / dependsOnMethods.

Naming a non-existing method name at dependsOnMethods I got an
exception "testng.groups.Groups2Test.test11() is depending on
nonexistent method null"
doing the same with dependsOnGroups the test is skipped.

Is there a reason why these parameters work differently?

> ------=_Part_261_13983245.1165420425566--


--~--~---------~--~----~------------~-------~--~----~
 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: @BeforeGroups/@AfterGroups oddities with JavaDoc

Alexandru Popescu ☀
On 12/7/06, gerhard <[hidden email]> wrote:

>
> Cédric Beust ♔  schrieb:
>
> > On 12/6/06, gerhard <[hidden email]> wrote:
> > >
> > >
> > > Hi Alex,
> > >
> > > I tried to translate the sample
> > >
> > > http://groups.google.com/group/testng-users/browse_thread/thread/6529b5ca5c199479
> > > (@BeforeGroups/@AfterGroups oddities)
> > > to JavaDoc notation, but I couldn't do it because the parameter
> > > @testng.before-groups groups = "group-a" didn't work.
> > > Here's my code:
> > >
> > > public class Groups1Test {
> > >
> > >         /**
> > >           * @testng.before-groups groups = "group-a"
> >
> >
> > This is the problem.  Use this instead:
> >
> >           * @testng.before-groups value = "group-a" groups = "group-a"
> >
> > In order for this annotation to work, it needs to
> >
> >    - Belong to the group you are currently including (you specify this
> >    with groups) or it will be skipped by TestNG (this is what's currently
> >    happening to you)
> >    - Specify which group(s) it will run before (you specify this with
> >    value)
> >
> > The syntax is a bit unfortunate, but I'm not quite sure how to avoid it...
> >
> > --
> > Cédric
> >
> > ------=_Part_261_13983245.1165420425566
> > Content-Type: text/html; charset=ISO-8859-1
> > Content-Transfer-Encoding: quoted-printable
> > X-Google-AttachSize: 1646
> >
> > <br><br><div><span class="gmail_quote">On 12/6/06, <b class="gmail_sendername">gerhard</b> &lt;<a href="mailto:[hidden email]">[hidden email]</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> > <br>Hi Alex,<br><br>I tried to translate the sample<br><a href="http://groups.google.com/group/testng-users/browse_thread/thread/6529b5ca5c199479">http://groups.google.com/group/testng-users/browse_thread/thread/6529b5ca5c199479
> > </a><br>(@BeforeGroups/@AfterGroups oddities)<br>to JavaDoc notation, but I couldn't do it because the parameter<br>@testng.before-groups groups = &quot;group-a&quot; didn't work.<br>Here's my code:<br><br>public class Groups1Test {
> > <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/**<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @testng.before-groups groups = &quot;group-a&quot;</blockquote><div><br>This is the problem.&nbsp; Use this instead:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * @testng.before-groups value = &quot;group-a&quot; groups = &quot;group-a&quot;
> > <br>
>
> this syntax also doesn't work, were's the code:
>
> public class Groups1Test {
>
>         /**
>       * @testng.before-groups value = "group-a" groups = "group-a"
>       */
>         public void init(){
>                 System.out.println("Init Group1Test");
>         }
>
>         /**
>      * @testng.after-groups value = "group-a" groups = "group-a"
>      */
>         public void destroy(){
>                 System.out.println("Destroy Group1Test");
>         }
>
>         /**
>           * @testng.test groups = "group-a"
>           */
>         public void test1(){
>                 System.out.println("Group1Test - test1");
>         }
>
>         /**
>           * @testng.test groups = "group-a"
>           */
>         public void test2(){
>                 System.out.println("Group1Test - test2");
>         }
>
> }
>
> the testng.xml:
>         <test name="GroupsTest">
>                 <groups>
>                         <run>
>                                 <include name="group-a"/>
>                         </run>
>                 </groups>
>                 <classes>
>                         <class name="testng.groups.Groups1Test"/>
>                 </classes>
>         </test>
>
> and the result from the console:
> Group1Test - test1
> Group1Test - test2
> PASSED: test1
> PASSED: test2
>
> I also tried this syntax:
>      * @testng.before-groups = "group-a" groups = "group-a"
> with the same result
>
> > <br>In order for this annotation to work, it needs to<br><ul><li>Belong to the group you are currently including (you specify this with groups) or it will be skipped by TestNG (this is what's currently happening to you)<br>
> > </li><li>Specify which group(s) it will run before (you specify this with value)</li></ul>The syntax is a bit unfortunate, but I'm not quite sure how to avoid it...<br></div></div><br>-- <br>Cédric<br><br>
> >
>
> I've also done some more tests with dependsOnGroups / dependsOnMethods.
>
> Naming a non-existing method name at dependsOnMethods I got an
> exception "testng.groups.Groups2Test.test11() is depending on
> nonexistent method null"
> doing the same with dependsOnGroups the test is skipped.
>
> Is there a reason why these parameters work differently?
>

I was looking last night on the code and I was getting the impression
that for javadoc annotations the attributes would be before-groups and
after-groups, but I am not yet sure. However, in the next release
specifying only the groups will be enough.

On the other matter: the method dependency is seen as a strict
dependency while group dependency is  a weak dependency. The behavior
you are seeing is the correct one (except the method null part :-) ).

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

--~--~---------~--~----~------------~-------~--~----~
 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: @BeforeGroups/@AfterGroups oddities with JavaDoc

Alexandru Popescu ☀
In reply to this post by Cedric-20

On 12/7/06, Cedric <[hidden email]> wrote:

>
>
> Alexandru Popescu wrote:
>
> > Thinking about this a bit: a don't see any good scenarios for which a
> > @Before/AfterGroups should not be included by default in the groups on
> > which it should apply. Can you see any? If no, then I guess we can
> > very easily change this behavior resulting into a more intuitive usage
> > imo.
>
> Agreed.
>

Done in SVN trunk v271. Please give it a try.

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

> --
> Cedric
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
 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: @BeforeGroups/@AfterGroups oddities with JavaDoc

gerhard-8

Alexandru Popescu wrote:

> On 12/7/06, Cedric <[hidden email]> wrote:
> >
> >
> > Alexandru Popescu wrote:
> >
> > > Thinking about this a bit: a don't see any good scenarios for which a
> > > @Before/AfterGroups should not be included by default in the groups on
> > > which it should apply. Can you see any? If no, then I guess we can
> > > very easily change this behavior resulting into a more intuitive usage
> > > imo.
> >
> > Agreed.
> >
>
> Done in SVN trunk v271. Please give it a try.
>
> ./alex
> --
> .w( the_mindstorm )p.
>   TestNG co-founder
> EclipseTestNG Creator
>
> > --
> > Cedric
> >
> >
> > >
> >



Hi Alex,


I've done the tests with the version 5.4 again, but it's still the same
result as in V5.3, several thinks doesn't work?!

@testng.before-suite groups = "group-a" OK
@testng.after-suite groups = "group-a"   doesn't work

@testng.before-test groups = "group-a" OK
@testng.after-test groups = "group-a" doesn't work

@testng.before-groups groups = "group-a" doesn't work
@testng.after-groups groups = "group-a" doesn't work

@testng.before-class groups = "group-a" OK
@testng.after-class groups = "group-a" OK

@testng.before-method groups = "group-a" OK
@testng.after-method groups = "group-a"   OK

Gerhard


--~--~---------~--~----~------------~-------~--~----~
 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: @BeforeGroups/@AfterGroups oddities with JavaDoc

Bill Michell-3


On 20/12/06, gerhard <[hidden email]> wrote:

I've done the tests with the version 5.4 again, but it's still the same
result as in V5.3, several thinks doesn't work?!
 
 
The changes aren't yet in a released version - they were made after 5.4.0 was released. They should be in the next release (5.4.1 or 5.5.0 - whichever one comes next) if you can wait that long. Otherwise, there are ways to get the latest unreleased code if you need that earlier. Just ask!
 



--
[hidden email]
--~--~---------~--~----~------------~-------~--~----~
 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: @BeforeGroups/@AfterGroups oddities with JavaDoc

Alexandru Popescu ☀

On 12/20/06, Bill Michell <[hidden email]> wrote:

>
>
>
> On 20/12/06, gerhard <[hidden email]> wrote:
> >
> > I've done the tests with the version 5.4 again, but it's still the same
> > result as in V5.3, several thinks doesn't work?!
>
>
>  The changes aren't yet in a released version - they were made after 5.4.0
> was released. They should be in the next release (5.4.1 or 5.5.0 - whichever
> one comes next) if you can wait that long. Otherwise, there are ways to get
> the latest unreleased code if you need that earlier. Just ask!
>
>

Are you sure about this? I think they got in the 5.4 according to:

Added: for @BeforeGroups and @AfterGroups specifying the groups()
attribute will auto-include the method into those groups by default
(previously you had to also provide the value() attribute).

I will recheck the posted test and get back to you.

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

>
> --
> [hidden email]
>
>  >
>

--~--~---------~--~----~------------~-------~--~----~
 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: @BeforeGroups/@AfterGroups oddities with JavaDoc

Alexandru Popescu ☀

I have used the TestNG 5.4 distro against the following code:

[code]
package testng.groupsannotation;


/**
 * This class/interface
 */
public class GroupsAnnotationUsageTest {
  /**
   * @testng.before-suite groups="group-a"
   *
   */
  public void beforeSuite() {
    System.out.println("beforeSuite");
  }

  /**
   * @testng.before-test groups="group-a"
   *
   */
  public void beforeTest() {
    System.out.println("beforeTest");
  }

  /**
   * @testng.before-groups groups="group-a"
   *
   */
  public void beforeGroups() {
    System.out.println("beforeGroups");
  }

  /**
   * @testng.before-class groups="group-a"
   *
   */
  public void beforeClass() {
    System.out.println("beforeClass");
  }

  /**
   * @testng.before-method groups="group-a"
   *
   */
  public void beforeMethod() {
    System.out.println("beforeMethod");
  }

  /**
    * @testng.test groups = "group-a"
    */
  public void test1(){
    System.out.println("Group1Test - test1");
  }

  /**
   * @testng.test groups="group-a"
   *
   */
  public void test2() {
    System.out.println("GroupTest - test2");
  }

  /**
   * @testng.after-method groups="group-a"
   */
  public void afterMethod() {
    System.out.println("afterMethod");
  }

  /**
   * @testng.after-class groups="group-a"
   */
  public void afterClass() {
    System.out.println("afterClass");
  }

  /**
   * @testng.after-groups groups="group-a"
   *
   */
  public void afterGroups() {
    System.out.println("afterGroups");
  }

  /**
   * @testng.after-test groups="group-a"
   *
   */
  public void afterTest() {
    System.out.println("afterTest");
  }

  /**
   * @testng.after-suite groups="group-a"
   *
   */
  public void afterSuite() {
    System.out.println("afterSuite");
  }
}
[/code]
 and the suite:

[code]
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Grouping method invocation" verbose="1" annotations="javadoc">
        <test name="Groups Run">
                <groups>
                        <run>
                                <include name="group-a" />
                        </run>
                </groups>
                <classes>
                        <class name="testng.groupsannotation.GroupsAnnotationUsageTest" />
                </classes>
        </test>
</suite>
[/code]

with the command line:


java -cp testng-5.4-jdk15.jar;z_build org.testng.TestNG -sourcedir
test-14\src test-14\src\testng\groupsannotation\testng.xml

(used the 1.5 jar because of the fact I haven't got a javac 1.4
compiler on this machine at the moment). The output is exactly what I
have expected:

beforeSuite
beforeTest
beforeClass
beforeGroups
beforeMethod
Group1Test - test1
afterMethod
beforeMethod
GroupTest - test2
afterMethod
afterGroups
afterClass
afterTest
afterSuite

So, what problem do you see?

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

--~--~---------~--~----~------------~-------~--~----~
 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: @BeforeGroups/@AfterGroups oddities with JavaDoc

gerhard-8



Hi Alex,

and that's my result running running your code with J2re1.4.2_09:

[Parser] Running:

D:\55_eclipse\workspace\TestNG\test\testng\groups2\testng_Groups2Test.xml

beforeSuite
beforeTest
beforeClass
beforeMethod
GroupTest - test2
afterMethod
beforeMethod
Group1Test - test1
afterMethod
afterClass
PASSED: test2
PASSED: test1

===============================================
    GroupsTest
    Tests run: 2, Failures: 0, Skips: 0
===============================================

afterTest
afterSuite

===============================================
GroupsTestSuite
Total tests run: 2, Failures: 0, Skips: 0
===============================================

beforeGroups and afterGroups are missing???

Gerhard


--~--~---------~--~----~------------~-------~--~----~
 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: @BeforeGroups/@AfterGroups oddities with JavaDoc

Alexandru Popescu ☀

Unfortunately I don't know what to say as I have tried it now with
JDK1.4.2_13 and it works fine. Can you please check that you don't
have an older version in your classpath?

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


On 12/20/06, gerhard <[hidden email]> wrote:

>
>
>
> Hi Alex,
>
> and that's my result running running your code with J2re1.4.2_09:
>
> [Parser] Running:
>
> D:\55_eclipse\workspace\TestNG\test\testng\groups2\testng_Groups2Test.xml
>
> beforeSuite
> beforeTest
> beforeClass
> beforeMethod
> GroupTest - test2
> afterMethod
> beforeMethod
> Group1Test - test1
> afterMethod
> afterClass
> PASSED: test2
> PASSED: test1
>
> ===============================================
>     GroupsTest
>     Tests run: 2, Failures: 0, Skips: 0
> ===============================================
>
> afterTest
> afterSuite
>
> ===============================================
> GroupsTestSuite
> Total tests run: 2, Failures: 0, Skips: 0
> ===============================================
>
> beforeGroups and afterGroups are missing???
>
> Gerhard
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
 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: @BeforeGroups/@AfterGroups oddities with JavaDoc

gerhard-8

Alex,

you're right. I've done the test directly from the command line and I
got the same result. In my origin classpath I had some IBM-libraries
included. Maybe I can find out with lib made these differences.

Gerhard


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