Question

Running in Eclipse Juno.

@RunWith(Cucumber.class)
@Cucumber.Options(format={"pretty", "html:target/cucumber"})
public class RunTests {
}

In the console window I see:

Feature: Depositing money

Scenario: Sunny day [90m# deposit.feature:3[0m
Given: I have an Account with a balance of $100
When: I deposit $20
Then: The Account balance should be $120

Question: What is the [90m# and 3[0m about?

In target/cucumber/index.html, I see:

Feature: Depositing money
Scenario: Sunny day
Given: I have an Account with a balance of $100 
When: I deposit $20 
Then: The Account balance should be $120

I was assuming that if I run the tests on a new feature that does not have step definitions, that cucumber-jvm would spit out skeleton definitions for the steps that I could copy from the console window into a java file. Is that not how this works?

Was it helpful?

Solution 2

Cucumber should provide step definition skeletons in the console window. Have you tried to run them from your terminal?

Question: What is the [90m# and 3[0m about?

These are encoding to provide color. Probably due to your use of the PrettyFormatter.

OTHER TIPS

If you run with the option '--monochrome' you will not get the weird formatting [90m# deposit.feature:3[0m. You can set this in your @CucumberOptions with monochrome = true or in the commandline using --monochrome

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top