我正在尝试使用参数执行JUNIT测试。
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.beust.jcommander.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class QtyByParam extends TestBase_Post {我包括了junit-4.11.jar,junit-dep-4.11.jar
有什么遗漏了吗?我在Type mismatch: cannot convert from Class<Parameterized> to Class<? extends Runner>部分得到了@RunWith错误。
发布于 2014-06-26 13:32:55
您输入了错误的类:
import com.beust.jcommander.Parameterized;这是正确的导入:
import org.junit.runners.Parameterized;发布于 2014-06-26 13:31:42
看来你的进口是错的。变化
import com.beust.jcommander.Parameterized;至
import org.junit.runners.Parameterized;https://stackoverflow.com/questions/24431889
复制相似问题