- 在 Cucumber 'Feature file'-> 'Examples' 中,如何设置 CSV 文件的路径。
Sample.feature
Feature:Launch an app
Scenario Outline:Validation of the application
Given User navigates to application
When User logs in using valid appname '<Name>'
Examples:
@sources:src/test/resources/data_tables/temp.csv
| Name |
Junit亚军:
package definitions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
import cucumber.api.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(CucumberWithSerenity.class)
@CucumberOptions(features = "src/test/resources/features/Sample.feature" )
public class AcceptanceTestSuite{
}
使用的 CSV 文件
**temp.csv**
name,
Google,
但我没有从 temp.csv 文件中检索值,结果是 0 Scenarios 0 Steps 0m0.000s
2.还想知道在Java Cucumber with Serenity 中,如何从Feature 文件中提到的CSV 文件中读取值。