Bug 35933 JUnit package test runner doesn't find empty tests [JUnit]
The JUnit package test runner doesn't run TestCases that don't contain any test* methods themselves (but instead only inherit them). Consider the following example: public class SimpleTest extends TestCase { public void testParser() { Parser p = getParser(); assert(...); } protected Parser getParser() { return new SimpleParser(); } } // Not executed, unless a dummy test method is inserted! public class ExtendedTest extends SimpleTest { protected Parser getParser() { return new ExtendedParser(); } }
org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/util/TestSearchEngine.java
/*******************************************************************************
 * Copyright (c) 2000, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.junit.util;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;