【问题标题】:Is there a way to limit the number of test workers on AppVeyor?有没有办法限制 AppVeyor 上的测试人员数量?
【发布时间】:2016-10-29 16:53:52
【问题描述】:

在日志中说使用了 2 个测试工作人员,有没有办法将 max 配置为 1?

Run Settings
    ...
    NumberOfTestWorkers: 2

使用像下面这样的手动脚本可以工作,但当解决方案包含许多程序集时会变得混乱。

test_script:
  - nunit3-console.exe Gu.Persist.Core.Tests\bin\Release\Gu.Persist.Core.Tests.dll --result=myresults.xml;format=AppVeyor --workers=1
  - ...

【问题讨论】:

    标签: unit-testing continuous-integration appveyor


    【解决方案1】:

    AppVeyor 在没有任何 --workers 开关的情况下生成 nunit3-console 命令行。我相信工人的数量是由 nunit 控制台本身决定的。据我了解,如果您从测试中删除 Parallelizable Attribute,它将只有一名工人。

    【讨论】:

    • 我试过了,但没有解决我的问题。我怀疑有两个进程用于运行测试,但不确定。我最终写了一个锁定文件的黑客:)
    猜你喜欢
    • 2019-04-03
    • 2011-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多