黃瓜裡的場景大綱是什麼意思?
在黃瓜中,我們使用功能檔案中的“場景大綱”關鍵字。如果特定場景需要使用多組資料以多種組合執行,那麼我們使用場景大綱。
多組資料以使用(||)符號分隔的表格形式顯示在“示例”關鍵字下。每一行都代表一組資料。
示例
功能檔案。
Feature: Login Verification Feature Scenario Outline: Login Verification Given User lands on the home page When Page title is Tutorialspoint Then User keys in "<username>" and "<password>" Examples: | username | password | | Selenium | t123 | | Python |pt123 |
具有具引數化的Then 語句的步驟定義檔案。
示例
@Then (“^User keys in \"(.*)\” and \"(.*)\”$”)
public void user_keys(String username, String password){
System.out.println("The username and password is : " + username
+””+ password);
}
廣告
資料結構
網路
關係型資料庫管理系統
作業系統
Java
iOS
HTML
CSS
Android
Python
C 語言程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP