while creating dynamic suite, how to add all the @Test or classes with out any input

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

while creating dynamic suite, how to add all the @Test or classes with out any input

Rejish R
Hi, 

I am using IAlterSuiteListener to create dynamic suite (https://rationaleemotions.wordpress.com/2017/09/29/building-dynamic-testng-suites/). I would like to know how to add all the package/class/tests with out any external input. That is, I will specify say "run all test" to run my complete test suite which looks as below:

- Package A
 - Package A1
    a) class A11 contains one @Test
    b) class B11  contains one @Test
    c) class C11 contains two @Test
- Package A2
    a) class A12 contains one @Test
    b) class B12  contains one @Test
    c) class C12 contains two @Test

- Package B
 - Package B1
    a) class A21 contains one @Test
    b) class B21  contains one @Test
    c) class C21 contains two @Test
- Package A2
    a) class A22 contains one @Test
    b) class B22  contains one @Test
    c) class C22 contains two @Test

Note: I know, we can provide multiple package names with a comma separated list. But I am looking for a case where I specify "ALL" and it should execute all my @Tests.

Thanks in Advance!

- Rejish
 

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

Re: while creating dynamic suite, how to add all the @Test or classes with out any input

Rejish R

I was able to figure out the solution.

To pass all packages from command line then we can use the command "-Dpackage=.*". It will take all packages.
On Monday, March 12, 2018 at 11:39:41 AM UTC+5:30, Rejish R wrote:
Hi, 

I am using IAlterSuiteListener to create dynamic suite (<a href="https://rationaleemotions.wordpress.com/2017/09/29/building-dynamic-testng-suites/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.wordpress.com%2F2017%2F09%2F29%2Fbuilding-dynamic-testng-suites%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH7uV44U1oPz_7vwCzVllTtk5nSxw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.wordpress.com%2F2017%2F09%2F29%2Fbuilding-dynamic-testng-suites%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH7uV44U1oPz_7vwCzVllTtk5nSxw&#39;;return true;">https://rationaleemotions.wordpress.com/2017/09/29/building-dynamic-testng-suites/). I would like to know how to add all the package/class/tests with out any external input. That is, I will specify say "run all test" to run my complete test suite which looks as below:

- Package A
 - Package A1
    a) class A11 contains one @Test
    b) class B11  contains one @Test
    c) class C11 contains two @Test
- Package A2
    a) class A12 contains one @Test
    b) class B12  contains one @Test
    c) class C12 contains two @Test

- Package B
 - Package B1
    a) class A21 contains one @Test
    b) class B21  contains one @Test
    c) class C21 contains two @Test
- Package A2
    a) class A22 contains one @Test
    b) class B22  contains one @Test
    c) class C22 contains two @Test

Note: I know, we can provide multiple package names with a comma separated list. But I am looking for a case where I specify "ALL" and it should execute all my @Tests.

Thanks in Advance!

- Rejish
 

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