Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running only certain junit tests in a project by file name

Tags:

junit

eclipse

So i have an eclipse project, with a bunch of junit test files. I want to run all of them, except ones that have a certain suffix (or inversely, only those that have one of a set of suffixes).

Eg, i can do this in maven; i can run all tests in a project that are in files that end in "Test", and all other files are ignored.

I want to do something similar in eclipse w/o having to configure things; just based on names. Right now i would go to "run configurations.." and then select "run all tests in a selected project..", but it'll run everything it finds in there; i want to omit files based on their suffix.

Is there a way to do this in eclipse?

like image 649
Jack Avatar asked May 07 '12 22:05

Jack


1 Answers

There are several options:

  • Use cpsuite
  • Exclude them from your build path
  • Create a test suite like this or this
like image 84
alexsmail Avatar answered Oct 17 '22 12:10

alexsmail