Running only one test

817 views
Skip to first unread message

sujan

unread,
Jun 23, 2009, 3:29:44 AM6/23/09
to testng-users
Can we run only one test in testNG.
My classes consists of several test methods.

1. I want to run classes individually
2. I want to run individual test cases

How can I do that. I am using ant to run tests

konstanti...@gmail.com

unread,
Jun 23, 2009, 10:49:51 AM6/23/09
to testng...@googlegroups.com
to run classes individually use the following test definition in xml

...
<test name="test" parallel="methods">
<classes>
<class name="[full_class_name]"/>
</classes>
</test>
...
or groups

to run individual test cases use groups or method-selector

Groups is the most flexible and easiest way to run separate test or
test-case.

23.06.2009 11:29, sujan пишет:

Cédric Beust ♔

unread,
Jun 23, 2009, 10:50:34 AM6/23/09
to testng...@googlegroups.com
You can also specify the method to run inside the <class></class> tags...

Additionally, Eclipse will let you run a single method by right-clicking on it as well.

--
Cedric
--
Cédric


Reply all
Reply to author
Forward
0 new messages