No tests found matching 【junit 异常】
来源:互联网 发布:云计算行业发展趋势 编辑:程序博客网 时间:2024/05/29 07:46
这是今天在做maven配置junit时出现的异常:
java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=sayTest], {ExactMatcher:fDisplayName=sayTest(com.test.maven.maven.MainTest)], {LeadingIdentifierMatcher:fClassName=com.test.maven.maven.MainTest,fLeadingIdentifier=sayTest]] from org.junit.internal.requests.ClassRequest@630bd3f1
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:40)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createFilteredTest(JUnit4TestLoader.java:77)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:68)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
这个异常的出现是junit对测试方法的方法名书写格式的改变,因为继承了TestCast类
没有继承TestCast的是这样的一种格式
@Test
public void addTest(){};
----------------------------------------------------------------------------------------
继承TestCast的取消了@Test的注解格式,不过方法名前面要加test,如下
public void testAdd()
0 0
- No tests found matching 【junit 异常】
- junit异常(No tests found matching)
- initializationError(org.junit.runner.manipulation.Filter), No tests found matching型异常
- JUnit:java.lang.Exception: No tests found matching Method ***
- Junit报错:java.lang.Exception: No tests found matching
- Junit测试问题:java.lang.Exception: No tests found matching
- no junit tests found
- bug解决-Junit运行时,出现No tests found matching Method xxxxxById(cn.bytestream.mongodb.MongoDB4CRUDTest)
- 谈一谈JUnit神奇的报错 java.lang.Exception:No tests found matching
- junit的错误 No tests found matching [{ExactMatcher:fDisplayName=test2],
- spring-test+junit测试出现java.lang.Exception: No tests found matching
- 谈一谈JPA遇到的:JUnit神奇的报错 java.lang.Exception:No tests found matching
- java.lang.Exception: No tests found matching
- java.lang.Exception: No tests found matching
- java.lang.Exception: No tests found matching
- junit.framework.AssertionFailedError: No tests found in
- JUnit4写测试用例异常: java.lang.Exception: No tests found matching处理办法
- no tests found matching[{ExactMatcher:fDisplayName=testSave}]
- ElasticSearch默认的分页参数 size
- ConcurrentHashMap的实现原理和源码分析
- git&github常用命令
- 多选框的全选和反选
- eclipse最有用快捷键整理
- No tests found matching 【junit 异常】
- Jpush使用总结 _ 客户端定义通知栏样式
- 你不要太天真,招聘广告到底能信几成?
- 从PHP语法糖剖析Zend VM引擎
- 【Android 界面技巧】输入框不聚焦,以及首次点击清空输入框
- SpringMvc自定义拦截器
- 【Web】Jsp基础学习
- 全排列问题
- C# webservices 天气预报 VS2015版本