当前位置:网站首页>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

边栏推荐
- 解决5G使用痛点,魅族17 mSmart 5G快省稳技术发布
- [JS reverse hundred examples] a public resource trading network, reverse analysis of announcement URL parameters
- 编辑复制粘贴判定问题(bug?),所见即所得显示符号问题反馈。
- Common Taylor expansion
- Redis 哈希Hash底层数据结构
- Error:svn: E155010: ‘/Users/.../Desktop/wrokspace/xxx‘ is scheduled for addition, but is missing
- 加速IGBT国产化!比亚迪半导体将独立上市,市值或达300亿元!
- Nail alarm tool
- urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: un
- Lua basic grammar learning
猜你喜欢

Technical certification | Tupo software and Huawei cloud create a new situation of win-win cooperation

The print version of imeta | international standard ISSN is officially confirmed, and the application for dual ISSN is completed

C # delegate usage -- console project, which implements events through delegation

详解分布式系统的幂等

Ideas, methods and steps of making folding fans with 3DMAX

29. Learn the stacked column chart of highcharts using percentage

【C语言】通讯录(动态版本)

Design and implementation of spark offline development framework

Is it really hard to understand? What level of cache is the recyclerview caching mechanism?

Flink怎么使用Savepoint
随机推荐
TSMC 3nm detail exposure: transistor density as high as 250million /mm ², Greatly improved performance and energy efficiency
硬布线控制器的特点:
NDK series (6): let's talk about the way and time to register JNI functions
[elm classification] classification of UCI data sets based on nuclear limit learning machine and limit learning machine, with matlab code
XML external entity (xxE) vulnerability and its repair method
史上最简明的 Tcpdump 入门指南,看这一篇就够了
远程调试 idea配置remote debug、在远程服务器的程序中,添加JVM启动参数-Xdebug
How to use xshell Free Edition
新技术引领大中型企业营销新变革,用友BIP CRM重磅发布!
proteus仿真arduino中调用DHT11/22温湿度传感器
虚拟存储器与Cache的比较
After returning to mixlab for three days, "creative team" cured my spiritual internal friction
Sudden, wechat important notice
低代码开发前景如何,大家都真的看好低代码开发吗?
smartRefresh嵌套多个RecycleView滑动冲突及布局显示不全
In 2019, the world's top ten semiconductor manufacturers: Intel returned to the first place, and apple rose sharply against the trend
【12月海口】2022年第六届船舶,海洋与海事工程国际会议(NAOME 2022)
[image detection] realize the detection of nostrils and pupil circles based on combined separation filter matlab source code
ZCMU--1720: 死亡如风,我要装逼
置信区间之正态