Cucumber HTML report does not report the Unicode from in Formatter.result(Json result).Unicode Issue

97 views
Skip to first unread message

Vikram Upadhya

unread,
Sep 25, 2016, 6:11:56 PM9/25/16
to Cukes
Hi 
  I am implementing a Automated BDD Scenario using Junit, Cucumber and jenkins along with a Automation tool.

Commandline from Jenkins job with Jar versions
"C:\Program Files\Java\jre1.8.0_101\bin\java.exe" -classpath 
C:\Workspace\bin;
C:\Workspace\Lib\cucumber-core-1.2.4.jar;
C:\Workspace\Lib\cucumber-html-0.2.3.jar;
C:\Workspace\Lib\cucumber-java-1.2.4.jar;
C:\Workspace\Lib\cucumber-junit-1.2.4.jar;
C:\Workspace\Lib\cucumber-jvm-deps-1.0.3.jar;
C:\Workspace\Lib\cucumber-testng-1.2.0.jar;
C:\Workspace\Lib\gherkin-2.12.2.jar;
C:\Workspace\Lib\gherkin3-3.0.0.jar;
C:\Workspace\Lib\hamcrest-all.jar;
C:\Workspace\Lib\hamcrest-core-1.3.jar;
C:\Workspace\Lib\jacob-1.14.3.jar;
C:\Workspace\Lib\junit-4.12.jar;
C:\Workspace\Lib\TestComplete.jar;
/C:/Users/Lotus/eclipse/java-neon/eclipse/configuration/org.eclipse.osgi/215/0/.cp/;/C:/Users/Lotus/eclipse/java-neon/eclipse/configuration/org.eclipse.osgi/214/0/.cp/    org.junit.runner.JUnitCore  CucumberTest.TestRunner 


TestRunner options are to generate the Json, XML and html.  The Report .Json and Report.js file have the Step result for an Junit assertEquals as False.

Issue: Junit report in Cucumber is listed as Blank for Unicode 

Given i launch Lotus012ms
java.lang.AssertionError: expected: but was:
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:118)
	at org.junit.Assert.assertEquals(Assert.java:144)
	at StepDefinition.Test_Steps.i_launch_Lotus(Test_Steps.java:54)
	at ✽.Given i launch Lotus(features/Test.Feature:19)
When i enter 0000ms
Then i should get the expected Value as 0

Junit Report

  1. Given i launch Lotus
    java.lang.AssertionError: expected:<true> but was:<false>
    	at org.junit.Assert.fail(Assert.java:88)
    	at org.junit.Assert.failNotEquals(Assert.java:834)
    	at org.junit.Assert.assertEquals(Assert.java:118)
    	at org.junit.Assert.assertEquals(Assert.java:144)
    	at StepDefinition.Test_Steps.i_launch_Lotus(Test_Steps.java:54)
    	at ✽.Given i launch Lotus(features/Test.Feature:19)
    
  2. When i enter 0
  3. Then i should get the expected Value as 0
Cucumber XML Verbatim:
]]></failure>
</testcase>
<testcase classname="Check BDD" name="TestScenario#2_2" time="0.014023">
<failure message="java.lang.AssertionError: expected:&lt;true&gt; but was:&lt;false&gt;&#13;&#10;&#9;at org.junit.Assert.fail(Assert.java:88)&#13;&#10;&#9;at org.junit.Assert.failNotEquals(Assert.java:834)&#13;&#10;&#9;at org.junit.Assert.assertEquals(Assert.java:118)&#13;&#10;&#9;at org.junit.Assert.assertEquals(Assert.java:144)&#13;&#10;&#9;at StepDefinition.Test_Steps.i_launch_Lotus(Test_Steps.java:54)&#13;&#10;&#9;at ✽.Given i launch Lotus(features/Test.Feature:19)&#13;&#10;"><![CDATA[Given i launch Lotus........................................................failed
When i enter 5..............................................................skipped
Then i should get the expected Value as 5...................................skipped
StackTrace:
java.lang.AssertionError: expected:<true> but was:<false>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:144)

Same Result in Json
formatter.step({
  "line": 21,
  "name": "i should get the expected Value as 0",
  "matchedColumns": [
    1
  ],
  "keyword": "Then "
});
formatter.match({
  "location": "Test_Steps.i_launch_Lotus()"
});
formatter.result({
  "duration": 12531542,
  "error_message": "java.lang.AssertionError: expected:\u003ctrue\u003e but was:\u003cfalse\u003e\r\n\tat org.junit.Assert.fail(Assert.java:88)\r\n\tat org.junit.Assert.failNotEquals(Assert.java:834)\r\n\tat org.junit.Assert.assertEquals(Assert.java:118)\r\n\tat org.junit.Assert.assertEquals(Assert.java:144)\r\n\tat StepDefinition.Test_Steps.i_launch_Lotus(Test_Steps.java:54)\r\n\tat ✽.Given i launch Lotus(features/Test.Feature:19)\r\n",
  "status": "failed"
});

.Json
 "type": "scenario",
        "keyword": "Scenario Outline",
        "steps": [
          {
            "result": {
              "duration": 12531542,
              "error_message": "java.lang.AssertionError: expected:\u003ctrue\u003e but was:\u003cfalse\u003e\r\n\tat org.junit.Assert.fail(Assert.java:88)\r\n\tat org.junit.Assert.failNotEquals(Assert.java:834)\r\n\tat org.junit.Assert.assertEquals(Assert.java:118)\r\n\tat org.junit.Assert.assertEquals(Assert.java:144)\r\n\tat StepDefinition.Test_Steps.i_launch_Lotus(Test_Steps.java:54)\r\n\tat ✽.Given i launch Lotus(features/Test.Feature:19)\r\n",
              "status": "failed"
            },
            "line": 19,
            "name": "i launch Lotus",
            "match": {
              "location": "Test_Steps.i_launch_Lotus()"
            },
            "keyword": "Given "
          },

Could Someone confirm and have this reported as a issue?.
Message has been deleted
Message has been deleted

Vikram Upadhya

unread,
Oct 6, 2016, 2:15:21 AM10/6/16
to Cukes
Hi All,
   There was a code commit to escape the <> separators.
Ref

Code changes are on the Cucumber-Reporting jar. How could i add this to the Cucumber-sandwich utility or to the Cucumber -Jenkins Plugin?.

When is the next cucumber-Jenkins release scheduled?.


regards,
Vikram U

Andrew Premdas

unread,
Oct 6, 2016, 5:39:05 AM10/6/16
to cu...@googlegroups.com
On 6 October 2016 at 07:15, Vikram Upadhya <vikr...@gmail.com> wrote:
Hi All,
   There was a code commit to escape the <> separators.
Ref

Code changes are on the Cucumber-Reporting jar. How could i add this to the Cucumber-sandwich utility or to the Cucumber -Jenkins Plugin?.

When is the next cucumber-Jenkins release scheduled?.


regards,
Vikram U

You need to address these questions to the authors of those tools, perhaps via Github.

All best

Andrew

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
------------------------
Andrew Premdas
Reply all
Reply to author
Forward
0 new messages