cancel
Showing results for 
Search instead for 
Did you mean: 

Option cucumber.features does not work in cucumber.properties file

UweFriedel
Regular Visitor

Option cucumber.features does not work in cucumber.properties file

My test class is:

 

import org.junit.runner.RunWith;

import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;

@RunWith(Cucumber.class)
@CucumberOptions(features = "src/test/java/posters/cucumber/features", glue = "posters.cucumber.support", tags = "@Chrome and not @Skip", monochrome = true)
public class SingleFeatureTest
{
}

 

 

My cucumber.properties file is:

 

cucumber.publish.quiet=true
cucumber.plugin = pretty, summary, html:target/cucumber-report/cucumber.html

 

This works fine.


Then I move the "features" and the "glue" option  from the test class to the cucumber.properties file:

New test class:

 

import org.junit.runner.RunWith;

import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;

@RunWith(Cucumber.class)
@CucumberOptions(tags = "@Chrome and not @Skip", monochrome = true)
public class SingleFeatureTest
{
}

 

 

New cucumber.properties file:

 

cucumber.publish.quiet=true
cucumber.plugin = pretty, summary, html:target/cucumber-report/cucumber.html
cucumber.features = src/test/java/posters/cucumber/features
cucumber.glue = posters.cucumber.support

 

It does NOT work.

 

I work with

java SE 11

cucumber-junit 6.8.1
cucumber-java 6.8.1
cucumber-picocontainer 6.8.1
allure-cucumber6-jvm 2.13.6

 

I couldn't find anything in internet documentation that helped me.
There are very few examples of the cucumber.properties file.
On the other hand, I found the class io.cucumber.core.options.Constants and believe that I have found the possible options in the cucumber.properties.
Is that right?


Many thanks for your help

New Here?
Join us and watch the welcome video:
Top Kudoed Authors