Hi!
I'm looking for a way to only run a few tests instead of all existings JUnit test cases in our automated build, which uses ant. I can't add @ignore annotations in the code since it would take to much time. Is there a way to define which test cases/classes Junit should run during the build process?

Thanks!

Recommended Answers

You can use JUnit Test Suites to get a fine grained control on which tests get executed. Create a test suite, run it and it will automatically run only the included test classes.

Jump to Post

All 2 Replies

You can use JUnit Test Suites to get a fine grained control on which tests get executed. Create a test suite, run it and it will automatically run only the included test classes.

Yes, I know that. I was actually thinking about how to set up testing in ant to filter out which classes that I want to be tested and not. There was an ant task defining exactly that, which I changed to fit my needs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.