由于场景太多,当出现故障或错误时,我发现很难跳到出现问题的场景。
有没有办法为每个场景提供一个唯一的编号,以便它易于映射,也可以用于日志记录。
我正在使用带有黄瓜jvm和pageobjects的selenium webdriver。
例如特征文件:
#1
@regression @CPM_PI @visibility
Scenario Outline: To check if CPMPI panel is visible
Given Go to Nerd
And set Team="CTM"
And set Client="PQR"
And set Broker="ABC"
And select Product="CPM"
And set Revenue"1000000"
And set Revenue(CY)="500000"
And tick Coverages="CPM/PI"
And select Main Activity="<MainActivity>"
Then check CPMPI visible
#2
@regression @CPM_PI @visibility
Scenario: To check visiblity of all CPMPI panels
Given Go to Nerd
And set Team="CTM"
And tick Cyber
Then check panel Cyber visible
答案 0 :(得分:1)
您可以简单地标记&#34;标记&#34;您的方案名称如下:
Scenario Outline: Scenario 1: To check if CPMPI panel is visible
Given Go to Nerd
And set Team="CTM"
And set Client="PQR"
And set Broker="ABC"
And select Product="CPM"
And set Revenue"1000000"
And set Revenue(CY)="500000"
And tick Coverages="CPM/PI"
And select Main Activity="<MainActivity>"
Then check CPMPI visible
#2
@regression @CPM_PI @visibility
Scenario: Scenario2: To check visiblity of all CPMPI panels
Given Go to Nerd
And set Team="CTM"
And tick Cyber
Then check panel Cyber visible
养成为您的方案标记名称的习惯