SpecFlow测试RunSettings& usersecrets

发布于 2025-02-10 15:40:40 字数 316 浏览 0 评论 0原文

我有一些使用RunSettings文件将参数传递到测试用例的规格测试,其中一些参数是秘密。

在我们的构建管道中在ADO上释放管道,我可以弄清楚我可以选择运行设置文件并使用管道变量上的参数覆盖参数,但我正在尝试找出一种我们仍然可以在本地运行这些测试的方式。

我希望能够使用.NET工具创建用户秘密,并以某种方式将它们传递到运行时,并用匹配ID替换Runsettings中的任何内容。

我不希望它将任何内容写入Runsettings文件中,因为这仍然会带来某人可能会在秘密中提交runsettings文件的风险。

任何想法我如何实现这一目标,因为他们努力寻找任何东西

I have some specflow tests which use runsettings files to pass parameters through to the test cases and some of these parameters are secrets.

In our build pipeline & release pipelines on ADO I have it figured out that I can choose the run settings file and override parameters with those on the pipeline variables but I am trying to figure out a way that we can still run these tests locally.

I want to be able to create user secrets using the .net tool and somehow get these passed into the tests at runtime and replace anything in the runsettings with the matching ID.

I don't want it to write anything into the runsettings files as this still poses a risk that someone might commit the runsettings files with the secrets in.

Any idea how I can accomplish this as struggling to find anything

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文