specification
|-src
|-test
|-java
|-MyFeature1
|-MyFeature1Steps.java
|-MyFeature1Test.java
|-MyFeature2
|-MyFeature2Steps.java
|-MyFeature2Test.java
|-resources
|-Features
|-MyFeature1
|-MyFeature1.feature
|-MyFeature2
|-MyFeature2.feature
В MyFeature1Test.java
, у меня есть это:не в состоянии запустить сценарий, используя огуречный-JVM с селеном
@RunWith(Cucumber.class)
@CucumberOptions(format = { "pretty", "html:target/cucumber", "json:target/cucumber.json" }, features = "classpath:Features" , tags = "@registration", glue={"classpath:MyFeature1/MyFeature1Steps.java"})
public class MyFeature1Test
{
}
Сценарий Файл MyFeature1.feature
:
@registration
Feature: Login and Registration tests
Background:
Given User is on Sign In Page
# 1 Register using Username and password
Scenario Outline:
Given User clicks on Sign Up
And User fills the details
When User provides "new" email
And User activates the account
And Configures password
Then User should be registered
Мой pom.xml
выглядит следующим образом:
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.1.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.1.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.1.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.1.8</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
Когда я запускаю файл бегуна с использованием Maven, я всегда получить результат как:
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.641 sec - in TestSuite
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
Запуск через Eclipse, также показывают мне вывод, как:
@registration
Feature: Login and Registration tests
0 Scenarios
0 Steps
0m0.000s
Что я делаю неправильно здесь, как я могу пробег MyFeature2.feature
в этой же структуре успешно.
Замена сценария Outline с сценарием работал как шарм. Благодаря !! –
@MonikaKhandelwal Отлично! Пожалуйста, примите ответ, если он вам поможет. –