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!

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.