简体   繁体   English

场景如何在行为 BDD 测试中工作

[英]How Scenarios work in behave BDD test

I want to know the Scenarios in a feature execute one by one or randomly??我想知道一个特性中的场景是一一执行还是随机执行??

Feature: feature name特征:特征名称

Scenario: scenario1 Given some condition When some action is taken Then some result is expected.场景:场景 1 给定一些条件 当采取一些行动 那么一些结果是预期的。

Scenario: scenario2 Given some other condition When some action is taken Then some other result is expected.场景:场景 2 给定一些其他条件 当采取某些行动时 预期其他一些结果。

Scenario: scenario3 Given some other condition When some action is taken Then some other result is expected.场景:场景 3 给定一些其他条件 当采取了一些行动 那么一些其他的结果是预期的。

Is scenario2 execute after the scenario1 ?是在场景 1 之后执行场景 2 吗? And the scenario3 will be execute after the scenario2.并且场景3将在场景2之后执行。

thx,谢谢,

The order of Scenarios should be exactly as in the file, except that cases when some custom sorting is using.场景的顺序应与文件中的顺序完全相同,但使用某些自定义排序的情况除外。 But to be more accurate we need to know what is a testing framework you are using, because each of them has a lot of different parameters for running the tests.但是为了更准确,我们需要知道您正在使用的测试框架是什么,因为每个框架都有许多不同的参数来运行测试。 But by default it should be exactly in the file.但默认情况下,它应该正好在文件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM