@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. Leetcode 712. 两个字符串的最小ASCII删除和

    题目描述: https://leetcode-cn.com/problems/minimum-ascii-delete-sum-for-two-strings/ 解题思路: 也是典型的dp问题.利用二 ...

  2. ABP集成短信发送模块

    ABPZero并没有手机短信发送功能,现在我们来集成一个,为后面注册.登录作铺垫. 阿里云短信服务 首先需要在阿里云开通短信服务,连接地址 开通后,在签名管理中添加一个签名 在模板管理中添加一个模板, ...

  3. Alpha冲刺随笔集

    作业地址 项目名称:高校实验室信息化管理系统 团队成员 学号 姓名 031602636 许舒玲 031602237 吴杰婷 031602220 雷博浩 031602634 吴志鸿 181600107 ...

  4. Eclipse: Difference between clean, build and publish

    https://stackoverflow.com/questions/5656989/eclipse-difference-between-clean-build-and-publish http: ...

  5. Java的JDK下Hashtable与HashMap的区别

    时间角度: Hashtable * @since JDK1.0 ; HashMap* @since   1.2 基类与接口角度: public class Hashtable<K,V> e ...

  6. FICO基础知识(二)

    FI中的maser data: COA (Chart Of Account)  科目表 Account 科目 Vendor master dada  供应商主数据 Customer master da ...

  7. python删除数组元素导致跳过元素

    复现的情况大概可以写成这样 abc = [1, 2, 2, 3, 4] print abc for index, i in enumerate(abc): if i == 2: del abc[ind ...

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

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

  9. PostgreSQL之连接数修改

    当前总共正在使用的连接数 select count(1) from pg_stat_activity; 显示系统允许的最大连接数 show max_connections; 显示系统保留的用户数 sh ...

  10. python矩阵水平镜像

    方法1: label = label.T[::-1].transpose() 方法2: label = label[:,::-1] 方法3: 使用 numpy.fliplr https://docs. ...