I'm trying to run two cucumber feature files by Maven but nothing happens. I'm using the Dutch (NL) version of Gherkin. When I'm running the feature files directly in Eclipse or with Gradle they are running fine. I studied all earlier questions about this issue on Stackoverflow but still couldn't find a solution.
This is my project structure in Eclipse: Eclipse project structure
The result of running the project with Maven using the command mvn Test is:
Running nl.werkwel.cucumber.RunTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@f5c0729
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.341 sec
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] BUILD SUCCESS
I also tried to run with: "mvn test -Dcucumber.options="src/test/resources/registratiepage.feature" but the result was the same
This is the POM
<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>nl.werkwel</groupId>
<artifactId>cucumber</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumber</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.8</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.0</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
</dependencies>
</project>
And here is one of the feature files:
# language: nl
Functionaliteit: Testen van de Registratiepagina
Achtergrond:
Gegeven Gebruiker is op de registratiepagina
Scenario: Niet succesvolle registratie, emailadres niet gevuld
Als Gebruiker geen emailadres invult
En Klikt op de button nu registreren
Dan wordt de melding "Voer een waarde in" getoond
Scenario: Link Algeregistreerd
Als Gebruiker op link algeregistreerd klikt
Dan gaat gebruiker verder naar het inlogscherm
Scenario: Link Annuleren
Als Gebruiker op link annuleren klikt
Dan gaat gebruiker verder naar het inlogscherm
The Runner Class
package nl.werkwel.cucumber;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(
plugin = {"pretty", "html:out"},
features={"."}
)
public class RunTest {
}