[testng-users] Multiple suites per testng.xml file

9,119 views
Skip to first unread message

Willie Owens

unread,
Aug 1, 2011, 7:36:09 PM8/1/11
to testng-users
Can you have multiple suites per xml file? I've tried and am getting a
parsing error. If not, what is best practice for running multiple
suites? Should I just launch testng w/ different xml suite files
sequentially? or can you declare multiple suites per xml file and
specify which one to launch?

Cédric Beust ♔

unread,
Aug 1, 2011, 7:50:18 PM8/1/11
to testng...@googlegroups.com
You can include other .xml files in a testng.xml.

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


Willie Owens

unread,
Aug 2, 2011, 7:11:50 PM8/2/11
to testng-users
That'll work, thanks.

On Aug 1, 4:50 pm, Cédric Beust ♔ <ced...@beust.com> wrote:
> You can include other .xml files in a testng.xml.
>
> --
> Cédric
>

Joe Li

unread,
Aug 8, 2011, 2:51:53 PM8/8/11
to testng-users
I would also like to know how to do this but cannot find the
testng.xml file. Can you post a short example of what you did once
you got this working?

Thanks,
Joe

On Aug 2, 4:11 pm, Willie Owens <willie.owen...@gmail.com> wrote:
> That'll work, thanks.
>
> On Aug 1, 4:50 pm, Cédric Beust ♔ <ced...@beust.com> wrote:
>
>
>
>
>
>
>
> > You can include other .xmlfiles in a testng.xml.
>
> > --
> > Cédric
>
> > On Mon, Aug 1, 2011 at 4:36 PM, Willie Owens <willie.owen...@gmail.com>wrote:
>
> > > Can you havemultiplesuites perxmlfile? I've tried and am getting a
> > > parsing error. If not, what is best practice for runningmultiple
> > > suites? Should I just launch testng w/ differentxmlsuite files
> > > sequentially? or can you declaremultiplesuites perxmlfile and

吴亭

unread,
Aug 8, 2011, 10:58:20 PM8/8/11
to testng...@googlegroups.com
Hi Joe,

This is a demo from test ng. Maybe will be helpful for your work.

<suite name="Suite 1">

  <test name="Suite 1 Tests">
    <classes>
      <class name="test.xml.XmlVerifyTest">
         <methods>
            <include name="simple"/>
         </methods>
      </class>
    </classes>
  </test>
  <suite-files>
   <suite-file path="./suite1-1.xml" />
   <suite-file path="./suite1-2.xml" />
  </suite-files>
</suite>

2011/8/9 Joe Li <j...@kongregate.com>

Krishnan Mahadevan

unread,
Jan 16, 2013, 5:21:32 PM1/16/13
to testng...@googlegroups.com
I dont think that this is supported yet via the suite file. I know this is supported via the command line invocation or through API invocation. 

On Thursday, January 17, 2013, wrote:
Hey Tim,

I tried what you suggested to run multiple testng.xml files through 1 testng.xml the following way:
  <suite-files>
   <suite-file path="./suite1-1.xml" />
   <suite-file path="./suite1-2.xml" />
  </suite-files>


The problem i am facing is that the tests in both the included suites run sequentially and not parallely. Do you know what do we have to do to get them to run in parallel?
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/kawu-1eh7_sJ.

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.


--
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/
Reply all
Reply to author
Forward
0 new messages