더 유연한 시나리오를 구축 할 수있는 메커니즘을 찾고 있습니다. 데이터베이스 레코드의 존재를 테스트하는 두 가지 매우 비슷한 시나리오에 대한 예를 들어작은 오이에서 시나리오의 유연성.
:
Scenario Outline: Testing query with 1 attribute with these 2 record in and another 2 out of result
Given I'm connected to <db> database
When I select <query> from database
Then Result should contain fields:
| <row> |
| <yes1> |
| <yes2> |
And Result should not contain fields:
| <row> |
| <no1> |
| <no2> |
Examples:
| db | row | yes1 | yes2 | no1 | no2 | query |
| 1 | model | 1013 | 1006 | 1012 | 1007 | "SELECT model FROM pc WHERE speed >= 3.0;" |
| 1 | maker | E | A | C | H | "SELECT maker FROM product NATURAL JOIN laptop WHERE hd >= 100;" |
Scenario Outline: Testing query with 2 attributes with these 2 record in and another 2 out of result
Given I'm connected to <db> database
When I select <query> from database
Then Result should contain fields:
| <rowA> | <rowB> |
| <yes1A> | <yes1B> |
| <yes2A> | <yes2B> |
And Result should not contain fields:
| <rowA> | <rowB> |
| <no1A> | <no1B> |
| <no2A> | <no2B> |
Examples:
| db | rowA | rowB | yes1A | yes1B | yes2A | yes2B | no1A | no1B | no2A | no2B | query |
| 1 | model | price | 1004 | 649 | 2007 | 1429 | 2004 | 1150 | 3007 | 200 | "SELECT model,price FROM product" |
| 2 | name | country | Yamato | Japan | North | USA | Repulse | Brit | Cal | USA | "SELECT name, country FROM clases" |
나는 속성의 일반 번호를 하나 개의 시나리오를 쓸 수 있도록하고 싶습니다. 테스트 된 행 수가 결정되지 않으면 좋을 것입니다.
Testing query with N attribute with these M record in and another L out of result
방법
작은 오이에서이 작업을 수행 할 수 :
내 꿈은 하나 개의 일반적인 시나리오을 작성하는 것입니다? 모든 해킹이 가능합니까?