【问题标题】:how to set profiles using parallel_tests gem如何使用 parallel_tests gem 设置配置文件
【发布时间】:2013-06-07 09:26:22
【问题描述】:

使用并行测试 gem 时如何指定黄瓜配置文件?

如果我要从命令行启动 cucumber(使用 Jruby)我会这样做

Jruby -S cucumber -p profile_name

使用 rake 任务我会设置任务配置文件 t.profle=myprofile,然后使用 rake mytask 执行

所以当使用 parallel_tests 时,我使用与 gem 关联的内置 rake 任务启动测试:rake parallel:features 有没有办法在执行时将 t.profile 参数传入 rake 任务?

我想做的是类似于

rake parallel:features[4] t.profile=myprofile

【问题讨论】:

  • 理论上以下应该可以工作: rake parallel:features -- -o '-p myprofile' 对我来说它不起作用......我每次都会编辑 cucumber.yml 并使用kross 的解决方案,直到有人可以帮助我们。

标签: ruby cucumber rake jruby


【解决方案1】:

这可能有用也可能没用,但在cucumber.yml 中,您只需添加一个parallel: 配置文件,它就会自动获取。 You can specify one on command line 但我并没有费心去弄清楚,因为我真的不需要切换配置文件。

【讨论】:

    猜你喜欢
    • 2013-05-31
    • 2014-10-14
    • 2022-01-10
    • 2022-01-10
    • 1970-01-01
    • 2020-04-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多