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 |
Run Code Online (Sandbox Code Playgroud)
Junit Runner:
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{
}
Run Code Online (Sandbox Code Playgroud)
使用的CSV文件
**temp.csv**
name,
Google,
Run Code Online (Sandbox Code Playgroud)
但是我没有从temp.csv文件中检索值,结果是0场景0步骤0m0.000s
2.也想在Java Cucumber中了解Serenity,如何从Feature文件中提到的CSV文件中读取值.