0
當我調試它時,只有@BeforeClass配置工作 - 它打開瀏覽器並轉到google.com,也在控制檯中我可以看到我的功能的場景,所以Runner看到它。他們都說「測試被忽略」。如果我調試功能(不通過亞軍),他們的工作。我如何從我的Runner運行/調試它們(一次一個)?請幫我找錯Junit Runner不運行黃瓜功能
我的亞軍:
package Runners;
import com.codeborne.selenide.Configuration;
import com.codeborne.selenide.WebDriverRunner;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.openqa.selenium.WebDriver;
import static com.codeborne.selenide.Selenide.open;
import static com.codeborne.selenide.Selenide.sleep;
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"src/test/java/Features"},
tags = {"@smokeTest#1"},
glue = "src/test/java/Steps"
)
public class Runner {
@BeforeClass
static public void Initialization() {
Configuration.timeout = 1500;
Configuration.startMaximized = true;
System.setProperty("webdriver.chrome.driver",
"src\\test\\repository\\webDriver\\chromedriver.exe");
Configuration.browser = "chrome";
Configuration.savePageSource = false;
Configuration.holdBrowserOpen = false;
open("https://www.google.ru");
Configuration.savePageSource = false;
}
}
該glue選項應該以java包格式 – Grasshopper
更改爲location並且glue =「src/test/java/ru /谷歌/步驟「仍然行不通...或者我誤解了? – Mitch
嘗試ru.google.Steps – Grasshopper