@RunWith(SpringRunner.class)
@SpringBootTest
public class BusinessTest {
@Test
public void getList() {
System.out.println("aaaaaaaaaa");
}
}

改成

@RunWith(SpringRunner.class)
@SpringBootTest(classes=BusinessService.class)//这里的BusinessService.class指要测试的类
public class BusinessTest {
@Test
public void getList() {
System.out.println("aaaaaaaaaa");
}
}

就可以了

JUnit报错 java.lang.Exception:No tests found matching的更多相关文章

  1. 谈一谈JUnit神奇的报错 java.lang.Exception:No tests found matching

    最近在学习Spring+SpringMVC+MyBatis,一个人的挖掘过程确实有点艰难,尤其是有一些神奇的报错让你会很蛋疼.特别是接触一些框架还是最新版本的时候,会因为版本问题出现很多错误,欢迎大家 ...

  2. 使用 JUnit 报错 java.lang.Exception: No runnable methods

    错误详情如下: java.lang.Exception: No runnable methods at org.junit.runners.BlockJUnit4ClassRunner.validat ...

  3. junit test 报错,java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=esopCreateTest],

    java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=esopCreateTest], {ExactMatc ...

  4. java.lang.Exception: No tests found matching Method tes(com.bw.test.Testrefiect) from org.junit.vintage.engine.descriptor.RunnerRequest@3bfdc050 at org.junit.internal.requests.FilterRequest.getRunner

    junit   方法  没有加上注解  @Test java.lang.Exception: No tests found matching Method tes(com.bw.test.Testre ...

  5. java.lang.Exception: No tests found matching(Junit测试异常)

    java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=save], {ExactMatcher:fDispl ...

  6. 错误:java.lang.Exception: No tests found matching Method testPrePage1(egou_manager_web.TestEBrand) from org.junit.internal.requests.ClassRequest@4f3cc73c

    今天测试分页时出现以下错误: java.lang.Exception: No tests found matching Method testPrePage1(egou_manager_web.Tes ...

  7. java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=test]解决办法

    在进行简单的Junit单元测试时,测试一直报错: 先来看一下我的单元测试类: import org.junit.Test; import org.junit.runner.RunWith; impor ...

  8. 测试--错误java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=select], {ExactMatcher:fDisplayName=select(com.rjj.demo.DemoApplicationTests)]...

    异常这个错误java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=select], {ExactMatche ...

  9. 关于java.lang.Exception:No tests found matching的一系列解决方法

    问题描述: java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=yahaa], {ExactMatcher ...

随机推荐

  1. python 中的三元表达式及lambda

    一.三元表达式 举一个简单的列子,很多地方都有这样的规定,比如用水或者用电,假设用水价格为3R/立方米,当你每个月用超过7立方米后,超出的水按照3.3R/立方米计价.然后写一个程序计算一个家庭每月的水 ...

  2. MySQLi面向对象实践--select

    对于update.insert.delete请参考http://www.cnblogs.com/-beyond/p/8457580.html 执行select,如果SQL语句执行成功,那么返回的是一个 ...

  3. MySQL基础~~增、删、改、简单查

    mysql> desc demo; +-----------+------------+------+-----+---------+----------------+ | Field | Ty ...

  4. Difference between prop and attr in different version of jquery

    jQuery <1.9$('#inputId').attr('readonly', true); jQuery 1.9+$('#inputId').prop('readonly', true); ...

  5. children()与find()区别

    1.children() 返回被选元素的所有直接子元素,该方法只会向下一级对 DOM 树进行遍历: 2.find() 返回被选元素的后代元素,一路向下直到最后一个后代.

  6. python自动化运维笔记2 —— IP地址处理模块IPy

    1.2 实用的IP地址处理模块IPy ip地址规划是网络设计中非常重要的一个环节,规划的好坏会直接影响路由协议算法的效率,包括网络性能.可扩展性等方面,在这个过程当中,免不了要计算大量的IP地址,包括 ...

  7. .gitignore & .DS_Store

    .gitignore & .DS_Store https://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-file ...

  8. entity framework 缓存干扰的数据不一致问题

    本来EF的设计上DbContext就应该是一个短暂存在的对象,所以它默认才开了缓存和自动检测对象修改之类的功能,而且不是线程安全的.理想的生命周期应该是处理一次请求使用一个context,全局使用会带 ...

  9. 【转】CNN卷积神经网络_ GoogLeNet 之 Inception(V1-V4)

    http://blog.csdn.net/diamonjoy_zone/article/details/70576775 参考: 1. Inception[V1]: Going Deeper with ...

  10. mysql and不能同时运用在一个字段上