当前位置:网站首页>org.junit.runners.model. InvalidTestClassError: Invalid test class ‘com.zhj.esdemo. MysqlTests‘: 1.
org.junit.runners.model. InvalidTestClassError: Invalid test class ‘com.zhj.esdemo. MysqlTests‘: 1.
2022-07-27 23:47:00 【It's seventh uncle】
One 、 error message :
org.junit.runners.model.InvalidTestClassError: Invalid test class 'com.zhj.esdemo.MysqlTests':
1. Method mapperUse() should be public

Two 、 Troubleshooting and common causes
My unit test class is written like this ,@SpringBootTest The notes are ,@Test Also have ,@Autowired Also have

Then look carefully at this error message , Guess yes MysqlTest This name is illegal

After changing the name, it still doesn't work

2.1 One @Test’ Method called another @Test Method
The reason why this blogger is also wrong is In a belt @Test Method to adjust another belt @Test The key word method This exception occurs
The solution is simple , Remove the called method @Test Just fine 
2.2 Guide Package error ,org.junit.Test That's right
The wrong package ....
The reason for this is the use of org.junit.jupiter.api.Test
You should use org.junit.Test That's right

边栏推荐
- In 2019, the world's top ten semiconductor manufacturers: Intel returned to the first place, and apple rose sharply against the trend
- TSMC 3nm detail exposure: transistor density as high as 250million /mm ², Greatly improved performance and energy efficiency
- 数据管理的重点
- The total investment is 60billion! Foxconn semiconductor high-end package test project officially settled in Qingdao
- 携手长江存储,江波龙推出全球最小扩展卡
- 29. Learn the stacked column chart of highcharts using percentage
- 2022/7/26
- [signal processing] weak signal detection in communication system based on the characteristics of high-order statistics with matlab code
- Arm32进行远程调试
- Error:svn: E155010: ‘/Users/.../Desktop/wrokspace/xxx‘ is scheduled for addition, but is missing
猜你喜欢

重新定义分析 - EventBridge 实时事件分析平台发布

消息队列常见的几种使用场景介绍

CaEGCN: Cross-Attention Fusion based Enhanced Graph Convolutional Network for Clustering 2021

Date的使用

JUC toolkit learning

Explain the idempotence of distributed system in detail

29. Learn the stacked column chart of highcharts using percentage

Reinforcement learning - pytorch realizes advantage actor critical (A2C)

Lua基础语法学习

Spark 离线开发框架设计与实现
随机推荐
Socket interaction process of four waves
编辑复制粘贴判定问题(bug?),所见即所得显示符号问题反馈。
Huawei Hongmeng 3 was officially released, and this security feature has solved a major pain point
技术认证 | 图扑软件携手华为云再创合作共赢新局面
Tita 的OKR系统与其他同类型产品,或者是共享文档等相比,有什么优势?
NB-IoT产业的现状与未来:跨过1亿出货门槛,奔向5G大连接!
Design and implementation of spark offline development framework
My annual salary is 1million, and I don't have clothes more than 100 yuan all over my body: saving money is the top self-discipline
76000 people shut down! Toshiba announced the closure of all factories in Japan
给网站套上Cloudflare(以腾讯云为例)
reduce错误示范
他山之石 | 蚂蚁超大规模知识图谱构建及应用
Zabbix4.0使用SNMP代理方式监控vcenter6.5
C # delegate usage -- console project, which implements events through delegation
数据管理的重点
ELK日志分析系统安装和部署
ZCMU--1720: 死亡如风,我要装逼
Flutter pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:164:13: Error: Method not found: ‘descr
2022夏暑假每日一题(五)
Flink怎么使用Savepoint