Re: [testng-users] packages xml including the sub packages but not the base package

247 views
Skip to first unread message

吴亭

unread,
Jul 19, 2012, 9:44:45 AM7/19/12
to testng...@googlegroups.com
Hi,

I make a try for this, but can not reproduce this, my demo like this:

package
a.b
--Demo1
a.b.c
----Demo2

My xml:
<suite name="AAA" verbose="10">

    <test name="XX">

        <packages>

            <package name="a.b.*"></package>

        </packages>

    </test>


</suite>

I use the latest version of testng, maybe you need update your testng.

Br,
Tim

2012/7/19 edwolb <edw...@gmail.com>
I can't seem to find much documentation about this beyond the main testng documentation page.  If I declare a packages group in my XML file such as this:

    <packages>
 <package name="com.automation.tests.*"/>
    </packages>

and I have a directory structure like this:

com/automation/tests/
Base.class

com/automation/tests/sub/
Subdirectory.class

it seems like Subdirectory.class is included in the test, however Base.class is not included in the test.  If I change the package declaration to "com.automation.tests", it doesn't seem to run anything.  I can't use "com.automation.*" since there are other subdirectories I don't want to include.  How do I then include all tests from a directory and its subdirectories?

Thank you

--
Chris

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

edwolb

unread,
Jul 25, 2012, 11:39:16 AM7/25/12
to testng...@googlegroups.com
Thanks Tim,

The error was on my side.  I tried to delete the post, but obviously you got there before me :)

--
Chris


On Thursday, 19 July 2012 09:44:45 UTC-4, Tim-Ericsson wrote:
Hi,

I make a try for this, but can not reproduce this, my demo like this:

package
a.b
--Demo1
a.b.c
----Demo2

My xml:
<suite name="AAA" verbose="10">

    <test name="XX">

        <packages>

            <package name="a.b.*"></package>

        </packages>

    </test>


</suite>

I use the latest version of testng, maybe you need update your testng.

Br,
Tim

2012/7/19 edwolb
I can't seem to find much documentation about this beyond the main testng documentation page.  If I declare a packages group in my XML file such as this:

    <packages>
 <package name="com.automation.tests.*"/>
    </packages>

and I have a directory structure like this:

com/automation/tests/
Base.class

com/automation/tests/sub/
Subdirectory.class

it seems like Subdirectory.class is included in the test, however Base.class is not included in the test.  If I change the package declaration to "com.automation.tests", it doesn't seem to run anything.  I can't use "com.automation.*" since there are other subdirectories I don't want to include.  How do I then include all tests from a directory and its subdirectories?

Thank you

--
Chris

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/JDjVnot2bCoJ.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages