Test () { JavaCompletionTestSuite suite = new JavaCompletionTestSuite(); if (!"Java Dumb Completion Tests".equals(System.getProperty("teamcity.buildConfName"))) { return suite; } suite.setName("Java completion tests suite"); System.setProperty("intellij.build.test.groups", "JAVA_TESTS"); TestCaseLoader myTestCaseLoader = new TestCaseLoader("tests/testGroups.properties"); myTestCaseLoader.fillTestCases("", TestAll.getClassRoots()); for (Class<?> aClass : myTestCaseLoader.getClasses()) { if (!aClass.getSimpleName().contains("Completion")) continue; // JavaCompletionFeaturesTest does not depend on indices if (JavaCompletionFeaturesTest.class.equals(aClass)) continue; // Exclude feature suggester tests if (aClass.getPackageName().equals("com.intellij.java.ifs")) continue; if (TestIndexingModeSupporter.class.isAssignableFrom(aClass)) { Class<? extends TestIndexingModeSupporter> testCaseClass = aClass.asSubclass(TestIndexingModeSupporter.class); TestIndexingModeSupporter.addTest(testCaseClass, new TestIndexingModeSupporter.FullIndexSuite(), suite); TestIndexingModeSupporter.addTest(testCaseClass, new TestIndexingModeSupporter.RuntimeOnlyIndexSuite(), suite); TestIndexingModeSupporter.addTest(testCaseClass, new TestIndexingModeSupporter.EmptyIndexSuite(), suite); } else if (!JavaCompletionTestSuite.class.equals(aClass)) { suite.addTest(warning("Unexpected " + aClass + " in the " + suite.getClass().getName() + " suite: " + "its name contains 'Completion' substring but it doesn't implement TestIndexingModeSupporter")); } } return suite; }