junit.framework.AssertionFailedError: No tests found in com.hyh.test.MainTest
2014-11-23 20:39
776 查看
package com.hyh.test; import java.util.List; import javax.inject.Inject; import org.junit.Test; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests; import com.hyh.entity.Student; import com.hyh.entity.Teacher; import com.hyh.mapper.Mapper; @ContextConfiguration("classpath:applicationContext-commoms.xml") public class MainTest extends AbstractJUnit38SpringContextTests { @Inject private Mapper mapper; // @Inject // private UserMapper userMapper; // @Inject // private MessageMapper messageMapper; // @Inject // private ArticleMapper articleMapper; // 注意测试函数名字的命名 @Test public void testGetStudent() { List<Student> list = mapper.getStudent(2); System.out.println(list); } @Test public void testGetTeacher() { List<Teacher> list = mapper.getTeacher(2); System.out.println(list); } }
将大写的 TestGetStudent() 修改成 testGetStudent()即可
相关文章推荐
- [已解决]junit.framework.AssertionFailedError: No tests found in com.wbm.app.business.NeedLoginTestCase
- android学习笔记转--------------junit.framework.AssertionFailedError: No tests found in错误解决办法
- android学习笔记转--------------junit.framework.AssertionFailedError: No tests found in错误解决办法
- junit.framework.AssertionFailedError: No tests found in错误解决办法
- junit.framework.AssertionFailedError: No tests found in错误解决办法
- [已解决]junit.framework.AssertionFailedError: No tests found in
- junit.framework.AssertionFailedError: No tests found in
- junit.framework.AssertionFailedError: No tests found in错误解决办法
- junit.framework.AssertionFailedError: No tests found in错误解决办法
- Junit单元测试问题 junit.framework.AssertionFailedError: Method "test" not found at android.test.AndroidTes
- error: No resource identifier found for attribute 'cardCornerRadius' in package 'com.example.test'
- junit.framework.AssertionFailedError: No...
- junit.framework.AssertionFailedError: Method "testjson" not foundat android.解决
- 单元测试-Junit 报错:No tests Found in **
- #測试相关#Getting “junit.framework.AssertionFailedError: Forked Java VM exited abnormally” Exception
- junit.framework.AssertionFailedError: No tests found in com.cloud.hypervisor.xen.resource.XenServerTest at junit.framework.Assert.fail(Assert.java:47
- Exception in thread "main" java.lang.IncompatibleClassChangeError: Found interface com.mysql.jdbc.Co
- junit.framework.AssertionFailedError: No tests found in JUnit.test at junit junit.framework.Asserti
- 解决问题:Initializing test library 'AutoItLibrary' with no arguments failed: com_error: (-2147221164, '\
- no tests found with test runner 'JUnit 5' 或者'JUnit4' 异常 的解决方案