我是 Gauge 的新手,我需要在场景之前运行诸如背景场景之类的东西(本例中的客栈,规格)
我在这样的规范中登录:
table: resources/data/login_data.csv
## Login with valid username and password
----------------------------------------------
* Navigate to Login Profile page
* Login with profile as <Profile> and password as <Password>
* Access Mailtrap with valid username <Username> and pass <Pass>
* Successfully logged to Page
现在这是概念文件(Concept_Login.cpt)
# Login as profile <Profile> and access Mailtrap with valid username <Username>
* Navigate to Login Profile page
* Login with profile as <Profile> and password as <Password>
* Access Mailtrap with valid username <Username> and pass <Pass>
* Successfully logged to Page
我想要什么:在不同的规范中重用登录名。我做了一个例子:
Second Spec File
=================
Successfull Login Scenario
--------------------------
* Login as profile <Profile> and access Mailtrap with valid username <Username>
Redirect to Contact Page
-------------------------
* Accessing to the contact section
* Click in Contacts Menu
* The contacts menu is displayed
但是当我运行第二个规范文件时,系统会显示下一个错误:
[ParseError] /Users/rodrigo.g/Documents/automation_projects/Gauge/gauge_maven/specs/concepts/Concept_Login.cpt:9 Dynamic parameter <Password> could not be resolved => 'Login with profile as <Profile> and password as <Password>'
[ParseError] /Users/rodrigo.g/Documents/automation_projects/Gauge/gauge_maven/specs/concepts/Concept_Login.cpt:10 Dynamic parameter <Pass> could not be resolved => 'Access Mailtrap with valid username <Username> and pass <Pass>'
[ParseError] /Users/rodrigo.g/Documents/automation_projects/Gauge/gauge_maven/specs/normalflow.spec:12 Dynamic parameter <Profile> could not be resolved => 'Login as profile <Profile> and access Mailtrap with valid username <Username>'
[ParseError] /Users/rodrigo.g/Documents/automation_projects/Gauge/gauge_maven/specs/normalflow.spec:12 Dynamic parameter <Username> could not be resolved => 'Login as profile <Profile> and access Mailtrap with valid username <Username>'
顺便说一句:concepts 文件夹位于 specs 文件夹中。
有谁能够帮我?