sequential

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

sequential

Neil-34

Let's say I have one group

test_group_1

For each of the test classes that belong to this group I would like the
methods to be run in the order they are listed in the file e.g.

class first_test {

    @Test...
    my_method1

    @Test...
    my_method2

    @Test...
    my_method3
}

I would like the chronology during testing to always be

    my_method1
    my_method2
    my_method3

When I use the sequential=true annotation on the top of a given test
class it does not cause this to happen.

I can use the dependsOnMethods as follows:

class first_test {

    @Test...
    my_method1

    @Test...dependsOnMethods="my_method1"
    my_method2

    @Test...dependsOnMethods="my_method2"
    my_method3
}

But the problem is that since the test classes all belong to the same
group, the same method names can override each other from different
classes and cause really strange behavior which causes my tests to
fail.

I know you've probably come across this issue before -- what is the
best solution in this case?

Thanks,

Neil


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

Cédric Beust ♔
Hi Neil,

Can you post real code instead of pseudo code?  Since the problem you are seeing seems to be connected to method and group names, it would help us to have code that we can compile.

Thanks.

--
Cédric


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

Let's say I have one group

test_group_1

For each of the test classes that belong to this group I would like the
methods to be run in the order they are listed in the file e.g.

class first_test {

    @Test...
    my_method1

    @Test...
    my_method2

    @Test...
    my_method3
}

I would like the chronology during testing to always be

    my_method1
    my_method2
    my_method3

When I use the sequential=true annotation on the top of a given test
class it does not cause this to happen.

I can use the dependsOnMethods as follows:

class first_test {

    @Test...
    my_method1

    @Test...dependsOnMethods="my_method1"
    my_method2

    @Test...dependsOnMethods="my_method2"
    my_method3
}

But the problem is that since the test classes all belong to the same
group, the same method names can override each other from different
classes and cause really strange behavior which causes my tests to
fail.

I know you've probably come across this issue before -- what is the
best solution in this case?

Thanks,

Neil








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

Neil-34

Hi C�dric,

I'm did a mock-up of my tests.  Create a directory test and put the
following files in it and the latest testng jar in the directory and
run 'ant'  (I'm using version 1.6.5)


****Start build.xml*****

<project name="test" basedir="." default="run_tests">

        <path id="test.classpath">
                <pathelement location="${basedir}/classes"/>
                <pathelement location="${basedir}/testng-5.4-jdk15.jar"/>
        </path>

          <property name="thirdparty.testng"
value="${basedir}/testng-5.4-jdk15.jar"/>
          <taskdef resource="testngtasks" classpath="${thirdparty.testng}"/>

<target name="run_tests">
        <delete dir="${basedir}/classes"/>
        <mkdir dir="${basedir}/classes"/>

        <javac srcdir="${basedir}" debug="on" deprecation="on"
destdir="${basedir}/classes" classpathref="test.classpath"/>

        <testng classpathref="test.classpath"
                outputDir="${basedir}/classes"
                haltOnfailure="true"
                suitename="tests"
                testname="the_tests"
                groups="the_tests"
                parallel="false">
                <classfileset dir="${basedir}/classes" includes="**/*.class"/>
        </testng>

</target>

</project>

***End build.xml****


***Start test1.java *****

import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;


public class test1 {


        @BeforeClass(groups = { "the_tests" })
        public void test1_setUp() {
                System.out.println("test1 - setUp");
        }

        @Test(groups = { "the_tests" })
        public void test1_2() throws Exception {
                System.out.println("test1 - 2");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods= {"test1_2"})
        public void test1_3() {
                System.out.println("test1 - 3");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods={"test1_3"})
        public void test1_4() {
                System.out.println("test1 - 4");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods={"test1_4"})
        public void test1_5()  {
                System.out.println("test1 - 5");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods={"test1_5"})
        public void test1_6()  {
                System.out.println("test1 - 6");
        }

}

*** End test1.java

*** start test2.java

import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;


public class test2 {


        @BeforeClass(groups = { "the_tests" })
        public void test2_setUp()  {
                System.out.println("test2 - setUp");
        }

        @Test(groups = { "the_tests" })
        public void test2_2()  {
                System.out.println("test2 - 2");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods={"test2_2"})
        public void test2_3()  {
                System.out.println("test2 - 3");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods={"test2_3"})
        public void test2_4()  {
                System.out.println("test2 - 4");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods={"test2_4"})
        public void test2_5()  {
                System.out.println("test2 - 5");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods={"test2_5"})
        public void test2_6()  {
                System.out.println("test2 - 6");
        }

}

*** end test2.java

*** start test3.java

import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;


public class test3 {


        @BeforeClass(groups = { "the_tests" })
        public void test3_setUp()  {
                System.out.println("test3 - setUp");
        }

        @Test(groups = { "the_tests" })
        public void test3_2()  {
                System.out.println("test3 - 2");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods={"test3_2"})
        public void test3_3()  {
                System.out.println("test3 - 3");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods={"test3_3"})
        public void test3_4()  {
                System.out.println("test3 - 4");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods={"test3_4"})
        public void test3_5()  {
                System.out.println("test3 - 5");
        }


        @Test(groups = { "the_tests" }, dependsOnMethods={"test3_5"})
        public void test3_6()  {
                System.out.println("test3 - 6");
        }

}

*** end test3.java

This is the output I get when I run the tests:

[testng] [Parser] Running:
   [testng]   tests

   [testng] test2 - setUp
   [testng] test2 - 2
   [testng] test1 - setUp
   [testng] test1 - 2
   [testng] test1 - 3
   [testng] test1 - 4
   [testng] test2 - 3
   [testng] test2 - 4
   [testng] test2 - 5
   [testng] test1 - 5
   [testng] test1 - 6
   [testng] test3 - setUp
   [testng] test3 - 2
   [testng] test3 - 3
   [testng] test3 - 4
   [testng] test3 - 5
   [testng] test3 - 6
   [testng] test2 - 6

   [testng] ===============================================
   [testng] tests
   [testng] Total tests run: 15, Failures: 0, Skips: 0
   [testng] ===============================================


If I add @Test (sequential=true) to the top of each class then it runs
fine.

If I add @Test (sequential=true) and remove all dependsOnMethods
references it runs strange

[testng] test2 - setUp
   [testng] test2 - 4
   [testng] test2 - 5
   [testng] test2 - 2
   [testng] test2 - 3
   [testng] test2 - 6
   [testng] test3 - setUp
   [testng] test3 - 5
   [testng] test3 - 4
   [testng] test3 - 3
   [testng] test3 - 6
   [testng] test3 - 2
   [testng] test1 - setUp
   [testng] test1 - 4
   [testng] test1 - 3
   [testng] test1 - 6
   [testng] test1 - 2
   [testng] test1 - 5

   [testng] ===============================================
   [testng] tests
   [testng] Total tests run: 15, Failures: 0, Skips: 0
   [testng] ===============================================




Thanks,

Neil

On Jan 2, 9:34 am, "C�dric Beust   " <[hidden email]> wrote:

> Hi Neil,
>
> Can you post real code instead of pseudo code?  Since the problem you are
> seeing seems to be connected to method and group names, it would help us to
> have code that we can compile.
>
> Thanks.
>
> --
> C�dric
>
> On 1/2/07, Neil <[hidden email]> wrote:
>
>
>
> > Let's say I have one group
>
> > test_group_1
>
> > For each of the test classes that belong to this group I would like the
> > methods to be run in the order they are listed in the file e.g.
>
> > class first_test {
>
> >     @Test...
> >     my_method1
>
> >     @Test...
> >     my_method2
>
> >     @Test...
> >     my_method3
> > }
>
> > I would like the chronology during testing to always be
>
> >     my_method1
> >     my_method2
> >     my_method3
>
> > When I use the sequential=true annotation on the top of a given test
> > class it does not cause this to happen.
>
> > I can use the dependsOnMethods as follows:
>
> > class first_test {
>
> >     @Test...
> >     my_method1
>
> >     @Test...dependsOnMethods="my_method1"
> >     my_method2
>
> >     @Test...dependsOnMethods="my_method2"
> >     my_method3
> > }
>
> > But the problem is that since the test classes all belong to the same
> > group, the same method names can override each other from different
> > classes and cause really strange behavior which causes my tests to
> > fail.
>
> > I know you've probably come across this issue before -- what is the
> > best solution in this case?
>
> > Thanks,
>
> > Neil


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

Cédric Beust ♔


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


This is the output I get when I run the tests:

[testng] [Parser] Running:
   [testng]   tests

   [testng] test2 - setUp
   [testng] test2 - 2
   [testng] test1 - setUp
   [testng] test1 - 2
   [testng] test1 - 3
   [testng] test1 - 4
   [testng] test2 - 3
   [testng] test2 - 4
   [testng] test2 - 5
   [testng] test1 - 5
   [testng] test1 - 6
   [testng] test3 - setUp
   [testng] test3 - 2
   [testng] test3 - 3
   [testng] test3 - 4
   [testng] test3 - 5
   [testng] test3 - 6
   [testng] test2 - 6

   [testng] ===============================================
   [testng] tests
   [testng] Total tests run: 15, Failures: 0, Skips: 0
   [testng] ===============================================


If I add @Test (sequential=true) to the top of each class then it runs
fine.

Can you explain what's wrong with the above output?

--
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: sequential

Neil-34

Hi C�dric,

It could be I'm unfamiliar with the how the tool works.

With all the runs I am expecting...

[testng] test1 - setUp
   [testng] test1 - 2
   [testng] test1 - 3
   [testng] test1 - 4
   [testng] test1 - 5
   [testng] test1 - 6
[testng] test2 - setUp
   [testng] test2 - 2
   [testng] test2 - 3
   [testng] test2 - 4
   [testng] test2 - 5
   [testng] test2 - 6
[testng] test3 - setUp
   [testng] test3 - 2
   [testng] test3 - 3
   [testng] test3 - 4
   [testng] test3 - 5
   [testng] test3 - 6

where test1, test2, and test3 are in no particular order but the
methods that are executed are always in order setup,2,3,4,5,6

Thanks,

Neil

On Jan 2, 10:58 am, "C�dric Beust   " <[hidden email]> wrote:

> On 1/2/07, Neil <[hidden email]> wrote:
>
>
>
>
>
> > This is the output I get when I run the tests:
>
> > [testng] [Parser] Running:
> >    [testng]   tests
>
> >    [testng] test2 - setUp
> >    [testng] test2 - 2
> >    [testng] test1 - setUp
> >    [testng] test1 - 2
> >    [testng] test1 - 3
> >    [testng] test1 - 4
> >    [testng] test2 - 3
> >    [testng] test2 - 4
> >    [testng] test2 - 5
> >    [testng] test1 - 5
> >    [testng] test1 - 6
> >    [testng] test3 - setUp
> >    [testng] test3 - 2
> >    [testng] test3 - 3
> >    [testng] test3 - 4
> >    [testng] test3 - 5
> >    [testng] test3 - 6
> >    [testng] test2 - 6
>
> >    [testng] ===============================================
> >    [testng] tests
> >    [testng] Total tests run: 15, Failures: 0, Skips: 0
> >    [testng] ===============================================
>
> > If I add @Test (sequential=true) to the top of each class then it runs
> > fine.Can you explain what's wrong with the above output?
>
> --
> 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: sequential

Cédric Beust ♔
Neil,

The only guarantee is that @Before methods are invoked "at some point" before the first test invocation.  Depending on how your tests are structured, it's quite possible that other methods will be invoked between your @Before and @Test method, so TestNG cannot guarantee that they will be invoked right next to each other.

If it's really important to have your @Before and @Test methods invoked right next to each other, you should probably move your @Before method to a @Test and use dependsOnMethods, although in theory, it's still possible to see other methods inserted there as well (much less likely, though).

My question to you is:  do you have a good reason to want your @Before and @Test methods invoked next to each other?

--
Cedric


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

Hi C dric,

It could be I'm unfamiliar with the how the tool works.

With all the runs I am expecting...

[testng] test1 - setUp
   [testng] test1 - 2
   [testng] test1 - 3
   [testng] test1 - 4
   [testng] test1 - 5
   [testng] test1 - 6
[testng] test2 - setUp
   [testng] test2 - 2
   [testng] test2 - 3
   [testng] test2 - 4
   [testng] test2 - 5
   [testng] test2 - 6
[testng] test3 - setUp
   [testng] test3 - 2
   [testng] test3 - 3
   [testng] test3 - 4
   [testng] test3 - 5
   [testng] test3 - 6

where test1, test2, and test3 are in no particular order but the
methods that are executed are always in order setup,2,3,4,5,6

Thanks,

Neil

On Jan 2, 10:58 am, "C dric Beust   " <[hidden email]> wrote:

> On 1/2/07, Neil <[hidden email]> wrote:
>
>
>
>
>
> > This is the output I get when I run the tests:
>
> > [testng] [Parser] Running:
> >    [testng]   tests
>
> >    [testng] test2 - setUp
> >    [testng] test2 - 2
> >    [testng] test1 - setUp
> >    [testng] test1 - 2
> >    [testng] test1 - 3
> >    [testng] test1 - 4
> >    [testng] test2 - 3
> >    [testng] test2 - 4
> >    [testng] test2 - 5
> >    [testng] test1 - 5
> >    [testng] test1 - 6
> >    [testng] test3 - setUp
> >    [testng] test3 - 2
> >    [testng] test3 - 3
> >    [testng] test3 - 4
> >    [testng] test3 - 5
> >    [testng] test3 - 6
> >    [testng] test2 - 6
>
> >    [testng] ===============================================
> >    [testng] tests
> >    [testng] Total tests run: 15, Failures: 0, Skips: 0
> >    [testng] ===============================================
>
> > If I add @Test (sequential=true) to the top of each class then it runs
> > fine.Can you explain what's wrong with the above output?
>
> --
> C dric







--
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: sequential

Neil-34

Cedric,

I do have a good reason for the @Before and @Test to be invoked next to
each other.  I need to clean out and populate database tables for the
given test.  The problem is that different test classes use the same
tables.

I don't mind changing the @Before annotation to @Test and putting a
dependsOnMethods, but why is that the only way I can get the
setup,2,3,4,5,6 order is by having both the sequential=true and
dependsOnMethods set for every method?

Neil


On Jan 2, 11:11 am, "C�dric Beust   " <[hidden email]> wrote:

> Neil,
>
> The only guarantee is that @Before methods are invoked "at some point"
> before the first test invocation.  Depending on how your tests are
> structured, it's quite possible that other methods will be invoked between
> your @Before and @Test method, so TestNG cannot guarantee that they will be
> invoked right next to each other.
>
> If it's really important to have your @Before and @Test methods invoked
> right next to each other, you should probably move your @Before method to a
> @Test and use dependsOnMethods, although in theory, it's still possible to
> see other methods inserted there as well (much less likely, though).
>
> My question to you is:  do you have a good reason to want your @Before and
> @Test methods invoked next to each other?
>
> --
> Cedric
>
> On 1/2/07, Neil <[hidden email]> wrote:
>
>
>
>
>
> > Hi C dric,
>
> > It could be I'm unfamiliar with the how the tool works.
>
> > With all the runs I am expecting...
>
> > [testng] test1 - setUp
> >    [testng] test1 - 2
> >    [testng] test1 - 3
> >    [testng] test1 - 4
> >    [testng] test1 - 5
> >    [testng] test1 - 6
> > [testng] test2 - setUp
> >    [testng] test2 - 2
> >    [testng] test2 - 3
> >    [testng] test2 - 4
> >    [testng] test2 - 5
> >    [testng] test2 - 6
> > [testng] test3 - setUp
> >    [testng] test3 - 2
> >    [testng] test3 - 3
> >    [testng] test3 - 4
> >    [testng] test3 - 5
> >    [testng] test3 - 6
>
> > where test1, test2, and test3 are in no particular order but the
> > methods that are executed are always in order setup,2,3,4,5,6
>
> > Thanks,
>
> > Neil
>
> > On Jan 2, 10:58 am, "C dric Beust   " <[hidden email]> wrote:
> > > On 1/2/07, Neil <[hidden email]> wrote:
>
> > > > This is the output I get when I run the tests:
>
> > > > [testng] [Parser] Running:
> > > >    [testng]   tests
>
> > > >    [testng] test2 - setUp
> > > >    [testng] test2 - 2
> > > >    [testng] test1 - setUp
> > > >    [testng] test1 - 2
> > > >    [testng] test1 - 3
> > > >    [testng] test1 - 4
> > > >    [testng] test2 - 3
> > > >    [testng] test2 - 4
> > > >    [testng] test2 - 5
> > > >    [testng] test1 - 5
> > > >    [testng] test1 - 6
> > > >    [testng] test3 - setUp
> > > >    [testng] test3 - 2
> > > >    [testng] test3 - 3
> > > >    [testng] test3 - 4
> > > >    [testng] test3 - 5
> > > >    [testng] test3 - 6
> > > >    [testng] test2 - 6
>
> > > >    [testng] ===============================================
> > > >    [testng] tests
> > > >    [testng] Total tests run: 15, Failures: 0, Skips: 0
> > > >    [testng] ===============================================
>
> > > > If I add @Test (sequential=true) to the top of each class then it runs
> > > > fine.Can you explain what's wrong with the above output?
>
> > > --
> > > C dric--
> 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: sequential

Cédric Beust ♔
Neil,

The following testng.xml will guarantee a better isolation of your tests:

  <test name="T1">
    <classes>
      <class name="test.tmp.Test1" />
    </classes>
  </test>

  <test name="T2">
    <classes>
      <class name="test.tmp.Test2" />
    </classes>
  </test>
 
  <test name="T3">
    <classes>
      <class name="test.tmp.Test3" />
    </classes>
  </test>

--
Cedric



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

Cedric,

I do have a good reason for the @Before and @Test to be invoked next to
each other.  I need to clean out and populate database tables for the
given test.  The problem is that different test classes use the same
tables.

I don't mind changing the @Before annotation to @Test and putting a
dependsOnMethods, but why is that the only way I can get the
setup,2,3,4,5,6 order is by having both the sequential=true and
dependsOnMethods set for every method?

Neil


On Jan 2, 11:11 am, "C dric Beust   " <[hidden email]> wrote:

> Neil,
>
> The only guarantee is that @Before methods are invoked "at some point"
> before the first test invocation.  Depending on how your tests are
> structured, it's quite possible that other methods will be invoked between
> your @Before and @Test method, so TestNG cannot guarantee that they will be
> invoked right next to each other.
>
> If it's really important to have your @Before and @Test methods invoked
> right next to each other, you should probably move your @Before method to a
> @Test and use dependsOnMethods, although in theory, it's still possible to

> see other methods inserted there as well (much less likely, though).
>
> My question to you is:  do you have a good reason to want your @Before and
> @Test methods invoked next to each other?
>
> --
> Cedric
>
> On 1/2/07, Neil <[hidden email]> wrote:
>
>
>

>
>
> > Hi C dric,
>
> > It could be I'm unfamiliar with the how the tool works.
>
> > With all the runs I am expecting...
>
> > [testng] test1 - setUp
> >    [testng] test1 - 2
> >    [testng] test1 - 3
> >    [testng] test1 - 4
> >    [testng] test1 - 5
> >    [testng] test1 - 6
> > [testng] test2 - setUp
> >    [testng] test2 - 2
> >    [testng] test2 - 3
> >    [testng] test2 - 4
> >    [testng] test2 - 5
> >    [testng] test2 - 6
> > [testng] test3 - setUp
> >    [testng] test3 - 2
> >    [testng] test3 - 3
> >    [testng] test3 - 4
> >    [testng] test3 - 5
> >    [testng] test3 - 6
>
> > where test1, test2, and test3 are in no particular order but the
> > methods that are executed are always in order setup,2,3,4,5,6
>
> > Thanks,
>
> > Neil
>
> > On Jan 2, 10:58 am, "C dric Beust   " <[hidden email]> wrote:
> > > On 1/2/07, Neil < [hidden email]> wrote:
>
> > > > This is the output I get when I run the tests:
>
> > > > [testng] [Parser] Running:
> > > >    [testng]   tests

>
> > > >    [testng] test2 - setUp
> > > >    [testng] test2 - 2
> > > >    [testng] test1 - setUp
> > > >    [testng] test1 - 2
> > > >    [testng] test1 - 3
> > > >    [testng] test1 - 4
> > > >    [testng] test2 - 3
> > > >    [testng] test2 - 4
> > > >    [testng] test2 - 5
> > > >    [testng] test1 - 5
> > > >    [testng] test1 - 6
> > > >    [testng] test3 - setUp
> > > >    [testng] test3 - 2
> > > >    [testng] test3 - 3
> > > >    [testng] test3 - 4
> > > >    [testng] test3 - 5
> > > >    [testng] test3 - 6
> > > >    [testng] test2 - 6
>
> > > >    [testng] ===============================================
> > > >    [testng] tests
> > > >    [testng] Total tests run: 15, Failures: 0, Skips: 0
> > > >    [testng] ===============================================
>
> > > > If I add @Test (sequential=true) to the top of each class then it runs
> > > > fine.Can you explain what's wrong with the above output?
>
> > > --
> > > C dric--
> 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: sequential

Cédric Beust ♔
In reply to this post by Neil-34
By the way, another option is to use @BeforeMethod instead of @BeforeClass.  This will reset the database before each test method, though, which might have the following adverse effects:
  1. Takes more time (depends on the kind of DB you are using).
  2. Will not work if test1() sets certain values in the DB, and then test2() depends on these values (an approach better avoided in general, but it's not always an option if the work performed by test1() is significant).
I am guessing you are in situation 2 ?

--
Cedric


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

Cedric,

I do have a good reason for the @Before and @Test to be invoked next to
each other.  I need to clean out and populate database tables for the
given test.  The problem is that different test classes use the same
tables.

I don't mind changing the @Before annotation to @Test and putting a
dependsOnMethods, but why is that the only way I can get the
setup,2,3,4,5,6 order is by having both the sequential=true and
dependsOnMethods set for every method?

Neil


On Jan 2, 11:11 am, "C dric Beust   " < [hidden email]> wrote:

> Neil,
>
> The only guarantee is that @Before methods are invoked "at some point"
> before the first test invocation.  Depending on how your tests are
> structured, it's quite possible that other methods will be invoked between
> your @Before and @Test method, so TestNG cannot guarantee that they will be
> invoked right next to each other.
>
> If it's really important to have your @Before and @Test methods invoked
> right next to each other, you should probably move your @Before method to a
> @Test and use dependsOnMethods, although in theory, it's still possible to
> see other methods inserted there as well (much less likely, though).
>
> My question to you is:  do you have a good reason to want your @Before and
> @Test methods invoked next to each other?
>

> --
> Cedric
>
> On 1/2/07, Neil <[hidden email]> wrote:
>
>
>
>
>
> > Hi C dric,
>
> > It could be I'm unfamiliar with the how the tool works.
>
> > With all the runs I am expecting...
>
> > [testng] test1 - setUp
> >    [testng] test1 - 2
> >    [testng] test1 - 3
> >    [testng] test1 - 4
> >    [testng] test1 - 5
> >    [testng] test1 - 6
> > [testng] test2 - setUp
> >    [testng] test2 - 2
> >    [testng] test2 - 3
> >    [testng] test2 - 4
> >    [testng] test2 - 5
> >    [testng] test2 - 6
> > [testng] test3 - setUp
> >    [testng] test3 - 2
> >    [testng] test3 - 3
> >    [testng] test3 - 4
> >    [testng] test3 - 5
> >    [testng] test3 - 6
>
> > where test1, test2, and test3 are in no particular order but the
> > methods that are executed are always in order setup,2,3,4,5,6
>
> > Thanks,
>
> > Neil
>
> > On Jan 2, 10:58 am, "C dric Beust   " <[hidden email]> wrote:
> > > On 1/2/07, Neil <[hidden email]> wrote:
>
> > > > This is the output I get when I run the tests:
>
> > > > [testng] [Parser] Running:
> > > >    [testng]   tests
>

> > > >    [testng] test2 - setUp
> > > >    [testng] test2 - 2
> > > >    [testng] test1 - setUp
> > > >    [testng] test1 - 2
> > > >    [testng] test1 - 3
> > > >    [testng] test1 - 4
> > > >    [testng] test2 - 3
> > > >    [testng] test2 - 4
> > > >    [testng] test2 - 5
> > > >    [testng] test1 - 5
> > > >    [testng] test1 - 6
> > > >    [testng] test3 - setUp
> > > >    [testng] test3 - 2
> > > >    [testng] test3 - 3
> > > >    [testng] test3 - 4
> > > >    [testng] test3 - 5
> > > >    [testng] test3 - 6
> > > >    [testng] test2 - 6
>
> > > >    [testng] ===============================================
> > > >    [testng] tests
> > > >    [testng] Total tests run: 15, Failures: 0, Skips: 0
> > > >    [testng] ===============================================
>
> > > > If I add @Test (sequential=true) to the top of each class then it runs
> > > > fine.Can you explain what's wrong with the above output?
>
> > > --
> > > C dric--
> 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: sequential

Neil-34

I am in the second situation.  How does putting each class in a
separate test affect the groups?  I'd like to have just one group which
all the tests belong to.

Thanks,

Neil

On Jan 2, 11:36 am, "C�dric Beust   " <[hidden email]> wrote:

> By the way, another option is to use @BeforeMethod instead of @BeforeClass.
> This will reset the database before each test method, though, which might
> have the following adverse effects:
>
>    1. Takes more time (depends on the kind of DB you are using).
>    2. Will not work if test1() sets certain values in the DB, and then
>    test2() depends on these values (an approach better avoided in general, but
>    it's not always an option if the work performed by test1() is significant).
>
> I am guessing you are in situation 2 ?
>
> --
> Cedric
>
> On 1/2/07, Neil <[hidden email]> wrote:
>
>
>
>
>
> > Cedric,
>
> > I do have a good reason for the @Before and @Test to be invoked next to
> > each other.  I need to clean out and populate database tables for the
> > given test.  The problem is that different test classes use the same
> > tables.
>
> > I don't mind changing the @Before annotation to @Test and putting a
> > dependsOnMethods, but why is that the only way I can get the
> > setup,2,3,4,5,6 order is by having both the sequential=true and
> > dependsOnMethods set for every method?
>
> > Neil
>
> > On Jan 2, 11:11 am, "C dric Beust   " <[hidden email]> wrote:
> > > Neil,
>
> > > The only guarantee is that @Before methods are invoked "at some point"
> > > before the first test invocation.  Depending on how your tests are
> > > structured, it's quite possible that other methods will be invoked
> > between
> > > your @Before and @Test method, so TestNG cannot guarantee that they will
> > be
> > > invoked right next to each other.
>
> > > If it's really important to have your @Before and @Test methods invoked
> > > right next to each other, you should probably move your @Before method
> > to a
> > > @Test and use dependsOnMethods, although in theory, it's still possible
> > to
> > > see other methods inserted there as well (much less likely, though).
>
> > > My question to you is:  do you have a good reason to want your @Before
> > and
> > > @Test methods invoked next to each other?
>
> > > --
> > > Cedric
>
> > > On 1/2/07, Neil <[hidden email]> wrote:
>
> > > > Hi C dric,
>
> > > > It could be I'm unfamiliar with the how the tool works.
>
> > > > With all the runs I am expecting...
>
> > > > [testng] test1 - setUp
> > > >    [testng] test1 - 2
> > > >    [testng] test1 - 3
> > > >    [testng] test1 - 4
> > > >    [testng] test1 - 5
> > > >    [testng] test1 - 6
> > > > [testng] test2 - setUp
> > > >    [testng] test2 - 2
> > > >    [testng] test2 - 3
> > > >    [testng] test2 - 4
> > > >    [testng] test2 - 5
> > > >    [testng] test2 - 6
> > > > [testng] test3 - setUp
> > > >    [testng] test3 - 2
> > > >    [testng] test3 - 3
> > > >    [testng] test3 - 4
> > > >    [testng] test3 - 5
> > > >    [testng] test3 - 6
>
> > > > where test1, test2, and test3 are in no particular order but the
> > > > methods that are executed are always in order setup,2,3,4,5,6
>
> > > > Thanks,
>
> > > > Neil
>
> > > > On Jan 2, 10:58 am, "C dric Beust   " <[hidden email]> wrote:
> > > > > On 1/2/07, Neil <[hidden email]> wrote:
>
> > > > > > This is the output I get when I run the tests:
>
> > > > > > [testng] [Parser] Running:
> > > > > >    [testng]   tests
>
> > > > > >    [testng] test2 - setUp
> > > > > >    [testng] test2 - 2
> > > > > >    [testng] test1 - setUp
> > > > > >    [testng] test1 - 2
> > > > > >    [testng] test1 - 3
> > > > > >    [testng] test1 - 4
> > > > > >    [testng] test2 - 3
> > > > > >    [testng] test2 - 4
> > > > > >    [testng] test2 - 5
> > > > > >    [testng] test1 - 5
> > > > > >    [testng] test1 - 6
> > > > > >    [testng] test3 - setUp
> > > > > >    [testng] test3 - 2
> > > > > >    [testng] test3 - 3
> > > > > >    [testng] test3 - 4
> > > > > >    [testng] test3 - 5
> > > > > >    [testng] test3 - 6
> > > > > >    [testng] test2 - 6
>
> > > > > >    [testng] ===============================================
> > > > > >    [testng] tests
> > > > > >    [testng] Total tests run: 15, Failures: 0, Skips: 0
> > > > > >    [testng] ===============================================
>
> > > > > > If I add @Test (sequential=true) to the top of each class then it
> > runs
> > > > > > fine.Can you explain what's wrong with the above output?
>
> > > > > --
> > > > > C dric--
> > > C dric--
> 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: sequential

Alexandru Popescu ☀
On 1/3/07, Neil <[hidden email]> wrote:
>
> I am in the second situation.  How does putting each class in a
> separate test affect the groups?  I'd like to have just one group which
> all the tests belong to.
>

Then, what is the purpose of this group if all tests belong to it?

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

> Thanks,
>
> Neil
>
> On Jan 2, 11:36 am, "C dric Beust   " <[hidden email]> wrote:
> > By the way, another option is to use @BeforeMethod instead of @BeforeClass.
> > This will reset the database before each test method, though, which might
> > have the following adverse effects:
> >
> >    1. Takes more time (depends on the kind of DB you are using).
> >    2. Will not work if test1() sets certain values in the DB, and then
> >    test2() depends on these values (an approach better avoided in general, but
> >    it's not always an option if the work performed by test1() is significant).
> >
> > I am guessing you are in situation 2 ?
> >
> > --
> > Cedric
> >
> > On 1/2/07, Neil <[hidden email]> wrote:
> >
> >
> >
> >
> >
> > > Cedric,
> >
> > > I do have a good reason for the @Before and @Test to be invoked next to
> > > each other.  I need to clean out and populate database tables for the
> > > given test.  The problem is that different test classes use the same
> > > tables.
> >
> > > I don't mind changing the @Before annotation to @Test and putting a
> > > dependsOnMethods, but why is that the only way I can get the
> > > setup,2,3,4,5,6 order is by having both the sequential=true and
> > > dependsOnMethods set for every method?
> >
> > > Neil
> >
> > > On Jan 2, 11:11 am, "C dric Beust   " <[hidden email]> wrote:
> > > > Neil,
> >
> > > > The only guarantee is that @Before methods are invoked "at some point"
> > > > before the first test invocation.  Depending on how your tests are
> > > > structured, it's quite possible that other methods will be invoked
> > > between
> > > > your @Before and @Test method, so TestNG cannot guarantee that they will
> > > be
> > > > invoked right next to each other.
> >
> > > > If it's really important to have your @Before and @Test methods invoked
> > > > right next to each other, you should probably move your @Before method
> > > to a
> > > > @Test and use dependsOnMethods, although in theory, it's still possible
> > > to
> > > > see other methods inserted there as well (much less likely, though).
> >
> > > > My question to you is:  do you have a good reason to want your @Before
> > > and
> > > > @Test methods invoked next to each other?
> >
> > > > --
> > > > Cedric
> >
> > > > On 1/2/07, Neil <[hidden email]> wrote:
> >
> > > > > Hi C dric,
> >
> > > > > It could be I'm unfamiliar with the how the tool works.
> >
> > > > > With all the runs I am expecting...
> >
> > > > > [testng] test1 - setUp
> > > > >    [testng] test1 - 2
> > > > >    [testng] test1 - 3
> > > > >    [testng] test1 - 4
> > > > >    [testng] test1 - 5
> > > > >    [testng] test1 - 6
> > > > > [testng] test2 - setUp
> > > > >    [testng] test2 - 2
> > > > >    [testng] test2 - 3
> > > > >    [testng] test2 - 4
> > > > >    [testng] test2 - 5
> > > > >    [testng] test2 - 6
> > > > > [testng] test3 - setUp
> > > > >    [testng] test3 - 2
> > > > >    [testng] test3 - 3
> > > > >    [testng] test3 - 4
> > > > >    [testng] test3 - 5
> > > > >    [testng] test3 - 6
> >
> > > > > where test1, test2, and test3 are in no particular order but the
> > > > > methods that are executed are always in order setup,2,3,4,5,6
> >
> > > > > Thanks,
> >
> > > > > Neil
> >
> > > > > On Jan 2, 10:58 am, "C dric Beust   " <[hidden email]> wrote:
> > > > > > On 1/2/07, Neil <[hidden email]> wrote:
> >
> > > > > > > This is the output I get when I run the tests:
> >
> > > > > > > [testng] [Parser] Running:
> > > > > > >    [testng]   tests
> >
> > > > > > >    [testng] test2 - setUp
> > > > > > >    [testng] test2 - 2
> > > > > > >    [testng] test1 - setUp
> > > > > > >    [testng] test1 - 2
> > > > > > >    [testng] test1 - 3
> > > > > > >    [testng] test1 - 4
> > > > > > >    [testng] test2 - 3
> > > > > > >    [testng] test2 - 4
> > > > > > >    [testng] test2 - 5
> > > > > > >    [testng] test1 - 5
> > > > > > >    [testng] test1 - 6
> > > > > > >    [testng] test3 - setUp
> > > > > > >    [testng] test3 - 2
> > > > > > >    [testng] test3 - 3
> > > > > > >    [testng] test3 - 4
> > > > > > >    [testng] test3 - 5
> > > > > > >    [testng] test3 - 6
> > > > > > >    [testng] test2 - 6
> >
> > > > > > >    [testng] ===============================================
> > > > > > >    [testng] tests
> > > > > > >    [testng] Total tests run: 15, Failures: 0, Skips: 0
> > > > > > >    [testng] ===============================================
> >
> > > > > > > If I add @Test (sequential=true) to the top of each class then it
> > > runs
> > > > > > > fine.Can you explain what's wrong with the above output?
> >
> > > > > > --
> > > > > > C dric--
> > > > C dric--
> > 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: sequential

Neil-34

I think perhaps I'm not understanding the high-level group concept.

I have all my DB tests in a group called Database_Tests where each test
class is to test a specific set of tables.  Its possible that a test
class can use tables used by other test classes.  Is there a better way
to organize this?

On Jan 2, 4:36 pm, "Alexandru Popescu"
<[hidden email]> wrote:

> On 1/3/07, Neil <[hidden email]> wrote:
>
>
>
> > I am in the second situation.  How does putting each class in a
> > separate test affect the groups?  I'd like to have just one group which
> > all the tests belong to.Then, what is the purpose of this group if all tests belong to it?
>
> ./alex
> --
> .w( the_mindstorm )p.
>   TestNG co-founder
> EclipseTestNG Creator
>
> > Thanks,
>
> > Neil
>
> > On Jan 2, 11:36 am, "C dric Beust   " <[hidden email]> wrote:
> > > By the way, another option is to use @BeforeMethod instead of @BeforeClass.
> > > This will reset the database before each test method, though, which might
> > > have the following adverse effects:
>
> > >    1. Takes more time (depends on the kind of DB you are using).
> > >    2. Will not work if test1() sets certain values in the DB, and then
> > >    test2() depends on these values (an approach better avoided in general, but
> > >    it's not always an option if the work performed by test1() is significant).
>
> > > I am guessing you are in situation 2 ?
>
> > > --
> > > Cedric
>
> > > On 1/2/07, Neil <[hidden email]> wrote:
>
> > > > Cedric,
>
> > > > I do have a good reason for the @Before and @Test to be invoked next to
> > > > each other.  I need to clean out and populate database tables for the
> > > > given test.  The problem is that different test classes use the same
> > > > tables.
>
> > > > I don't mind changing the @Before annotation to @Test and putting a
> > > > dependsOnMethods, but why is that the only way I can get the
> > > > setup,2,3,4,5,6 order is by having both the sequential=true and
> > > > dependsOnMethods set for every method?
>
> > > > Neil
>
> > > > On Jan 2, 11:11 am, "C dric Beust   " <[hidden email]> wrote:
> > > > > Neil,
>
> > > > > The only guarantee is that @Before methods are invoked "at some point"
> > > > > before the first test invocation.  Depending on how your tests are
> > > > > structured, it's quite possible that other methods will be invoked
> > > > between
> > > > > your @Before and @Test method, so TestNG cannot guarantee that they will
> > > > be
> > > > > invoked right next to each other.
>
> > > > > If it's really important to have your @Before and @Test methods invoked
> > > > > right next to each other, you should probably move your @Before method
> > > > to a
> > > > > @Test and use dependsOnMethods, although in theory, it's still possible
> > > > to
> > > > > see other methods inserted there as well (much less likely, though).
>
> > > > > My question to you is:  do you have a good reason to want your @Before
> > > > and
> > > > > @Test methods invoked next to each other?
>
> > > > > --
> > > > > Cedric
>
> > > > > On 1/2/07, Neil <[hidden email]> wrote:
>
> > > > > > Hi C dric,
>
> > > > > > It could be I'm unfamiliar with the how the tool works.
>
> > > > > > With all the runs I am expecting...
>
> > > > > > [testng] test1 - setUp
> > > > > >    [testng] test1 - 2
> > > > > >    [testng] test1 - 3
> > > > > >    [testng] test1 - 4
> > > > > >    [testng] test1 - 5
> > > > > >    [testng] test1 - 6
> > > > > > [testng] test2 - setUp
> > > > > >    [testng] test2 - 2
> > > > > >    [testng] test2 - 3
> > > > > >    [testng] test2 - 4
> > > > > >    [testng] test2 - 5
> > > > > >    [testng] test2 - 6
> > > > > > [testng] test3 - setUp
> > > > > >    [testng] test3 - 2
> > > > > >    [testng] test3 - 3
> > > > > >    [testng] test3 - 4
> > > > > >    [testng] test3 - 5
> > > > > >    [testng] test3 - 6
>
> > > > > > where test1, test2, and test3 are in no particular order but the
> > > > > > methods that are executed are always in order setup,2,3,4,5,6
>
> > > > > > Thanks,
>
> > > > > > Neil
>
> > > > > > On Jan 2, 10:58 am, "C dric Beust   " <[hidden email]> wrote:
> > > > > > > On 1/2/07, Neil <[hidden email]> wrote:
>
> > > > > > > > This is the output I get when I run the tests:
>
> > > > > > > > [testng] [Parser] Running:
> > > > > > > >    [testng]   tests
>
> > > > > > > >    [testng] test2 - setUp
> > > > > > > >    [testng] test2 - 2
> > > > > > > >    [testng] test1 - setUp
> > > > > > > >    [testng] test1 - 2
> > > > > > > >    [testng] test1 - 3
> > > > > > > >    [testng] test1 - 4
> > > > > > > >    [testng] test2 - 3
> > > > > > > >    [testng] test2 - 4
> > > > > > > >    [testng] test2 - 5
> > > > > > > >    [testng] test1 - 5
> > > > > > > >    [testng] test1 - 6
> > > > > > > >    [testng] test3 - setUp
> > > > > > > >    [testng] test3 - 2
> > > > > > > >    [testng] test3 - 3
> > > > > > > >    [testng] test3 - 4
> > > > > > > >    [testng] test3 - 5
> > > > > > > >    [testng] test3 - 6
> > > > > > > >    [testng] test2 - 6
>
> > > > > > > >    [testng] ===============================================
> > > > > > > >    [testng] tests
> > > > > > > >    [testng] Total tests run: 15, Failures: 0, Skips: 0
> > > > > > > >    [testng] ===============================================
>
> > > > > > > > If I add @Test (sequential=true) to the top of each class then it
> > > > runs
> > > > > > > > fine.Can you explain what's wrong with the above output?
>
> > > > > > > --
> > > > > > > C dric--
> > > > > C dric--
> > > 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: sequential

Cédric Beust ♔
Would it be possible for you to gather all the tests that exercise the same table in the same class?  That would be a start...

--
Cedric


On 1/3/07, Neil <[hidden email]> wrote:

I think perhaps I'm not understanding the high-level group concept.

I have all my DB tests in a group called Database_Tests where each test
class is to test a specific set of tables.  Its possible that a test
class can use tables used by other test classes.  Is there a better way
to organize this?

On Jan 2, 4:36 pm, "Alexandru Popescu"
<[hidden email]> wrote:

> On 1/3/07, Neil <[hidden email]> wrote:
>
>
>
> > I am in the second situation.  How does putting each class in a
> > separate test affect the groups?  I'd like to have just one group which
> > all the tests belong to.Then, what is the purpose of this group if all tests belong to it?
>
> ./alex
> --
> .w( the_mindstorm )p.
>   TestNG co-founder
> EclipseTestNG Creator
>
> > Thanks,
>
> > Neil
>
> > On Jan 2, 11:36 am, "C dric Beust   " <[hidden email]> wrote:
> > > By the way, another option is to use @BeforeMethod instead of @BeforeClass.
> > > This will reset the database before each test method, though, which might
> > > have the following adverse effects:

>
> > >    1. Takes more time (depends on the kind of DB you are using).
> > >    2. Will not work if test1() sets certain values in the DB, and then
> > >    test2() depends on these values (an approach better avoided in general, but
> > >    it's not always an option if the work performed by test1() is significant).
>
> > > I am guessing you are in situation 2 ?
>
> > > --
> > > Cedric
>
> > > On 1/2/07, Neil <[hidden email]> wrote:
>
> > > > Cedric,
>
> > > > I do have a good reason for the @Before and @Test to be invoked next to
> > > > each other.  I need to clean out and populate database tables for the
> > > > given test.  The problem is that different test classes use the same
> > > > tables.
>
> > > > I don't mind changing the @Before annotation to @Test and putting a
> > > > dependsOnMethods, but why is that the only way I can get the
> > > > setup,2,3,4,5,6 order is by having both the sequential=true and
> > > > dependsOnMethods set for every method?
>
> > > > Neil
>
> > > > On Jan 2, 11:11 am, "C dric Beust   " < [hidden email]> wrote:
> > > > > Neil,
>
> > > > > The only guarantee is that @Before methods are invoked "at some point"
> > > > > before the first test invocation.  Depending on how your tests are

> > > > > structured, it's quite possible that other methods will be invoked
> > > > between
> > > > > your @Before and @Test method, so TestNG cannot guarantee that they will
> > > > be
> > > > > invoked right next to each other.
>
> > > > > If it's really important to have your @Before and @Test methods invoked
> > > > > right next to each other, you should probably move your @Before method
> > > > to a
> > > > > @Test and use dependsOnMethods, although in theory, it's still possible
> > > > to
> > > > > see other methods inserted there as well (much less likely, though).
>
> > > > > My question to you is:  do you have a good reason to want your @Before
> > > > and
> > > > > @Test methods invoked next to each other?
>
> > > > > --
> > > > > Cedric
>
> > > > > On 1/2/07, Neil < [hidden email]> wrote:
>
> > > > > > Hi C dric,
>
> > > > > > It could be I'm unfamiliar with the how the tool works.
>
> > > > > > With all the runs I am expecting...
>
> > > > > > [testng] test1 - setUp
> > > > > >    [testng] test1 - 2
> > > > > >    [testng] test1 - 3
> > > > > >    [testng] test1 - 4
> > > > > >    [testng] test1 - 5
> > > > > >    [testng] test1 - 6
> > > > > > [testng] test2 - setUp
> > > > > >    [testng] test2 - 2
> > > > > >    [testng] test2 - 3
> > > > > >    [testng] test2 - 4
> > > > > >    [testng] test2 - 5
> > > > > >    [testng] test2 - 6
> > > > > > [testng] test3 - setUp
> > > > > >    [testng] test3 - 2
> > > > > >    [testng] test3 - 3
> > > > > >    [testng] test3 - 4

> > > > > >    [testng] test3 - 5
> > > > > >    [testng] test3 - 6
>
> > > > > > where test1, test2, and test3 are in no particular order but the
> > > > > > methods that are executed are always in order setup,2,3,4,5,6
>
> > > > > > Thanks,
>
> > > > > > Neil
>
> > > > > > On Jan 2, 10:58 am, "C dric Beust   " < [hidden email]> wrote:
> > > > > > > On 1/2/07, Neil <[hidden email]> wrote:
>
> > > > > > > > This is the output I get when I run the tests:

>
> > > > > > > > [testng] [Parser] Running:
> > > > > > > >    [testng]   tests
>
> > > > > > > >    [testng] test2 - setUp
> > > > > > > >    [testng] test2 - 2
> > > > > > > >    [testng] test1 - setUp
> > > > > > > >    [testng] test1 - 2
> > > > > > > >    [testng] test1 - 3
> > > > > > > >    [testng] test1 - 4
> > > > > > > >    [testng] test2 - 3
> > > > > > > >    [testng] test2 - 4
> > > > > > > >    [testng] test2 - 5
> > > > > > > >    [testng] test1 - 5
> > > > > > > >    [testng] test1 - 6
> > > > > > > >    [testng] test3 - setUp
> > > > > > > >    [testng] test3 - 2
> > > > > > > >    [testng] test3 - 3
> > > > > > > >    [testng] test3 - 4
> > > > > > > >    [testng] test3 - 5
> > > > > > > >    [testng] test3 - 6
> > > > > > > >    [testng] test2 - 6
>
> > > > > > > >    [testng] ===============================================
> > > > > > > >    [testng] tests
> > > > > > > >    [testng] Total tests run: 15, Failures: 0, Skips: 0
> > > > > > > >    [testng] ===============================================
>
> > > > > > > > If I add @Test (sequential=true) to the top of each class then it
> > > > runs
> > > > > > > > fine.Can you explain what's wrong with the above output?
>
> > > > > > > --
> > > > > > > C dric--
> > > > > C dric--
> > > 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
-~----------~----~----~----~------~----~------~--~---