私は入力と出力をパラメータ化したScenario Outlines
を使用してspecflowで書かれたテストを実行しようとしていますが、これは問題ありません。異なる例の繰り返しシナリオ
しかし、私はまた、複数のブラウザですべてのテストを繰り返したいと思っています。
これは私が私がやろうとしています何の簡単な例として、環境設定(ブラウザの種類)
のすべての異なるバリエーションを反復処理するためのテストシナリオと別のセットを定義するパラメータの1セットを有することを意味します各リンクは広告グループメンバーシップに基づいて許可され、その上にリンクしているウェブページを持っている(ウェブサイトは、Windows認証を使用してイントラネット1である)ので、私は、テストを持っている:
Scenario Outline: Only authorised users can click through links on main page
Given a user <name> in domain "ad" with password <password>
And the home page is loaded
When I click the link <link>
Then the page has "title" <title>
Scenarios:
| name | password | link | title |
| user1 | VMoney123 | "link1" | "You are not authorized to see this section" |
| user2 | VMoney123 | "link1" | "Success" |
| user2 | VMoney123 | "link2" | "Success" |
しかし、私は単純に追加しようとすると、 Examples
を使用してブラウザのフレーバを繰り返します。
Scenario Outline: Only authorised users can click through links on main page
Given a user <name> in domain "ad" with password <password>
And a <browser> browser
And the home page is loaded
When I click the link <link>
Then the page has "title" <title>
Examples:
| browser |
| "chrome" |
| "ie" |
Scenarios:
| name | password | link | title |
| name | password | link | title |
| user1 | VMoney123 | "link1" | "You are not authorized to see this section" |
| user2 | VMoney123 | "link1" | "Success" |
| user2 | VMoney123 | "link2" | "Success" |
とビルドがエラーを与える:
CS1029 #error: 'Generation error: The example sets must provide the same parameters.'
もちろん、私は6つのシナリオ(または例)を有することにより、これを行うことができますが、私は余分を意味するであろう他の5つのブラウザにこれを展開する必要がある場合15シナリオ、それはすぐにunweildyになります、確かに方法があります...