Я пытаюсь выполнить очень простую историю с функциональностью входа в систему в Serenity BDD и инфраструктуре JBehave.Но все мои шаги помечены как ожидающие и пропущены.Пожалуйста, помогите мне понять, что на самом деле не так с моим кодом.
Я убедился, что шаги в моем файле Story и файле Step точно совпадают, и нет никаких различий с точки зрения пробелов или табуляцииперсонажи.
Файл истории
Story: Application Login
Narrative:
As an user, I want to successfully login into the application upon providing valid credential
Scenario: Login with valid credential
Given Launch the application
When Input the credential
Then Login to the application
Класс шага
import org.jbehave.core.annotations.Given;
import org.jbehave.core.annotations.Then;
import org.jbehave.core.annotations.When;
import net.thucydides.core.annotations.Steps;
import tests.LoginTest;
public class LoginSteps {
@Steps
LoginTest usr;
@Given("Launch the application")
public void launchApp() {
usr.beforeSuite();
usr.launchApplication();
}
@When("Input the credential")
public void enterCredential() {
usr.submitLoginForm();
}
@Then("Login to the application")
public void loginApp() {
usr.loginCheck();
usr.afterSuite();
}
}
Класс тестирования
package suite;
import net.serenitybdd.jbehave.SerenityStory;
public class Login extends SerenityStory {
}
POM.XML
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.selenium.bdd.serenity</groupId>
<artifactId>seleniumBDDSerenity</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>seleniumBDDSerentity</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.5</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.14.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>2.0.33</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-jbehave</artifactId>
<version>1.44.0</version>
</dependency>
<dependency>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-core</artifactId>
<version>4.3.5</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<includes>
<include>**/suite/*.java</include>
</includes>
<skipTests>false</skipTests>
<failIfNoTests>false</failIfNoTests>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>2.0.33</version>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Журнал
(BeforeStories)
Running story stories/authentication/Login.story
Application Login
(stories/authentication/Login.story)
Using timeout for story Login.story of 300 secs.
Scenario: Login with valid credential
Given Launch the application (PENDING)
When Input the credential (PENDING)
Then Login to the application (PENDING)
@Given("Launch the application")
@Pending
public void givenLaunchTheApplication() {
// PENDING
}
@When("Input the credential")
@Pending
public void whenInputTheCredential() {
// PENDING
}
@Then("Login to the application")
@Pending
public void thenLoginToTheApplication() {
// PENDING
}
(AfterStories)