嗨我有一个场景,我需要测试一个搜索服务是否正在带回正确的结果。所以,我的故事看起来是这样的:JBehave中的嵌套表格
Narrative:
In order to easily discover if a player is registered in a loyalty program
As a customer service representative
I want to be able to search for registered players by player first and last name
Scenario: Retrieve Player information by First and Last Name
Given players registered in the Data Warehouse and some combination of Loyalty1 and/or Loyalty2 programs:
|first name|last name|city |province|loyalty1 |loyalty2|
|Pete |Walter |Winnipeg |<null> |false |true |
|Jon |Dewit |Winnipeg |MB |true |true |
|John |Dewit |<null> |<null> |true |true |
|Peter |Dewalt |<null> |<null> |true |false |
When the <firstnamecriteria> and <lastnamecriteria> criteria are specified
Then the system displays the correct results, using a case-insensitive "begins with" search as follows:
|firstnamecriteria|lastnamecriteria|results |
|Jo | ||first name|last name||
| | ||Jon |Dewit ||
| | ||John |Dewit ||
Examples:
|firstnamecriteria|lastnamecriteria|
|Jo | |
| |Dew |
|J |D |
在桌子底下“然后”节会去一会儿,使用的名字/姓氏标准,然后在结果列预期结果的表格嵌套不同的排列。 Examples部分将包含传递给“When”部分的可能搜索条件列表
是否有可能具有这样的嵌套表格?如果不是,那么我可以用另一种方法来完成同样的事情吗?
或指定一个字符串指向一个资源,你可以得到和验证(通过网址而不是内联表) – 2012-03-07 20:29:51
这是我也曾想到的解决方案,但问题是我在这个集成测试中的底层数据库选择我的id值,所以我不知道他们是什么时间的头。话虽如此,我可以像你所说的那样使它工作,为此+1 – ThaDon 2012-03-08 20:19:13