Io.cucumber.testng.UndefineStepException: шаг «пользователь находится на странице входа» и еще 3 шага (шага) не определеJAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Io.cucumber.testng.UndefineStepException: шаг «пользователь находится на странице входа» и еще 3 шага (шага) не определе

Сообщение Anonymous »

Я проходил курс по огурцам и следил за ним, но меня тоже поразило прямо здесь, в этом проекте, поэтому я создал этот новый проект, чтобы проверить, работает ли он, но нет, он все тот же.
Я не знаю. не знаю, почему он не работает должным образом, путь правильный, я проверил зависимости, я также дважды проверил файл функций.
Изображение

Feature: User Login

Scenario: User should be able to login with valid credentials
Given the user is on login page
When the user enters valid credentials
And click on submit button
Then verify login status


package stepDefs;

import io.cucumber.java.en.And;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;

public class Steps {

@Given("the user is on login page")
public void the_user_is_on_login_page() {
System.out.println("login page");
}

@When("the user enters valid credentials")
public void the_user_enters_valid_credentials() {
System.out.println("entered stuff");
}

@And("click on submit button")
public void click_on_submit_button() {
System.out.println("clicking");
}

@Then("verify login status")
public void verify_login_status() {
System.out.println("pls work");
}
}


package runners;

import io.cucumber.testng.AbstractTestNGCucumberTests;
import io.cucumber.testng.CucumberOptions;
@CucumberOptions(features = "src/test/resources",glue = {"runners.run"})

public class run extends AbstractTestNGCucumberTests {

}


Вот какую ошибку я получаю:
io.cucumber.testng.UndefinedStepException: The step 'the user is on login page' and 3 other step(s) are undefined.
You can implement these steps using the snippet(s) below:

@Given("the user is on login page")
public void the_user_is_on_login_page() {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java.PendingException();
}
@When("the user enters valid credentials")
public void the_user_enters_valid_credentials() {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java.PendingException();
}
@When("click on submit button")
public void click_on_submit_button() {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java.PendingException();
}
@Then("verify login status")
public void verify_login_status() {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java.PendingException();
}

at io.cucumber.core.runtime.TestCaseResultObserver.assertTestCasePassed(TestCaseResultObserver.java:69)
at io.cucumber.testng.TestCaseResultObserver.assertTestCasePassed(TestCaseResultObserver.java:23)
at io.cucumber.testng.TestNGCucumberRunner.lambda$runScenario$1(TestNGCucumberRunner.java:136)
at io.cucumber.core.runtime.CucumberExecutionContext.lambda$runTestCase$5(CucumberExecutionContext.java:136)
at io.cucumber.core.runtime.RethrowingThrowableCollector.executeAndThrow(RethrowingThrowableCollector.java:23)
at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:136)
at io.cucumber.testng.TestNGCucumberRunner.runScenario(TestNGCucumberRunner.java:132)
at io.cucumber.testng.AbstractTestNGCucumberTests.runScenario(AbstractTestNGCucumberTests.java:35)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:141)
at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:686)
at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:230)
at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:63)
at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:992)
at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:203)
at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:154)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:134)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
at org.testng.TestRunner.privateRun(TestRunner.java:739)
at org.testng.TestRunner.run(TestRunner.java:614)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:421)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:413)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:373)
at org.testng.SuiteRunner.run(SuiteRunner.java:312)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1274)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1208)
at org.testng.TestNG.runSuites(TestNG.java:1112)
at org.testng.TestNG.run(TestNG.java:1079)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:65)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:105)



Подробнее здесь: https://stackoverflow.com/questions/791 ... login-page
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Io.cucumber.testng.UndefineStepException: шаг «пользователь находится на странице входа» и еще 3 шага (шага) не определе
    Anonymous » » в форуме JAVA
    0 Ответы
    15 Просмотры
    Последнее сообщение Anonymous
  • @Runwith (cucumber.class) ошибка. Импорт Cucumber.api.junit.cucumber; не может быть решено
    Anonymous » » в форуме JAVA
    0 Ответы
    37 Просмотры
    Последнее сообщение Anonymous
  • @Runwith (cucumber.class) ошибка. Импорт Cucumber.api.junit.cucumber; не может быть решено
    Anonymous » » в форуме JAVA
    0 Ответы
    13 Просмотры
    Последнее сообщение Anonymous
  • @Runwith (cucumber.class) ошибка. Импорт Cucumber.api.junit.cucumber; не может быть решено
    Anonymous » » в форуме JAVA
    0 Ответы
    10 Просмотры
    Последнее сообщение Anonymous
  • Io.cucumber.core.Exception.CucumberException: не удалось загрузить класс плагина: com.aventstack.extentreports.cucumber.
    Anonymous » » в форуме JAVA
    0 Ответы
    29 Просмотры
    Последнее сообщение Anonymous

Вернуться в «JAVA»