cucumber / react-components

React components for Cucumber
MIT License
34 stars 10 forks source link

html-formatter/java: No match found for: "undefined" #125

Open mpkorstanje opened 3 years ago

mpkorstanje commented 3 years ago

When Cucumber did not execute any scenarios the io.cucumber:html-formatter:13.0.0 will display the message: No match found for: "undefined".

To reproduce:

package io.cucumber.examples.calculator;

import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(tags = "@no-such-tag", plugin = { 
        "html:target/results.html",
        "message:target/results.ndjson" 
})
public class RunCucumberTest {

}

target/results.html: image

target/results.ndjson:

{"meta":{"protocolVersion":"15.0.0","implementation":{"name":"cucumber-jvm","version":"${parent.version}"},"runtime":{"name":"OpenJDK 64-Bit Server VM","version":"11.0.11+9-Ubuntu-0ubuntu2.20.04"},"os":{"name":"Linux"},"cpu":{"name":"amd64"}}}
{"testRunStarted":{"timestamp":{"seconds":"1620918593","nanos":632453000}}}
{"source":{"uri":"classpath:io/cucumber/examples/calculator/basic_arithmetic.feature","data":"@foo\nFeature: Basic Arithmetic\n\n  Background: A Calculator\n    Given a calculator I just turned on\n","mediaType":"text/x.cucumber.gherkin+plain"}}
{"gherkinDocument":{"uri":"classpath:io/cucumber/examples/calculator/basic_arithmetic.feature","feature":{"location":{"line":2,"column":1},"tags":[{"location":{"line":1,"column":1},"name":"@foo","id":"5f302c14-f235-4657-a9cf-a4d5a2d90771"}],"language":"en","keyword":"Feature","name":"Basic Arithmetic","children":[{"background":{"location":{"line":4,"column":3},"keyword":"Background","name":"A Calculator","steps":[{"location":{"line":5,"column":5},"keyword":"Given ","text":"a calculator I just turned on","id":"5abd1c65-c068-4479-ba0c-c3324a52bf4e"}],"id":"48e0b2c8-6339-485c-a4f2-51ef107de253"}}]}}}
{"testRunFinished":{"success":true,"timestamp":{"seconds":"1620918593","nanos":653527000}}}
aslakhellesoy commented 3 years ago

The acceptance tests for @cucumber/react try to render all the message streams from the cck, so if we add this to the cck it should be easier to reproduce.

aslakhellesoy commented 3 years ago

This is vaguely related to cucumber/common#1498, but I think that's a different case.