亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

所有功能文件均未執行

所有功能文件均未執行

牧羊人nacy 2023-02-23 16:58:25
黃瓜沒有使用創建的步驟定義執行這兩個功能我試過使用標簽,也給出了兩個功能的完整路徑但仍然相同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
查看完整描述

1 回答

?
智慧大石

TA貢獻1946條經驗 獲得超3個贊

“功能”正在尋找文件系統路徑:

features = ".//src//test//java//FeatureList"

試試這個 - 1 features = "src/test/java/FeatureList" 2 features = "FeatureList"



查看完整回答
反對 回復 2023-02-23
  • 1 回答
  • 0 關注
  • 117 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號