Community
Participate
Working Groups
When I use the "search" button in the run/debug configuration manager to search for a test class to run in the current project, only 20 results are returned, even though there are hundreds of tests in my current workspace. The same 20 results are returned every time. The steps for reproduction are simple. 1. Set up your eclipse project with source and tests. 2. Click the Run or Debug buttons to open the configuration manager. 3. Create a new Junit debug/run configuration, and use the "Run a single test" option. 4. Select the current project and click the "search" button to search for a test class. 5. Search returns only 20 results when there should be many more. results seem to be selected from random packages.
I cannot reproduce the behavior you described in your scenario. Using our test projects, I get all the JUnit test classes in the 'Test Selection' dialog when I click on the 'Search' button. Please provide more information to help us to reproduce: 1) The exact build ID you are using 2) What are the 20 classes you find in the 'Test Selection' dialog? 3) Can you reproduce this issue importing your project in a brand new workspace? 4) Anything in the .log file? Move to JDT/UI who owns this part of the launch config dialog...
What test runner is configured on the launch configuration tab?
I'm using the Junit3 test-runner, and all of the tests are written towards Junit 3. The build id is: I20070608-1718 The 20 classes I find are shown in the attached jpg. (Coming after this update ***When I import the project into a new workspace, the search works ok.
Created attachment 71602 [details] search box showing 20 classes
Looks like problem with the search index. Anything in the .log file?
If this is an Search Index issue then you shouldn't be able to open the missing JUnit test classes using the Open Type dialog. Can you confirm this point?
Where can I find the log file?
This is the .log file in the <workspace directory>\.metadata sub-directory. Another point: looking at your snapshot, I saw that your source folders are linked to external folders. Are you sure that you've performed a refresh on your current workspace project to get the folders contents in sync' with last changes?
Created attachment 71606 [details] .log file
the search seems to work fine since I restarted eclipse, but I said I'd include the .log file in case you spot anything that may have caused it.
If stop/restart eclipse fixes the problem, then it looks like a refresh issue. Next time you get this problem, just try to refresh the project. => Closing as INVALID. Please reopen if the refresh action would fail to fix this problem when it occurred again... Note that linked source folders are not recommended for eclipse projects as all changes occurring in this folders are not automatically reported in your workspace. If you really want/need to keep this architecture, then I strongly recommend to activate automatic refresh option of your workspace (Preferences -> General -> Workspace -> Refresh Automatically) to avoid this kind of troubles in the future...