Java 获取错误在cucumber+;中未找到测试运行程序Junit的测试;使用selenium的JVM
我曾尝试使用cucumberjvm运行Cucumber场景,但我得到的结果是“没有找到JUnit4的测试”,我目前没有使用maven 我已经编写了以下步骤定义Java 获取错误在cucumber+;中未找到测试运行程序Junit的测试;使用selenium的JVM,java,selenium-webdriver,cucumber-jvm,cucumber-junit,Java,Selenium Webdriver,Cucumber Jvm,Cucumber Junit,我曾尝试使用cucumberjvm运行Cucumber场景,但我得到的结果是“没有找到JUnit4的测试”,我目前没有使用maven 我已经编写了以下步骤定义 package stepd; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import pageobject.PageObject; import cucumber.api.java.After; im
package stepd;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import pageobject.PageObject;
import cucumber.api.java.After;
import cucumber.api.java.Before;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class StepDefinition
{
private PageObject po;
private WebDriver driver;
public StepDefinition(WebDriver driver)
{
this.driver=driver;
po=new PageObject(driver);
}
@Given("^I navigate to the mock application$")
public void given_I_navigate_to_the_mock_application()
{
driver.get("http://demo.crowdperks.com/crowdperks");
}
@When("^I click login link$")
public void when_I_click_login_link()
{
driver.findElement(By.id("signup")).click();
}
@Then("^I should see Login page$")
public void then_I_login()
{
driver.findElement(By.id("username")).sendKeys("cplive");
driver.findElement(By.id("password")).sendKeys("cplive");
}
}
另外,当从测试运行程序文件(即GenericTest)运行时,我不会在上下文菜单中获得作为junit运行的选项
请提供帮助仔细检查您的课程路径。如果您对配置类有问题,请显示它而不是显示其他类。@karthikeyan路径是正确的。你能详细说明一下吗?你是如何运行测试的?