首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >BDD SpecFlow场景

BDD SpecFlow场景
EN

Stack Overflow用户
提问于 2016-09-15 18:02:42
回答 1查看 115关注 0票数 0

今天,我开始使用SpecFlow + Selenium学习BDD,并找到了几个只显示1返回的示例。

如何编写返回多项的场景。例如:

代码语言:javascript
复制
Given a name "test"
I click on the SEARCH button

,则结果将等于下表:

代码语言:javascript
复制
name | last name
test | fulano
test | siclano

在本例中,如何编写?,接受返回表中显示的2行?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-09-16 08:08:03

设想情况:

代码语言:javascript
复制
Given a name "test"
When I click on the SEARCH button
Then the result will be 
| name | last name
| test | fulano
| test | siclano

代码:

代码语言:javascript
复制
[Then("The result will be")]
public void ThenTheResultWillBe(Table table)
{
    //check that the result contains all the values in the table
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39517559

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档