• mvn test报错


    1 Scenarios (1 passed)
    4 Steps (4 passed)
    0m11.846s
    
    [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.267 s - in cn.x1.AppTest
    [INFO] Running cn.x1.stepdefs.NhBScoreQueryTest
    [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.013 s <<< FAILURE! - in cn.x1.stepdefs.NhBScoreQueryTest
    [ERROR] initializationError(cn.x1.stepdefs.NhBScoreQueryTest)  Time elapsed: 0.005 s  <<< ERROR!
    java.lang.Exception: No runnable methods
    
    2019-01-30 10:34:24,137 [ Thread-2 ] - [ INFO  ] [ o.s.scheduling.concurrent.ThreadPoolTaskExecutor : 208 ] -
    				Shutting down ExecutorService 'applicationTaskExecutor'
    [INFO] 
    [INFO] Results:
    [INFO] 
    [ERROR] Errors: 
    [ERROR]   NhBScoreQueryTest.initializationError »  No runnable methods
    [INFO] 
    [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
    [INFO] 
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 17.620 s
    [INFO] Finished at: 2019-01-30T10:34:24+08:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project fcs_api_demo: There are test failures.
    [ERROR] 
    [ERROR] Please refer to D:	oolseclipse-jee-oxygen-2-win32-x86_64eclipseworkspacefcs_api_demo	argetsurefire-reports for the individual test results.
    [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
    [ERROR] -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
    View Code

    报错原因是因为类名是以Test结尾的,改成其他的即可

  • 相关阅读:
    select into 和 insert into select 两种表复制语句
    hql to_number
    Oracle密码过期the password has expired解决办法
    SQL脚本修改表结构
    JSP -- EL表达式
    cascade属性
    FetchType与FetchMode的区别
    @OneToMany、@ManyToOne以及@ManyToMany讲解
    Jackson实现Object对象与Json字符串的互转
    Python 编码规范
  • 原文地址:https://www.cnblogs.com/xiaodebing/p/10337239.html
Copyright © 2020-2023  润新知