【问题标题】:sbt test ends with No tests to run for test:test under Jenkinssbt 测试以 No tests to run for test:test 在 Jenkins 下结束
【发布时间】:2013-09-22 01:06:40
【问题描述】:

作为一名前 Java 开发人员,我习惯于每次执行构建时都使用 Jenkins 来启动 JUnit 测试,我希望让我的 Specs 以类似的方式运行。

在命令行中运行sbt test 时,我设置的测试用例运行良好。以下是测试运行的输出:

    [info] MySqlStoreSpec
    [info] 
    [info] MySqlStore Spec should
    [info] + getUserIdFromEmail
    [info] + getUserUserProperties
    [info] + getUserHashFromEmail
    [info] + md5
    [info] + getUserContextFromStripeId
    [info] 
    [info] 
    [info] Total for specification MySqlStoreSpec
    [info] Finished in 24 ms
    [info] 5 examples, 0 failure, 0 error

当我在 Jenkins 中运行构建时,我收到以下消息:

    [info] No tests to run for test:test

我怀疑没有启动测试的问题与我在 Jenkins 中的sbt 设置有关。在构建的配置中,我使用 sbt 启动器 0.12.4 和操作 test。有没有人有让 specs2 在 Jenkins 上运行的经验?

【问题讨论】:

    标签: jenkins sbt


    【解决方案1】:

    原来问题是在错误的目录上执行构建。从 git 签出项目后,需要移动到子目录才能访问项目文件。似乎 SBT 报告运行成功,即使它没有找到项目文件。

    【讨论】:

    • 我试过了。在发布问题和接受我自己的答案之间,我必须等待两天。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-30
    • 1970-01-01
    • 2022-11-21
    • 1970-01-01
    • 2021-05-08
    • 1970-01-01
    相关资源
    最近更新 更多