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

边栏推荐
- Redis hash underlying data structure
- Character stream learning 14.3
- 2019年全球十大半导体厂商:英特尔重回第一,苹果逆势大涨
- [C language] address book (dynamic version)
- 给网站套上Cloudflare(以腾讯云为例)
- RPA流程自动化机器人是什么技术?如何实现办公自动化?
- 【C语言】通讯录(动态版本)
- 【CVA估值训练营】如何快速读懂上市公司年报——第四讲
- [CVA valuation training camp] how to quickly read the annual reports of listed companies - Lesson 4
- Winform怎么使用FTP实现自动更新
猜你喜欢

QT with OpenGL(Shadow Mapping)(平行光篇)

Normality of confidence interval

Record the errors about formatc in R language

Lua基础语法学习

Learn more about xxE injection

详解分布式系统的幂等
Software test function test full set of common interview questions [function test] interview summary 4-2

Key points of data management

【JS 逆向百例】某公共资源交易网,公告 URL 参数逆向分析

File & recursion 14.1
随机推荐
一加将在2020年释放ODM订单,发力中低端市场
Redis hash underlying data structure
Shuffle, partition and read of tfrecord
Binary conversion method
五子棋人机对战实现
Nail alarm tool
[soft test software evaluator] 2014 comprehensive knowledge over the years
Arm32 for remote debugging
基于原生js实现今日新闻网站
Those "experiences and traps" in the data center
数据中台的那些“经验与陷阱”
Huawei Hongmeng 3 was officially released, and this security feature has solved a major pain point
[number recognition] recognize 0-9 numbers based on Hopfield neural network with matlab code
Zabbix4.0 uses SNMP agent to monitor vcenter6.5
主数据管理理论与实践
你的列表很卡?这4个优化能让你的列表丝般顺滑
疫情之下,台积电一季度增长超预期,7nm占比35%!二季度或创新高
Zabbix4.0使用SNMP代理方式监控vcenter6.5
Smartrefresh nested multiple recycleview sliding conflicts and incomplete layout display
Yijia will release ODM orders in 2020 and make efforts in the middle and low-end market