Re: Failed to parse Squish JSON with Cucumber json test reporting plugin

2015-08-17 Thread Marek Martyniak
Output from Squish is looking like this ( I used "_" to hide 
irrelevant ) :
{
"version": { "major": 1, "minor": 0 },
"tests": [
{
"name": "suite__",
"start": "2015-08-12T16:43:28+02:00",
"type": "testsuite",
"uri": "_",
"tests": [
{
"name": "tst__",
"start": "2015-08-12T16:51:04+02:00",
"type": "testcase",
"uri": "x-testsuite:/tst__",
"tests": [
{
"lineNo": 1,
"name": "_",
"start": "2015-08-12T16:51:06+02:00",
"type": "feature",
"uri": "x-testcase:/test.feature",
"tests": [
{
"lineNo": 5,
"name": "_",
"start": "2015-08-12T16:51:06+02:00",
"type": "scenario",
"uri": "x-testcase:/test.feature",
"tests": [
{
"lineNo": 6,
"name": "Given _",
"start": 
"2015-08-12T16:51:06+02:00",
"type": "step",
"uri": 
"x-testcase:/test.feature",
"tests": [
{ "detail": "[Error 3] The 
system cannot find the path specified: '_'", "lineNo": 19, 
"result": "WARNING", "text": "_", "time": 
"2015-08-12T16:51:09+02:00", "type": "msg", "uri": "x-testsuite:/_" 
},
{ "detail": "[Error 3] The 
system cannot find the path specified: '_'", "lineNo": 19, 
"result": "WARNING", "text": "_", "time": 
"2015-08-12T16:51:09+02:00", "type": "msg", "uri": "x-testsuite:/_" 
},
{ "detail": "LookupError: 
Object '_' not found. Could not match properties:\ntext for 
object name: '_'", "lineNo": _, "result": "ERROR", "text": 
"Script Error", "time": "2015-08-12T16:51:31+02:00", "type": "msg", "uri": 
"x-testsuite:/_" }
],
"stop": 
"2015-08-12T16:51:31+02:00"
},
{ "isSkipped": true, "lineNo": 7, 
"name": "Then _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 8, 
"name": "When _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 9, 
"name": "Then _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 10, 
"name": "Then _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 11, 
"name": "Then _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 12, 
"name": "And _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 13, 
"name": "Then _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" }
],
"stop": "2015-08-12T16:51:31+02:00"
}
],
"stop": "2015-08-12T16:51:31+02:00"
}
],
"stop": "2015-08-12T16:51:31+02:00"
}
],
"stop": "2015-08-12T16:51:31+02:00"
}
]
}

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and st

Re: Failed to parse Squish JSON with Cucumber json test reporting plugin

2015-08-17 Thread Marek Martyniak
Output from Squish is looking like this ( I used "_" to hide 
irrelevant ) :
{
"version": { "major": 1, "minor": 0 },
"tests": [
{
"name": "suite__",
"start": "2015-08-12T16:43:28+02:00",
"type": "testsuite",
"uri": "_",
"tests": [
{
"name": "tst__",
"start": "2015-08-12T16:51:04+02:00",
"type": "testcase",
"uri": "x-testsuite:/tst__",
"tests": [
{
"lineNo": 1,
"name": "_",
"start": "2015-08-12T16:51:06+02:00",
"type": "feature",
"uri": "x-testcase:/test.feature",
"tests": [
{
"lineNo": 5,
"name": "_",
"start": "2015-08-12T16:51:06+02:00",
"type": "scenario",
"uri": "x-testcase:/test.feature",
"tests": [
{
"lineNo": 6,
"name": "Given _",
"start": 
"2015-08-12T16:51:06+02:00",
"type": "step",
"uri": 
"x-testcase:/test.feature",
"tests": [
{ "detail": "[Error 3] The 
system cannot find the path specified: '_'", "lineNo": _, 
"result": "WARNING", "text": "_", "time": 
"2015-08-12T16:51:09+02:00", "type": "msg", "uri": "x-testsuite:/_" 
},
{ "detail": "[Error 3] The 
system cannot find the path specified: '_'", "lineNo": _, 
"result": "WARNING", "text": "_", "time": 
"2015-08-12T16:51:09+02:00", "type": "msg", "uri": "x-testsuite:/_" 
},
{ "detail": "LookupError: 
Object '_' not found. Could not match properties:\ntext for 
object name: '_'", "lineNo": _, "result": "ERROR", "text": 
"Script Error", "time": "2015-08-12T16:51:31+02:00", "type": "msg", "uri": 
"x-testsuite:/_" }
],
"stop": 
"2015-08-12T16:51:31+02:00"
},
{ "isSkipped": true, "lineNo": 7, 
"name": "Then _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 8, 
"name": "When _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 9, 
"name": "Then _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 10, 
"name": "Then _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 11, 
"name": "Then _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 12, 
"name": "And _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" },
{ "isSkipped": true, "lineNo": 13, 
"name": "Then _", "start": "2015-08-12T16:51:31+02:00", "stop": 
"2015-08-12T16:51:31+02:00", "type": "step", "uri": 
"x-testcase:/test.feature" }
],
"stop": "2015-08-12T16:51:31+02:00"
}
],
"stop": "2015-08-12T16:51:31+02:00"
}
],
"stop": "2015-08-12T16:51:31+02:00"
}
],
"stop": "2015-08-12T16:51:31+02:00"
}
]
}

W dniu poniedziałek, 17 sierpnia 2015 10:54:25 UTC+2 użytkownik Marek 
Martyniak napisał:
>
> Hi, is support for .json result

Re: Failed to parse Squish JSON with Cucumber json test reporting plugin

2015-08-17 Thread James Nord
Not without a bug being raised and a some sample output from the tool 
showing how to reproduce.

But it may be that the tool is outputting garbage in which case this may 
not be fixed and the tool vendor may need to output JSON that is actually 
parsable by gherkin.

On Monday, August 17, 2015 at 9:54:25 AM UTC+1, Marek Martyniak wrote:
>
> Hi, is support for .json results generated by Squish is going to be added 
> for Cucumber json test reporting plugin ?
>
> [Cucumber Tests] Parsing results.
> [Cucumber Tests] parsing results.json
> ERROR: Build step failed with exception
> gherkin.deps.com.google.gson.JsonSyntaxException: 
> java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT 
> at line 1 column 2
> at gherkin.deps.com.google.gson.Gson.fromJson(Gson.java:806)
> at gherkin.deps.com.google.gson.Gson.fromJson(Gson.java:734)
> at gherkin.JSONParser.parse(JSONParser.java:41)
> at 
> org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:77)
> at 
> org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:43)
> at 
> org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:159)
> at 
> org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:105)
> at hudson.FilePath.act(FilePath.java:991)
> at hudson.FilePath.act(FilePath.java:969)
> at 
> org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl.parse(DefaultTestResultParserImpl.java:99)
> at 
> org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:99)
> at 
> org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultArchiver.perform(CucumberTestResultArchiver.java:112)
> 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:726)
> at hudson.model.Build$BuildExecution.post2(Build.java:185)
> at 
> hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
> 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:381)
> Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was 
> BEGIN_OBJECT at line 1 column 2
> at 
> gherkin.deps.com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
> at 
> gherkin.deps.com.google.gson.stream.JsonReader.beginArray(JsonReader.java:306)
> at 
> gherkin.deps.com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:79)
> at 
> gherkin.deps.com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)
> at gherkin.deps.com.google.gson.Gson.fromJson(Gson.java:795)
> ... 20 more
> Build step 'Publish Cucumber test result report' marked build as failure
> Finished: FAILURE
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/bc3f4060-fc36-43bb-80e3-7f1f5d635e98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Failed to parse Squish JSON with Cucumber json test reporting plugin

2015-08-17 Thread Marek Martyniak
Hi, is support for .json results generated by Squish is going to be added 
for Cucumber json test reporting plugin ?

[Cucumber Tests] Parsing results.
[Cucumber Tests] parsing results.json
ERROR: Build step failed with exception
gherkin.deps.com.google.gson.JsonSyntaxException: 
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT 
at line 1 column 2
at gherkin.deps.com.google.gson.Gson.fromJson(Gson.java:806)
at gherkin.deps.com.google.gson.Gson.fromJson(Gson.java:734)
at gherkin.JSONParser.parse(JSONParser.java:41)
at 
org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:77)
at 
org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:43)
at 
org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:159)
at 
org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:105)
at hudson.FilePath.act(FilePath.java:991)
at hudson.FilePath.act(FilePath.java:969)
at 
org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl.parse(DefaultTestResultParserImpl.java:99)
at 
org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:99)
at 
org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultArchiver.perform(CucumberTestResultArchiver.java:112)
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:726)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
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:381)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was 
BEGIN_OBJECT at line 1 column 2
at 
gherkin.deps.com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
at 
gherkin.deps.com.google.gson.stream.JsonReader.beginArray(JsonReader.java:306)
at 
gherkin.deps.com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:79)
at 
gherkin.deps.com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)
at gherkin.deps.com.google.gson.Gson.fromJson(Gson.java:795)
... 20 more
Build step 'Publish Cucumber test result report' marked build as failure
Finished: FAILURE

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4650d8d9-8de9-4f9d-bb5e-947ae4d94a54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.