今天测试分页时出现以下错误:

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的更多相关文章

  1. 测试--错误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 ...

  2. 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 ...

  3. 谈一谈JUnit神奇的报错 java.lang.Exception:No tests found matching

    最近在学习Spring+SpringMVC+MyBatis,一个人的挖掘过程确实有点艰难,尤其是有一些神奇的报错让你会很蛋疼.特别是接触一些框架还是最新版本的时候,会因为版本问题出现很多错误,欢迎大家 ...

  4. 关于java.lang.Exception:No tests found matching的一系列解决方法

    问题描述: java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=yahaa], {ExactMatcher ...

  5. java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=test]解决办法

    在进行简单的Junit单元测试时,测试一直报错: 先来看一下我的单元测试类: import org.junit.Test; import org.junit.runner.RunWith; impor ...

  6. junit test 报错,java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=esopCreateTest],

    java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=esopCreateTest], {ExactMatc ...

  7. 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 ...

  8. java.lang.Exception: No tests found matching(Junit测试异常)

    java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=save], {ExactMatcher:fDispl ...

  9. java.lang.Exception: No tests found matching

    java.lang.Exception: No tests found matching 需要导入junit.jar 和 hamcrest.jar

随机推荐

  1. node一键发布,并运行

    作为一个前端开发人员如果你只会写一些业务代码,从程序员的角度来考虑已经可以了.但是从架构的角度来考虑那远远不够: 在此记录下成长中的经历: 想要达成的目的:运行一个脚本实现代码的打包,上传至服务器并部 ...

  2. HTML加载FLASH(*.swf文件)详解

    引言 在web项目中经常会遇到在线浏览word文档,通常解决方法将word转换成pdf,然后在线浏览,但是在实际实现过程中,由于阅读器的原因,用户可以直接下载该pdf,这显然不是我们想要的,通过网络搜 ...

  3. (十八)c#Winform自定义控件-提示框

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  4. AutoCAD C#二次开发

    https://www.cnblogs.com/gisoracle/archive/2012/02/19/2357925.html using System; using System.Collect ...

  5. Ubuntu Server : 自动更新

    Ubuntu(16.04/18.04) 默认会每天自动安装系统的安全更新,但是不会自动安装包的更新.本文梳理 Ubuntu 16.04/18.04 系统的自动更新机制,并介绍如何配置系统自动更新所有的 ...

  6. 源码分析Retrofit请求流程

    Retrofit 是 square 公司的另一款广泛流行的网络请求框架.前面的一篇文章<源码分析OKHttp执行过程>已经对 OkHttp 网络请求框架有一个大概的了解.今天同样地对 Re ...

  7. ID转名称到手方案01

    > 好久没有写技术文章了,那就重新捡起来,从今天开始,分享这段时间的收获吧 ------------ > ## 其实很多时候,我们只需要鱼,而不是渔,呐,给你鱼. ### 这次的分享主题是 ...

  8. SpringBoot:高并发下浏览量入库设计

    一.背景 文章浏览量统计,low的做法是:用户每次浏览,前端会发送一个GET请求获取一篇文章详情时,会把这篇文章的浏览量+1,存进数据库里. 1.1 这么做,有几个问题: 在GET请求的业务逻辑里进行 ...

  9. pycharm使用教程

    https://www.cnblogs.com/tsingke/p/7392800.html

  10. 一文搞懂Python中的所有数组数据类型

    关于我 一个有思想的程序猿,终身学习实践者,目前在一个创业团队任team lead,技术栈涉及Android.Python.Java和Go,这个也是我们团队的主要技术栈. Github:https:/ ...