TestNG support - Exclude Groups

From the testng default settings in Intellij 9 I can see where I can specify the default groups to run. However, in my case I want to exclude groups and run all tests that are NOT part of one of the specified groups. Is this possible?

Thanks,
Bob

3 comments
Comment actions Permalink

personally, I find it best to work with a testng.xml that define my
test suite. You can define VERY precisely what test to include/exclude.

I use maven to run the suite and Idea to run test I need to debug.


On 2010-12-08 04:17:40 +0800, B J <no_reply@jetbrains.com> said:

From the testng default settings in Intellij 9 I can see where I can
specify the default groups to run. However, in my case I want to
exclude groups and run all tests that are NOT part of one of the
specified groups. Is this possible?

Thanks,
Bob

---
Original message URL: http://devnet.jetbrains.net/message/5280002#5280002



0
Comment actions Permalink

Hi,

To add to what nodje said, I'll point out that the group-oriented mode of the TestNG runner is very slow. My team has written a tools based on an annotation extraction tool (the details of which are not at hand at the moment) to build an index of TestNG annotations and to then allow constructing custom testng.xml files that express the test combinations we wish to be able to run.

For reasons I do not understand, running the annotation extractor and the test builder is much faster than any single invocation of the TestNG plug-in in group mode.


Randall Schulz

0
Comment actions Permalink

Thanks, guys. I switched to using suite files and it seems to do what I want with the exception of 4 test cases that fail _only_ when run from a suite. Running the class with the test cases directly within IDEA (e.g. - not through running the suite in IDEA) works just fine. Running the test through maven works just fine. Running the suite through eclipse works just fine. Very weird. I've taken to just excluding those 4 tests from my suite and having my continuous builds on the hudson server catch any errors with those tests.

I like the idea of being able to dynamically create the list of tests to run - especially if it takes longer as you say to do determine the tests within IDEA. Of course, my tests are so slow for various reason I shall not get into that even if this determination takes a few minutes it'd just be a drop in the bucket compared to the length of time the test will run... *sigh*

Bob

0

Please sign in to leave a comment.