错误: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.TestEBrand) from org.junit.internal.requests.ClassRequest@4f3cc73c
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:35)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestMethodReference.<init>(JUnit4TestMethodReference.java:25)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:54)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
测试代码如下:
@Test
public void testPrePage1() { ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("spring/applicationContext_*.xml");
BrandService brandService = (BrandService) ac.getBean("brandService");
EBrandExample example = new EBrandExample();
// 执行查询,并分页
// 分页处理
PageHelper.startPage(2, 3);
List<EBrand> list = brandService.selectByExample(example);
// 取商品列表
for (EBrand tbItem : list) {
System.out.println(tbItem);
}
// 取分页信息
PageInfo<EBrand> pageInfo = new PageInfo<EBrand>(list);
long total = pageInfo.getTotal();
System.out.println("共有商品:" + total); }
不知哪里出了问题?望高手告知~~
错误: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 [{ExactMatcher:fDisplayName=select], {ExactMatcher:fDisplayName=select(com.rjj.demo.DemoApplicationTests)]...
异常这个错误java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=select], {ExactMatche ...
- 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 ...
- 谈一谈JUnit神奇的报错 java.lang.Exception:No tests found matching
最近在学习Spring+SpringMVC+MyBatis,一个人的挖掘过程确实有点艰难,尤其是有一些神奇的报错让你会很蛋疼.特别是接触一些框架还是最新版本的时候,会因为版本问题出现很多错误,欢迎大家 ...
- 关于java.lang.Exception:No tests found matching的一系列解决方法
问题描述: java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=yahaa], {ExactMatcher ...
- java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=test]解决办法
在进行简单的Junit单元测试时,测试一直报错: 先来看一下我的单元测试类: import org.junit.Test; import org.junit.runner.RunWith; impor ...
- junit test 报错,java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=esopCreateTest],
java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=esopCreateTest], {ExactMatc ...
- java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=testSelect], {ExactMatcher:fDisplayName=testSelect(cool.zsn.Dao.UserMapperTest)], {LeadingIdentifierMatcher:fClassName=cool.zsn
@Before:每次调用类中的方法,都会先执行@Before下的方法 @Before下的方法应该是 public : @Before public void init() { application ...
- java.lang.Exception: No tests found matching(Junit测试异常)
java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=save], {ExactMatcher:fDispl ...
- java.lang.Exception: No tests found matching
java.lang.Exception: No tests found matching 需要导入junit.jar 和 hamcrest.jar
随机推荐
- 常用linux的命令
常用但是容易忘记的命令 查看java项目的进程 ps -ef | grep java jps 根据进程查询端口 lsof -i | grep pid netstat -nap | grep pid p ...
- 二.安全NA之ASA基础
一.ASA常用命令 show run interface #查看接口配置 show ip address #查看IP地址 show conn #查看防火墙状态信息,U代表up:I,代表进流量:O,代表 ...
- 前端中的设计模式 JavaScript
最近再准备秋招,然后顺便把过去空白的设计模式相关概念补一补,这些内容都是从<JavaScript设计模式与开发实践>一书中整理出来的 (1)单例模式 定义:保证一个类仅有一个实例,并提供一 ...
- Linux安装配置Samba共享文件系统
Samba共享文件系统搭建与配置: 1.Samba服务端:yum install samba samba-client cifs-utilscd /etc/samba/cp smb.conf smb. ...
- poli-java开源BI软件
目录 快速入门 Github地址: 特性 一个易于使用的SQL报告应用程序,专为SQL爱好者而设计. SQL中的电源数据分析,可获得更快的业务洞察力. 快速入门 https://shzlw.githu ...
- Unity进阶:行为树 02 夺旗战搭建场景,AI脚本,旗子拿起
版权申明: 本文原创首发于以下网站: 博客园『优梦创客』的空间:https://www.cnblogs.com/raymondking123 优梦创客的官方博客:https://91make.top ...
- CRNN+CTC (基于CTPN 的end-to-end OCR)
1. https://zhuanlan.zhihu.com/p/43534801 (详细原理) 2. https://blog.csdn.net/forest_world/article/detai ...
- Redis学习总结(七)--Redis集群之客户端访问
我们来试试进行数据的存储 127.0.0.1:7000> set name marklogzhu OK 127.0.0.1:7000> get name "marklogzhu& ...
- 从0到1体验Jenkins+Docker+Git+Registry实现CI自动化发布
一.前言 Jenkins是一款开源 CI&CD 软件,用于自动化各种任务,包括构建.测试和部署软件.Jenkins 支持各种运行方式,可通过系统包.Docker 或者通过一个独立的 Java ...
- Interger等包装类的比较
Integer a = 1; integer b = 1; integer c = 500; integer d=500; System.out.print(a==b); System.out.pri ...