zoukankan      html  css  js  c++  java
  • 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结尾的,改成其他的即可

  • 相关阅读:
    C#线程使用学习
    C# 线程
    C# Lambda表达式与Linq
    C#聚合运算方法
    责任链模式
    代理模式
    享元模式
    门面模式(外观模式)
    桥梁模式
    设计模式-创建型、结构型、行为型之间的区别
  • 原文地址:https://www.cnblogs.com/xiaodebing/p/10337239.html
Copyright © 2011-2022 走看看