【发布时间】:2017-08-04 19:06:55
【问题描述】:
有这个feature:
Feature: ServiceAdd
Check if addition works well
@someTest
Scenario: Add two numbers
Given I connected to the api
And I check the result
| a | b | ExpectedResult |
| 1 | 2 | 3 |
| 4 | 2 | 6 |
| -1| 2 | 1 |
| 1 | 2 | 3 |
| 1 | 2 | 3 |
| 1 | 2 | 3 |
和c# 代码:
[Given(@"I check the result")]
public void GivenICheckTheResult(Table table)
{
......
}
我有一些问题:
- 如何对表
async中的所有值运行测试(我不想等待结果开始新的测试)? - 如何从文件或数据库中输入这些值,以便测试自动读取这些值?
【问题讨论】:
标签: c# unit-testing specflow