我正在编写一个包含多个输入和输出参数(每个参数约为4-5 )的specflow场景。在使用场景大纲时,我需要编写一个宽表,给出同一行的输入和输出列。有任何方法可以单独指定步骤定义的示例吗?这是为了提高可读性。
电流状态
Given - State of the data
When I trigger action with parameters <input1> and <input2> and ...
Then my output should contain <output1> and <output2> ...
Examples:
| input1 | input2 |... | output1 | output2 |...我能做这个吗?
Given - State of the data
When I trigger action with parameters <input1> and <input2> and ...
Examples of input
Then my output should contain <output1> and <output2> ...
Examples of output发布于 2016-04-19 10:30:50
不,不幸的是(或任何类似的)是不可能的。您可以使输入和输出更加抽象,并可能合并几个列。示例:您应该使用带有"EU“、"US、缺失邮政编码”、"HQ“等值的值,而不是Country、PostalCode、City、House、Firstname、Lastname、等。
发布于 2016-04-22 17:35:43
场景大纲不能有多个示例表,但可以为常规方案传递数据表。
数据表只能对使用数据表的步骤访问,但是您可以将其保存在场景上下文中供后续步骤使用。
不确定这是否适用于您,如果您的场景很复杂,并且跨越多行,但我想我要提一提。
Scenario: Checking outputs for inputs
Given - State of the data
When I trigger action with the following parameters
input1 | input2 | input3 |
data | data | data |
Then my output should contain the following outputs
output1 | output2 | output3 |
data | data | data |https://stackoverflow.com/questions/36714808
复制相似问题