黄瓜没有使用创建的步骤定义执行这两个功能
我试过使用标签,也给出了两个功能的完整路径但仍然相同
package runners;
import com.cucumber.listener.ExtentProperties;
import com.cucumber.listener.Reporter;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import managers.Common;
import managers.FileReader;
import org.apache.log4j.PropertyConfigurator;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import java.io.File;
@RunWith(Cucumber.class)
@CucumberOptions(
features = ".//src//test//java//FeatureList",glue = "stepDefinations",
plugin = { "com.cucumber.listener.ExtentCucumberFormatter:",
"junit:target/cucumber-results.xml"},
tags={"@API"},
monochrome = true
)
public class TestRunner {
static String ReportName= Common.ReportName();
@BeforeClass
public static void setup() {
ExtentProperties extentProperties = ExtentProperties.INSTANCE;
extentProperties.setReportPath("target/cucumber-reports/"+ReportName+".html");
PropertyConfigurator.configure(".//src//log4j.properties");
}
@AfterClass
public static void writeExtentReport() {
Reporter.loadXMLConfig(new File(FileReader.getInstance().getConfigReader().getReportConfigPath()));
Reporter.setSystemInfo("User Name", System.getProperty("user.name"));
Reporter.setSystemInfo("Time Zone", System.getProperty("user.timezone"));
Reporter.setSystemInfo("Environment", FileReader.getInstance().getConfigReader().getEnvironment());
}
}
不知道为什么它总是运行错误代码。功能但从不枚举。功能
功能:枚举代码@API 场景:xxx 枚举代码给定运行获取方法“xxxxxxxxxxx”api 以获取所有类型的 xxx xxx 然后响应应为 200 和 xxxxxxxxxxxxxx
功能:错误代码
@API 场景:xxError Codes Given Run "xxxx" api to get response Then response should be 200 And Verify xx Error Codes xx error response
智慧大石
相关分类