gpt4 book ai didi

c# - SpecFlow 如何测量每个步骤的持续时间?

转载 作者:行者123 更新时间:2023-11-28 21:19:34 25 4
gpt4 key购买 nike

我有很长时间的自动化用户案例,我想找到方法来简化它们并减少它们的执行时间。我正在使用 SpecFlow 并使用 Gherkin 和 C# (Selenium) 编写测试。

如何获取每个小 cucumber 步骤的持续时间?

最佳答案

SpecFlow 已经输出了每一步的持续时间。

例如,当我使用 MsTest单元测试提供程序,在 Visual Studio 2015 中运行测试,单击 Output Test Explorer 中的超链接窗口,我可以在 Standard Output 中看到以下信息部分:

Given this is a step
-> done: MySteps.GivenThisIsAStep() (0.1s)
When this is another step
-> done: MySteps.WhenThisIsAnotherStep() (0.1s)
Then this is the last step
-> done: MySteps.ThenThisIsTheLastStep() (0.0s)

请注意,秒数在括号中。

关于c# - SpecFlow 如何测量每个步骤的持续时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53412710/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com