且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在黄瓜表中生成动态数据

更新时间:2022-02-20 15:43:23

首先,您不能使用功能部件文件进行任何编程.因此,您无法从功能文件传递动态值.

First of all, you cannot use the feature file to do any programming. So you cannot pass dynamic values from the feature file.

如果要使用列出的值(10、20、30和40)执行上述方案,则可以将每个值作为示例添加.

If you want to perform the above scenario with the listed values (10, 20, 30 and 40), you can add each of them as an example.

如果希望值是动态/随机的,则可以在步骤定义中实现.在这种情况下,您可以从步骤定义的实现中生成它们,而不是从功能文件发送值.在那种情况下,我不明白您为什么要运行4次.

If you want the values to be dynamic / random, you can implement this in your step definition. In that case, rather than sending the values from your feature file, you would generate them in the implementation of your step definition. In that case I don't understand why you would want to run it 4 times.

说实话,我从问题中无法理解您的用例.您能解释一下要发送4个动态值的原因吗?(您要解决的问题是什么?)

To be honest, I don't understand your use case from the question. Can you explain the reason you want to send 4 dynamic values? (what is the problem you are trying to solve with this?)