groups at the suite level

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

groups at the suite level

Mehul Sanghvi-2
Is it possible to exclude groups at the suite level ?

--
Mehul N. Sanghvi
email: [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
|  
Report Content as Inappropriate

Re: groups at the suite level

Cédric Beust ♔-2
On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]> wrote:
Is it possible to exclude groups at the suite level ?

I'm not sure I understand what you're asking, can you give an example?

-- 
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
|  
Report Content as Inappropriate

Re: groups at the suite level

Mehul Sanghvi-2
2011/5/23 Cédric Beust ♔ <[hidden email]>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

       Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
    <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
         we define Tests elements and thus avoid parameter name clashing.
    -->
    <test name="Core" preserve-order="true">
        <groups>
            <run>
                <exclude name="non-standard"/>
                <exclude name="performance"/>
                <exclude name="functional"/>
            </run>
        </groups>
        <classes>
            <!-- does not take wild cards (would be nice to have that) -->
            <class name="com.fubar.utils.TestTimestamp"/>
            <class name="com.fubar.utils.TestUtils"/>
            <class name="com.fubar.datamodel.TestSyncObject"/>
            <class name="com.fubar.datamodel.TestArrayList"/>
            <class name="com.fubar.datamodel.TestHashMapList"/>
            <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
            <class name="com.fubar.datamodel.TestSortedArrayList"/>
        </classes>
    </test>

    <test name="Personnel" preserve-order="true">
        <groups>
            <run>
                <exclude name="non-standard"/>
                <exclude name="performance"/>
                <exclude name="functional"/>
            </run>
        </groups>
        <classes>
            <!-- does not take wild cards -->
            <class name="com.fubar.accessmodel.TestAccess"/>
        </classes>
    </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

     <groups>

            <exclude name="non-standard" />
            <exclude name="performance" />
            <exclude name="functional" />

     </groups>

    <test ........ >

    </test>

    <test ..........>

    </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: [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
|  
Report Content as Inappropriate

Re: groups at the suite level

Cédric Beust ♔-2
Hi Mehul,

Not at all, what you're asking makes perfect sense and it's actually fairly consistent with TestNG's overall XML philosophy, where you can define tags in <suite> that you can then override in <test>. Here, I just need to pull this definition from <test> into <suite>...

-- 
Cédric




On Mon, May 23, 2011 at 11:59 AM, Mehul Sanghvi <[hidden email]> wrote:
2011/5/23 Cédric Beust ♔ <[hidden email]>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

      Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
   <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
        we define Tests elements and thus avoid parameter name clashing.
   -->
   <test name="Core" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards (would be nice to have that) -->
           <class name="com.fubar.utils.TestTimestamp"/>
           <class name="com.fubar.utils.TestUtils"/>
           <class name="com.fubar.datamodel.TestSyncObject"/>
           <class name="com.fubar.datamodel.TestArrayList"/>
           <class name="com.fubar.datamodel.TestHashMapList"/>
           <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
           <class name="com.fubar.datamodel.TestSortedArrayList"/>
       </classes>
   </test>

   <test name="Personnel" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards -->
           <class name="com.fubar.accessmodel.TestAccess"/>
       </classes>
   </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

    <groups>

           <exclude name="non-standard" />
           <exclude name="performance" />
           <exclude name="functional" />

    </groups>

   <test ........ >

   </test>

   <test ..........>

   </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: [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.


--
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
|  
Report Content as Inappropriate

Re: groups at the suite level

Cédric Beust ♔-2
Hi Mehul,

I just implemented this feature in the beta:  http://testng.org/beta

You can now specify a groups tag under <suite>:

<suite name="SingleSuite" verbose="2" parallel="false" thread-count="4"

    data-provider-thread-count="3">


  <groups>

    <run>

      <include name="a" />

    </run>

  </groups>


  <parameter name="n" value="42" />



Note that just like the annotation @Test(groups), groups specified this way are accumulative. In other words, if you include group "a" in <suite> and "b" in <test>, both "a" and "b" will be run.

Obviously, this applies to the exclusion of groups as well.

Let me know how this works for you.

-- 
Cédric




2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

Not at all, what you're asking makes perfect sense and it's actually fairly consistent with TestNG's overall XML philosophy, where you can define tags in <suite> that you can then override in <test>. Here, I just need to pull this definition from <test> into <suite>...

-- 
Cédric




On Mon, May 23, 2011 at 11:59 AM, Mehul Sanghvi <[hidden email]> wrote:
2011/5/23 Cédric Beust ♔ <[hidden email]>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

      Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
   <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
        we define Tests elements and thus avoid parameter name clashing.
   -->
   <test name="Core" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards (would be nice to have that) -->
           <class name="com.fubar.utils.TestTimestamp"/>
           <class name="com.fubar.utils.TestUtils"/>
           <class name="com.fubar.datamodel.TestSyncObject"/>
           <class name="com.fubar.datamodel.TestArrayList"/>
           <class name="com.fubar.datamodel.TestHashMapList"/>
           <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
           <class name="com.fubar.datamodel.TestSortedArrayList"/>
       </classes>
   </test>

   <test name="Personnel" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards -->
           <class name="com.fubar.accessmodel.TestAccess"/>
       </classes>
   </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

    <groups>

           <exclude name="non-standard" />
           <exclude name="performance" />
           <exclude name="functional" />

    </groups>

   <test ........ >

   </test>

   <test ..........>

   </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: [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.



--
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
|  
Report Content as Inappropriate

Re: groups at the suite level

Mehul Sanghvi-2
2011/5/23 Cédric Beust ♔ <[hidden email]>:

> Hi Mehul,
> I just implemented this feature in the beta:  http://testng.org/beta
> You can now specify a groups tag under <suite>:
>
> <suite name="SingleSuite" verbose="2" parallel="false" thread-count="4"
>
>     data-provider-thread-count="3">
>
>   <groups>
>
>     <run>
>
>       <include name="a" />
>
>     </run>
>
>   </groups>
>
>   <parameter name="n" value="42" />
>
> Note that just like the annotation @Test(groups), groups specified this way
> are accumulative. In other words, if you include group "a" in <suite> and
> "b" in <test>, both "a" and "b" will be run.
> Obviously, this applies to the exclusion of groups as well.
> Let me know how this works for you.
> --
> Cédric
>


Cedric,


       Thank you for the very quick response.  I will talk to my
colleague and see about
using the beta.  This would be pretty awesome.  One other thing that
would be nice would
be the ability to do preserve-order=true at the <suite> level as well.
 Is this possible in the
new beta ?


cheers,

       mehul

--
Mehul N. Sanghvi
email: [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
|  
Report Content as Inappropriate

Re: groups at the suite level

Nalin Makar
In reply to this post by Cédric Beust ♔-2
Cedric,

how does this affect the testng-results.xml generated by org.testng.reporters.XmlReporter? For groups specified for inclusion directly under a suite, do you create a dummy <test>?

-nalin



2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

I just implemented this feature in the beta:  http://testng.org/beta

You can now specify a groups tag under <suite>:

<suite name="SingleSuite" verbose="2" parallel="false" thread-count="4"

    data-provider-thread-count="3">


  <groups>

    <run>

      <include name="a" />

    </run>

  </groups>


  <parameter name="n" value="42" />



Note that just like the annotation @Test(groups), groups specified this way are accumulative. In other words, if you include group "a" in <suite> and "b" in <test>, both "a" and "b" will be run.

Obviously, this applies to the exclusion of groups as well.

Let me know how this works for you.

-- 
Cédric




2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

Not at all, what you're asking makes perfect sense and it's actually fairly consistent with TestNG's overall XML philosophy, where you can define tags in <suite> that you can then override in <test>. Here, I just need to pull this definition from <test> into <suite>...

-- 
Cédric




On Mon, May 23, 2011 at 11:59 AM, Mehul Sanghvi <[hidden email]> wrote:
2011/5/23 Cédric Beust ♔ <[hidden email]>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

      Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
   <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
        we define Tests elements and thus avoid parameter name clashing.
   -->
   <test name="Core" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards (would be nice to have that) -->
           <class name="com.fubar.utils.TestTimestamp"/>
           <class name="com.fubar.utils.TestUtils"/>
           <class name="com.fubar.datamodel.TestSyncObject"/>
           <class name="com.fubar.datamodel.TestArrayList"/>
           <class name="com.fubar.datamodel.TestHashMapList"/>
           <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
           <class name="com.fubar.datamodel.TestSortedArrayList"/>
       </classes>
   </test>

   <test name="Personnel" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards -->
           <class name="com.fubar.accessmodel.TestAccess"/>
       </classes>
   </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

    <groups>

           <exclude name="non-standard" />
           <exclude name="performance" />
           <exclude name="functional" />

    </groups>

   <test ........ >

   </test>

   <test ..........>

   </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: [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.



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

--
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
|  
Report Content as Inappropriate

Re: groups at the suite level

Cédric Beust ♔-2
Nalin,

I haven't measured all the implications yet (another one I need to look into is YAML, which should hopefully be a no-op). Creating a dummy test sounds like a good compromise.

-- 
Cédric




On Mon, May 23, 2011 at 2:36 PM, Nalin Makar <[hidden email]> wrote:
Cedric,

how does this affect the testng-results.xml generated by org.testng.reporters.XmlReporter? For groups specified for inclusion directly under a suite, do you create a dummy <test>?

-nalin



2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

I just implemented this feature in the beta:  http://testng.org/beta

You can now specify a groups tag under <suite>:

<suite name="SingleSuite" verbose="2" parallel="false" thread-count="4"

    data-provider-thread-count="3">


  <groups>

    <run>

      <include name="a" />

    </run>

  </groups>


  <parameter name="n" value="42" />



Note that just like the annotation @Test(groups), groups specified this way are accumulative. In other words, if you include group "a" in <suite> and "b" in <test>, both "a" and "b" will be run.

Obviously, this applies to the exclusion of groups as well.

Let me know how this works for you.

-- 
Cédric




2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

Not at all, what you're asking makes perfect sense and it's actually fairly consistent with TestNG's overall XML philosophy, where you can define tags in <suite> that you can then override in <test>. Here, I just need to pull this definition from <test> into <suite>...

-- 
Cédric




On Mon, May 23, 2011 at 11:59 AM, Mehul Sanghvi <[hidden email]> wrote:
2011/5/23 Cédric Beust ♔ <[hidden email]>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

      Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
   <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
        we define Tests elements and thus avoid parameter name clashing.
   -->
   <test name="Core" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards (would be nice to have that) -->
           <class name="com.fubar.utils.TestTimestamp"/>
           <class name="com.fubar.utils.TestUtils"/>
           <class name="com.fubar.datamodel.TestSyncObject"/>
           <class name="com.fubar.datamodel.TestArrayList"/>
           <class name="com.fubar.datamodel.TestHashMapList"/>
           <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
           <class name="com.fubar.datamodel.TestSortedArrayList"/>
       </classes>
   </test>

   <test name="Personnel" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards -->
           <class name="com.fubar.accessmodel.TestAccess"/>
       </classes>
   </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

    <groups>

           <exclude name="non-standard" />
           <exclude name="performance" />
           <exclude name="functional" />

    </groups>

   <test ........ >

   </test>

   <test ..........>

   </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: [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.



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

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

--
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
|  
Report Content as Inappropriate

Re: groups at the suite level

Cédric Beust ♔-2
By the way, because of the way inheritance works, these groups will automatically appear under the <test> tag. For example, if you have:

<suite>
  groups=a

  <test>
    groups=b

Calling getGroups() on the test will return both a and b, which means that testng-results.xml will display these groups, although it won't be clear which ones came from the suite... So in effect, it already "kind of works".

-- 
Cédric




2011/5/23 Cédric Beust ♔ <[hidden email]>
Nalin,

I haven't measured all the implications yet (another one I need to look into is YAML, which should hopefully be a no-op). Creating a dummy test sounds like a good compromise.

-- 
Cédric




On Mon, May 23, 2011 at 2:36 PM, Nalin Makar <[hidden email]> wrote:
Cedric,

how does this affect the testng-results.xml generated by org.testng.reporters.XmlReporter? For groups specified for inclusion directly under a suite, do you create a dummy <test>?

-nalin



2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

I just implemented this feature in the beta:  http://testng.org/beta

You can now specify a groups tag under <suite>:

<suite name="SingleSuite" verbose="2" parallel="false" thread-count="4"

    data-provider-thread-count="3">


  <groups>

    <run>

      <include name="a" />

    </run>

  </groups>


  <parameter name="n" value="42" />



Note that just like the annotation @Test(groups), groups specified this way are accumulative. In other words, if you include group "a" in <suite> and "b" in <test>, both "a" and "b" will be run.

Obviously, this applies to the exclusion of groups as well.

Let me know how this works for you.

-- 
Cédric




2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

Not at all, what you're asking makes perfect sense and it's actually fairly consistent with TestNG's overall XML philosophy, where you can define tags in <suite> that you can then override in <test>. Here, I just need to pull this definition from <test> into <suite>...

-- 
Cédric




On Mon, May 23, 2011 at 11:59 AM, Mehul Sanghvi <[hidden email]> wrote:
2011/5/23 Cédric Beust ♔ <[hidden email]>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

      Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
   <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
        we define Tests elements and thus avoid parameter name clashing.
   -->
   <test name="Core" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards (would be nice to have that) -->
           <class name="com.fubar.utils.TestTimestamp"/>
           <class name="com.fubar.utils.TestUtils"/>
           <class name="com.fubar.datamodel.TestSyncObject"/>
           <class name="com.fubar.datamodel.TestArrayList"/>
           <class name="com.fubar.datamodel.TestHashMapList"/>
           <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
           <class name="com.fubar.datamodel.TestSortedArrayList"/>
       </classes>
   </test>

   <test name="Personnel" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards -->
           <class name="com.fubar.accessmodel.TestAccess"/>
       </classes>
   </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

    <groups>

           <exclude name="non-standard" />
           <exclude name="performance" />
           <exclude name="functional" />

    </groups>

   <test ........ >

   </test>

   <test ..........>

   </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: [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.



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

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


--
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
|  
Report Content as Inappropriate

Re: groups at the suite level

Cédric Beust ♔-2
In reply to this post by Mehul Sanghvi-2
2011/5/23 Mehul Sanghvi <[hidden email]>
Cedric,


      Thank you for the very quick response.  I will talk to my
colleague and see about using the beta.  This would be pretty awesome.  One other thing that
would be nice would be the ability to do preserve-order=true at the <suite> level as well.
 Is this possible in the new beta ?

<test> tags are already run in the order they are encountered in the XML file, so I don't believe such a flag is necessary. For more details, take a look at the comment I wrote on this JIRA issue

-- 
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
|  
Report Content as Inappropriate

Re: groups at the suite level

Nalin Makar
In reply to this post by Cédric Beust ♔-2
ok. sounds good.

-nalin



2011/5/23 Cédric Beust ♔ <[hidden email]>
By the way, because of the way inheritance works, these groups will automatically appear under the <test> tag. For example, if you have:

<suite>
  groups=a

  <test>
    groups=b

Calling getGroups() on the test will return both a and b, which means that testng-results.xml will display these groups, although it won't be clear which ones came from the suite... So in effect, it already "kind of works".

-- 
Cédric




2011/5/23 Cédric Beust ♔ <[hidden email]>
Nalin,

I haven't measured all the implications yet (another one I need to look into is YAML, which should hopefully be a no-op). Creating a dummy test sounds like a good compromise.

-- 
Cédric




On Mon, May 23, 2011 at 2:36 PM, Nalin Makar <[hidden email]> wrote:
Cedric,

how does this affect the testng-results.xml generated by org.testng.reporters.XmlReporter? For groups specified for inclusion directly under a suite, do you create a dummy <test>?

-nalin



2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

I just implemented this feature in the beta:  http://testng.org/beta

You can now specify a groups tag under <suite>:

<suite name="SingleSuite" verbose="2" parallel="false" thread-count="4"

    data-provider-thread-count="3">


  <groups>

    <run>

      <include name="a" />

    </run>

  </groups>


  <parameter name="n" value="42" />



Note that just like the annotation @Test(groups), groups specified this way are accumulative. In other words, if you include group "a" in <suite> and "b" in <test>, both "a" and "b" will be run.

Obviously, this applies to the exclusion of groups as well.

Let me know how this works for you.

-- 
Cédric




2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

Not at all, what you're asking makes perfect sense and it's actually fairly consistent with TestNG's overall XML philosophy, where you can define tags in <suite> that you can then override in <test>. Here, I just need to pull this definition from <test> into <suite>...

-- 
Cédric




On Mon, May 23, 2011 at 11:59 AM, Mehul Sanghvi <[hidden email]> wrote:
2011/5/23 Cédric Beust ♔ <[hidden email]>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

      Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
   <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
        we define Tests elements and thus avoid parameter name clashing.
   -->
   <test name="Core" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards (would be nice to have that) -->
           <class name="com.fubar.utils.TestTimestamp"/>
           <class name="com.fubar.utils.TestUtils"/>
           <class name="com.fubar.datamodel.TestSyncObject"/>
           <class name="com.fubar.datamodel.TestArrayList"/>
           <class name="com.fubar.datamodel.TestHashMapList"/>
           <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
           <class name="com.fubar.datamodel.TestSortedArrayList"/>
       </classes>
   </test>

   <test name="Personnel" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards -->
           <class name="com.fubar.accessmodel.TestAccess"/>
       </classes>
   </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

    <groups>

           <exclude name="non-standard" />
           <exclude name="performance" />
           <exclude name="functional" />

    </groups>

   <test ........ >

   </test>

   <test ..........>

   </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: [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.



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

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


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

--
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
|  
Report Content as Inappropriate

Re: groups at the suite level

Harish Appannagari
In reply to this post by Cédric Beust ♔-2
Cedric,
This an old post and I am currently in need of this feature. The beta link provided below is not available any more. Is this feature of having to use groups at suite level available at all now ?

Regards,
-Harish

On Monday, May 23, 2011 at 1:01:01 PM UTC-7, Cedric wrote:
Hi Mehul,

I just implemented this feature in the beta:  <a href="http://testng.org/beta" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Ftestng.org%2Fbeta\46sa\75D\46sntz\0751\46usg\75AFQjCNFSKY3ppx5vP2n-3VnX8yAfmyev7Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Ftestng.org%2Fbeta\46sa\75D\46sntz\0751\46usg\75AFQjCNFSKY3ppx5vP2n-3VnX8yAfmyev7Q&#39;;return true;">http://testng.org/beta

You can now specify a groups tag under <suite>:

<suite name="SingleSuite" verbose="2" parallel="false" thread-count="4"

    data-provider-thread-count="3">


  <groups>

    <run>

      <include name="a" />

    </run>

  </groups>


  <parameter name="n" value="42" />



Note that just like the annotation @Test(groups), groups specified this way are accumulative. In other words, if you include group "a" in <suite> and "b" in <test>, both "a" and "b" will be run.

Obviously, this applies to the exclusion of groups as well.

Let me know how this works for you.

-- 
Cédric




2011/5/23 Cédric Beust ♔ <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="vRClLCANY4YJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ced...@...>
Hi Mehul,

Not at all, what you're asking makes perfect sense and it's actually fairly consistent with TestNG's overall XML philosophy, where you can define tags in <suite> that you can then override in <test>. Here, I just need to pull this definition from <test> into <suite>...

-- 
Cédric




On Mon, May 23, 2011 at 11:59 AM, Mehul Sanghvi <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="vRClLCANY4YJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mehul....@...> wrote:
2011/5/23 Cédric Beust ♔ <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="vRClLCANY4YJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ced...@...>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="vRClLCANY4YJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mehul....@...>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

      Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
   <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
        we define Tests elements and thus avoid parameter name clashing.
   -->
   <test name="Core" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards (would be nice to have that) -->
           <class name="com.fubar.utils.TestTimestamp"/>
           <class name="com.fubar.utils.TestUtils"/>
           <class name="com.fubar.datamodel.TestSyncObject"/>
           <class name="com.fubar.datamodel.TestArrayList"/>
           <class name="com.fubar.datamodel.TestHashMapList"/>
           <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
           <class name="com.fubar.datamodel.TestSortedArrayList"/>
       </classes>
   </test>

   <test name="Personnel" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards -->
           <class name="com.fubar.accessmodel.TestAccess"/>
       </classes>
   </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

    <groups>

           <exclude name="non-standard" />
           <exclude name="performance" />
           <exclude name="functional" />

    </groups>

   <test ........ >

   </test>

   <test ..........>

   </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="vRClLCANY4YJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mehul....@...

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="vRClLCANY4YJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
To unsubscribe from this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="vRClLCANY4YJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
For more options, visit this group at <a href="http://groups.google.com/group/testng-users?hl=en" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/testng-users?hl\75en&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/testng-users?hl\75en&#39;;return true;">http://groups.google.com/group/testng-users?hl=en.



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

Re: groups at the suite level

Krishnan Mahadevan
Harish,
Have you tried using it in the latest TestNG version ? If yes, what do you see ?

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 Sun, Feb 21, 2016 at 5:59 AM, Harish Appannagari <[hidden email]> wrote:
Cedric,
This an old post and I am currently in need of this feature. The beta link provided below is not available any more. Is this feature of having to use groups at suite level available at all now ?

Regards,
-Harish

On Monday, May 23, 2011 at 1:01:01 PM UTC-7, Cedric wrote:
Hi Mehul,

I just implemented this feature in the beta:  http://testng.org/beta

You can now specify a groups tag under <suite>:

<suite name="SingleSuite" verbose="2" parallel="false" thread-count="4"

    data-provider-thread-count="3">


  <groups>

    <run>

      <include name="a" />

    </run>

  </groups>


  <parameter name="n" value="42" />



Note that just like the annotation @Test(groups), groups specified this way are accumulative. In other words, if you include group "a" in <suite> and "b" in <test>, both "a" and "b" will be run.

Obviously, this applies to the exclusion of groups as well.

Let me know how this works for you.

-- 
Cédric




2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

Not at all, what you're asking makes perfect sense and it's actually fairly consistent with TestNG's overall XML philosophy, where you can define tags in <suite> that you can then override in <test>. Here, I just need to pull this definition from <test> into <suite>...

-- 
Cédric




On Mon, May 23, 2011 at 11:59 AM, Mehul Sanghvi <[hidden email]> wrote:
2011/5/23 Cédric Beust ♔ <[hidden email]>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

      Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
   <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
        we define Tests elements and thus avoid parameter name clashing.
   -->
   <test name="Core" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards (would be nice to have that) -->
           <class name="com.fubar.utils.TestTimestamp"/>
           <class name="com.fubar.utils.TestUtils"/>
           <class name="com.fubar.datamodel.TestSyncObject"/>
           <class name="com.fubar.datamodel.TestArrayList"/>
           <class name="com.fubar.datamodel.TestHashMapList"/>
           <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
           <class name="com.fubar.datamodel.TestSortedArrayList"/>
       </classes>
   </test>

   <test name="Personnel" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards -->
           <class name="com.fubar.accessmodel.TestAccess"/>
       </classes>
   </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

    <groups>

           <exclude name="non-standard" />
           <exclude name="performance" />
           <exclude name="functional" />

    </groups>

   <test ........ >

   </test>

   <test ..........>

   </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: [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.



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

Re: groups at the suite level

Harish Appannagari
I tried with :  compile 'org.testng:testng:6.9.10'
Note : I am not seeing an error but I see that tests are not getting executed as per my assumption.

Here is my sample xml suite :
<suite name="SingleSuite" >

    <groups>
        <run>
            <include name="group2" />
        </run>
    </groups>


    <suite-files>
        <suite-file path="Group1.xml" />
        <suite-file path="Group2.xml" />
        <suite-file path="Env.xml" />
    </suite-files>

</suite>

My Expectation : Only tests grouped as "group2" should execute.
But i see that all the tests in the suite files are getting executed.


Thanks,
-Harish

On Sun, Feb 21, 2016 at 7:12 PM, Krishnan Mahadevan <[hidden email]> wrote:
Harish,
Have you tried using it in the latest TestNG version ? If yes, what do you see ?

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 Sun, Feb 21, 2016 at 5:59 AM, Harish Appannagari <[hidden email]> wrote:
Cedric,
This an old post and I am currently in need of this feature. The beta link provided below is not available any more. Is this feature of having to use groups at suite level available at all now ?

Regards,
-Harish

On Monday, May 23, 2011 at 1:01:01 PM UTC-7, Cedric wrote:
Hi Mehul,

I just implemented this feature in the beta:  http://testng.org/beta

You can now specify a groups tag under <suite>:

<suite name="SingleSuite" verbose="2" parallel="false" thread-count="4"

    data-provider-thread-count="3">


  <groups>

    <run>

      <include name="a" />

    </run>

  </groups>


  <parameter name="n" value="42" />



Note that just like the annotation @Test(groups), groups specified this way are accumulative. In other words, if you include group "a" in <suite> and "b" in <test>, both "a" and "b" will be run.

Obviously, this applies to the exclusion of groups as well.

Let me know how this works for you.

-- 
Cédric




2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

Not at all, what you're asking makes perfect sense and it's actually fairly consistent with TestNG's overall XML philosophy, where you can define tags in <suite> that you can then override in <test>. Here, I just need to pull this definition from <test> into <suite>...

-- 
Cédric




On Mon, May 23, 2011 at 11:59 AM, Mehul Sanghvi <[hidden email]> wrote:
2011/5/23 Cédric Beust ♔ <[hidden email]>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

      Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
   <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
        we define Tests elements and thus avoid parameter name clashing.
   -->
   <test name="Core" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards (would be nice to have that) -->
           <class name="com.fubar.utils.TestTimestamp"/>
           <class name="com.fubar.utils.TestUtils"/>
           <class name="com.fubar.datamodel.TestSyncObject"/>
           <class name="com.fubar.datamodel.TestArrayList"/>
           <class name="com.fubar.datamodel.TestHashMapList"/>
           <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
           <class name="com.fubar.datamodel.TestSortedArrayList"/>
       </classes>
   </test>

   <test name="Personnel" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards -->
           <class name="com.fubar.accessmodel.TestAccess"/>
       </classes>
   </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

    <groups>

           <exclude name="non-standard" />
           <exclude name="performance" />
           <exclude name="functional" />

    </groups>

   <test ........ >

   </test>

   <test ..........>

   </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: [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.



--
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 https://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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/a504gCYpT28/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://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 https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groups at the suite level

Harish Appannagari
Any update for me on this issue ? I see that groups defined at the parent suite level do not flow to child suites.


Regards,
-Harish

On Mon, Feb 22, 2016 at 12:26 AM, Harish Appannagari <[hidden email]> wrote:
I tried with :  compile 'org.testng:testng:6.9.10'
Note : I am not seeing an error but I see that tests are not getting executed as per my assumption.

Here is my sample xml suite :
<suite name="SingleSuite" >

    <groups>
        <run>
            <include name="group2" />
        </run>
    </groups>


    <suite-files>
        <suite-file path="Group1.xml" />
        <suite-file path="Group2.xml" />
        <suite-file path="Env.xml" />
    </suite-files>

</suite>

My Expectation : Only tests grouped as "group2" should execute.
But i see that all the tests in the suite files are getting executed.


Thanks,
-Harish

On Sun, Feb 21, 2016 at 7:12 PM, Krishnan Mahadevan <[hidden email]> wrote:
Harish,
Have you tried using it in the latest TestNG version ? If yes, what do you see ?

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 Sun, Feb 21, 2016 at 5:59 AM, Harish Appannagari <[hidden email]> wrote:
Cedric,
This an old post and I am currently in need of this feature. The beta link provided below is not available any more. Is this feature of having to use groups at suite level available at all now ?

Regards,
-Harish

On Monday, May 23, 2011 at 1:01:01 PM UTC-7, Cedric wrote:
Hi Mehul,

I just implemented this feature in the beta:  http://testng.org/beta

You can now specify a groups tag under <suite>:

<suite name="SingleSuite" verbose="2" parallel="false" thread-count="4"

    data-provider-thread-count="3">


  <groups>

    <run>

      <include name="a" />

    </run>

  </groups>


  <parameter name="n" value="42" />



Note that just like the annotation @Test(groups), groups specified this way are accumulative. In other words, if you include group "a" in <suite> and "b" in <test>, both "a" and "b" will be run.

Obviously, this applies to the exclusion of groups as well.

Let me know how this works for you.

-- 
Cédric




2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

Not at all, what you're asking makes perfect sense and it's actually fairly consistent with TestNG's overall XML philosophy, where you can define tags in <suite> that you can then override in <test>. Here, I just need to pull this definition from <test> into <suite>...

-- 
Cédric




On Mon, May 23, 2011 at 11:59 AM, Mehul Sanghvi <[hidden email]> wrote:
2011/5/23 Cédric Beust ♔ <[hidden email]>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

      Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
   <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
        we define Tests elements and thus avoid parameter name clashing.
   -->
   <test name="Core" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards (would be nice to have that) -->
           <class name="com.fubar.utils.TestTimestamp"/>
           <class name="com.fubar.utils.TestUtils"/>
           <class name="com.fubar.datamodel.TestSyncObject"/>
           <class name="com.fubar.datamodel.TestArrayList"/>
           <class name="com.fubar.datamodel.TestHashMapList"/>
           <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
           <class name="com.fubar.datamodel.TestSortedArrayList"/>
       </classes>
   </test>

   <test name="Personnel" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards -->
           <class name="com.fubar.accessmodel.TestAccess"/>
       </classes>
   </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

    <groups>

           <exclude name="non-standard" />
           <exclude name="performance" />
           <exclude name="functional" />

    </groups>

   <test ........ >

   </test>

   <test ..........>

   </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: [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.



--
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 https://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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/a504gCYpT28/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://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 https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groups at the suite level

Krishnan Mahadevan
Harish,
I hope you went through the thread completely.

This thread talks about supporting inclusion and exclusion of groups at <suite> level.

You are asking about something else.

What is currently available as implementation in the latest version of TestNG is the below ability :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="GroupSuite" parallel="false" verbose="3">
<groups>
<run>
<include name="a"/>
</run>
</groups>
<test name="GroupBTest" verbose="2">
<groups>
<run>
<include name="b"/>
</run>
</groups>
<packages>
<package name="organized.chaos.testng.foo"/>
</packages>
</test>
</suite>
The above suite file will cause methods that below to groups "a" and "b" in all the test classes that reside inside organized.chaos.testng.foo package to be executed.
In the above example you can also define exclusions at the suite level and that would get applied for all the <test> tags in your suite file.

What you are asking for is NOT yet supported in TestNG to the best of my knowledge.






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 Tue, Feb 23, 2016 at 12:40 AM, Harish Appannagari <[hidden email]> wrote:
Any update for me on this issue ? I see that groups defined at the parent suite level do not flow to child suites.


Regards,
-Harish

On Mon, Feb 22, 2016 at 12:26 AM, Harish Appannagari <[hidden email]> wrote:
I tried with :  compile 'org.testng:testng:6.9.10'
Note : I am not seeing an error but I see that tests are not getting executed as per my assumption.

Here is my sample xml suite :
<suite name="SingleSuite" >

    <groups>
        <run>
            <include name="group2" />
        </run>
    </groups>


    <suite-files>
        <suite-file path="Group1.xml" />
        <suite-file path="Group2.xml" />
        <suite-file path="Env.xml" />
    </suite-files>

</suite>

My Expectation : Only tests grouped as "group2" should execute.
But i see that all the tests in the suite files are getting executed.


Thanks,
-Harish

On Sun, Feb 21, 2016 at 7:12 PM, Krishnan Mahadevan <[hidden email]> wrote:
Harish,
Have you tried using it in the latest TestNG version ? If yes, what do you see ?

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 Sun, Feb 21, 2016 at 5:59 AM, Harish Appannagari <[hidden email]> wrote:
Cedric,
This an old post and I am currently in need of this feature. The beta link provided below is not available any more. Is this feature of having to use groups at suite level available at all now ?

Regards,
-Harish

On Monday, May 23, 2011 at 1:01:01 PM UTC-7, Cedric wrote:
Hi Mehul,

I just implemented this feature in the beta:  http://testng.org/beta

You can now specify a groups tag under <suite>:

<suite name="SingleSuite" verbose="2" parallel="false" thread-count="4"

    data-provider-thread-count="3">


  <groups>

    <run>

      <include name="a" />

    </run>

  </groups>


  <parameter name="n" value="42" />



Note that just like the annotation @Test(groups), groups specified this way are accumulative. In other words, if you include group "a" in <suite> and "b" in <test>, both "a" and "b" will be run.

Obviously, this applies to the exclusion of groups as well.

Let me know how this works for you.

-- 
Cédric




2011/5/23 Cédric Beust ♔ <[hidden email]>
Hi Mehul,

Not at all, what you're asking makes perfect sense and it's actually fairly consistent with TestNG's overall XML philosophy, where you can define tags in <suite> that you can then override in <test>. Here, I just need to pull this definition from <test> into <suite>...

-- 
Cédric




On Mon, May 23, 2011 at 11:59 AM, Mehul Sanghvi <[hidden email]> wrote:
2011/5/23 Cédric Beust ♔ <[hidden email]>:
> On Wed, May 18, 2011 at 8:30 AM, Mehul Sanghvi <[hidden email]>
> wrote:
>>
>> Is it possible to exclude groups at the suite level ?
>
> I'm not sure I understand what you're asking, can you give an example?
> --
> Cédric
>

Cedric,

      Let me see if I can clarify it.   Here is a sample of what we
have now in our testNG.xml:





<suite name="Checkins" verbose="3" >
   <!-- Since test input parameters cannot be defined on per-class
basis, only at the Suite and the Test level,
        we define Tests elements and thus avoid parameter name clashing.
   -->
   <test name="Core" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards (would be nice to have that) -->
           <class name="com.fubar.utils.TestTimestamp"/>
           <class name="com.fubar.utils.TestUtils"/>
           <class name="com.fubar.datamodel.TestSyncObject"/>
           <class name="com.fubar.datamodel.TestArrayList"/>
           <class name="com.fubar.datamodel.TestHashMapList"/>
           <class name="com.fubar.datamodel.TestLinkedHashMapList"/>
           <class name="com.fubar.datamodel.TestSortedArrayList"/>
       </classes>
   </test>

   <test name="Personnel" preserve-order="true">
       <groups>
           <run>
               <exclude name="non-standard"/>
               <exclude name="performance"/>
               <exclude name="functional"/>
           </run>
       </groups>
       <classes>
           <!-- does not take wild cards -->
           <class name="com.fubar.accessmodel.TestAccess"/>
       </classes>
   </test>

</suite>




If you see above, the <groups> that are excluded are the same and are
repeated over and over again.  It would be nice to be able to do that
sort of thing at the suite level:


<suite>

    <groups>

           <exclude name="non-standard" />
           <exclude name="performance" />
           <exclude name="functional" />

    </groups>

   <test ........ >

   </test>

   <test ..........>

   </test>


</suite>



This makes it easier to have a "default" group that all tests belong
to.   I may be getting my terminology wrong as I just
started with TestNG. More then that I'm acting as the gateway for
other people within the development group so there is
bound to be something lost in the translation, but hope this helps.

Essentially I'm trying to get a framework on top of TestNG that allows
the developers to write and run tests/groups of tests
much more easily and simply.  In order to do that, any @Test notation
implies a default group called "check-in"  otherwise
the test has an explicitly named group.  I don't see a way to run a
suite of tests and say "for this suite I want you to use only
tests that belong to the default group, not any of the explicityl
named groups like "non-standard" "performance" "functional".




--
Mehul N. Sanghvi
email: [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.



--
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 https://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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/a504gCYpT28/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://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 https://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 https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groups at the suite level

Moustakas42
In reply to this post by Mehul Sanghvi-2
Is it in any way possible to define group dependencies at they suite level, bypassing test class hierarchy?

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