首页 > 解决方案 > 在 gitlab 中将 cucumber.options 作为环境变量传递

问题描述

我有一些由标签分割的功能集的黄瓜测试。测试可以在 gitlab ci 中运行。我需要的是能够通过传递环境变量“cucumber.options”来运行特定的测试。问题是我无法设置包含“。”的键。我收到错误:“变量键只能包含字母、数字和'_'”有人可以帮我吗?谢谢

标签: gitlabcucumbergitlab-ci

解决方案


Cucumber 还将识别用大写字母书写-.替换为 的属性_。所以你可以使用CUCUMBER_OPTIONS.

https://github.com/cucumber/cucumber-jvm/tree/master/core#properties-environment-variables-system-options


推荐阅读