Here are a couple of ways of doing it:
When you create a Project, simply go to the Options tab and specify the pattern to exclude certain classes. Note that the pattern is specified in Java stye regular expressions, (which is the same as perl style regular expression). Example:
- To exclude all classes that contain the name test specify the pattern .*test.*.
- To exclude all classes that contain the strings test and Test specify the pattern .*[Tt]est.*.
- To exclude all classes with a package com.package. specify the pattern com.package\..*.
Here is a more sophisticated way of dealing with this issue.
- Load all the classes.
- In Search/Tags pane specify a search string such as test to identify all classes that have test in their name.
- In the Search Result, select $root, right click and select the menu item Cut Branch.
- Create a Test subsystem under $root. Paste the classes you just cut into that subsystem. This will move all your test classes into the Test subsystem.
Why is this more powerful? It allows you to see if there are any dependencies on tests from your regular code. It allows you to see how your tests depend on each other. It allows you to see what tests should be rerun if you change something in your code. Of course, if none of this matters, you can then always delete or hide the test subsystem thereby removing tests from the model.