initializationError(org.junit.runner.manipulation.Filter)

来源:互联网 发布:读书有用 知乎 编辑:程序博客网 时间:2024/05/17 03:35

在使用junit运行一个方法时,出现以下错误:

           TestCase.StuPKTest Unrooted Tests initializationError(org.junit.runner.manipulation.Filter) 

java.lang.Exception: No tests found matching Method testUpdate(Hibernate.Demo.Vo.stupkTest) from org.junit.internal.requests.ClassRequest@73a34b

原因:

在你测试的StuPKTest()函数上没有加@Test。哎,一个疏忽就会造成错误。以后编程要细心啊,一不小心就会犯错的。害得我找半天。

0 1