Closed tfnico closed 8 years ago
Turns out the underlying problem is that cukedoctor cannot handle my json file:
Jul 29, 2016 10:47:22 AM com.github.cukedoctor.parser.FeatureParser parse
WARNING: Could not map json file:/usr/share/tomcat7/.jenkins/jobs/webtest-testing/builds/12/build/cucumber-results/cucumber.json
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "comments" (class com.github.cukedoctor.api.model.Row), not marked as ignorable (one known property: "cells"])
at [Source: java.io.InputStreamReader@3f3365ce; line: 765, column: 30] (through reference chain: java.util.ArrayList[4]->com.github.cukedoctor.api.model.Feature["elements"]->java.util.ArrayList[0]->com.github.cukedoctor.api.model.Scenario["steps"]->java.util.ArrayList[1]->com.github.cukedoctor.api.model.Step["rows"]->Object[][0]->com.github.cukedoctor.api.model.Row["comments"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:62)
at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:855)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1083)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1389)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1367)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:266)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:196)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:20)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:490)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:260)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:277)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:26)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:490)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:260)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:277)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:26)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:490)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:260)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:277)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:26)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3789)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2833)
at com.github.cukedoctor.parser.FeatureParser.parse(FeatureParser.java:31)
at com.github.cukedoctor.parser.FeatureParser.parse(FeatureParser.java:68)
at com.github.cukedoctor.parser.FeatureParser.findAndParse(FeatureParser.java:101)
at com.github.cukedoctor.jenkins.CukedoctorPublisher.perform(CukedoctorPublisher.java:142)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
I'm reporting the issue in their repo as well. A reference should appear below shortly.
@rmpestano That works. Thanks a lot!
I will push a release soon.
I've got a job configured like this:
Features dir:
build/cucumber-results
During the build, the cucumber.json and *.feature files are generated/copied into the above directory.
Here's the output of running only the plugin in the workspace:
Here is what is in those dirs:
And:
It is a tad confusing that the plugin says it is using Features dir in the workspace, but actually looks for feature files in the job/build directory. Strangely enough, when I manually copy the features into the job/build directory, it still doesn't work.
I also do find it confusing that the 'Features dir' is described as "Directory, relative to workspace, to search for cucumber .json test results. Default value is job workspace." - Why are features and json test results mixed in one directory? Usually features are in workspace/src/features, and the json gets generated inside a build or target dir.
I'm running on a master-only Jenkins, version 2.7.1, with the latest version of the Living Doc plugin.