junit单元测试@Test报错的解决办法(转载http://blog.csdn.net/cktmyh/article/details/50503468)

今天写了个单元测试,然后buildpath里add library选择了junit,然后出现了奇怪的现象,@Before、@After可以用,@Test就会报错(“Test is not an annotation type"),搜索了下,解决方案如下,不需要引入 import  org.junit.Test ,直接@org.junit.Test就可以了。

posted @ 2017-08-19 18:51  jean1  阅读(448)  评论(0编辑  收藏  举报