Coder Social home page Coder Social logo

Comments (10)

kingsleyh avatar kingsleyh commented on September 28, 2024

Hi

Could you send me an example of the json

--k

Sent from my iPad

On 12 Mar 2014, at 17:02, holalchi [email protected] wrote:

I upgrade to Cucumber JVM 1.0.9 and tested my feature file.
Tested passed and result json file generated
I tried to generate the report using cucumber-reporting-0.0.22.jar

Error message

{code}
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getName' in class net.masterthought.cucumber.json.Step threw exception java.lang.NullPointerException at templates/featureReport.vm[line 210, column 25]
{code}


Reply to this email directly or view it on GitHub.

from cucumber-reporting.

holalchi avatar holalchi commented on September 28, 2024

Below you can see the difference between two version of json files

from Cucumber JVM 1.0.2 (json content)

    "steps": [
      {
        "result": {
          "duration": 255780848,
          "status": "passed"
        },
        "name": "a \"ABC\" ABC customer",
        "keyword": "Given ",
        "line": 7,
        "match": {
          "arguments": [
            {
              "val": "ABC",
              "offset": 3
            }
          ],
          "location": "ABCTestStepDefs.a_ABC_customer(String)"
        }
      },

from Cucumber JVM 1.0.9 (json content)

    "steps": [
      {
        "name": "a \"ABC\" ABC customer",
        "keyword": "Given ",
        "line": 7,
      },

from cucumber-reporting.

kingsleyh avatar kingsleyh commented on September 28, 2024

Hi

I have had a quick look. The actual exception is due to some new code that provides step execution durations - it assumes the presence of a result section in the json.

Which brings me to the main issue - there is no result section for each step in the json - this means it's impossible to tell if a step has passed or failed and the duration time of the step.

I think it's unlikely that this would have been removed from cucumber jvm - so I think this is a bug with the json generation in cucumber jvm 1.0.9

--K

On 12 Mar 2014, at 17:28, holalchi [email protected] wrote:

Below you can see the difference between two version of json files

from Cucumber JVM 1.0.2 (json content)

"steps": [
  {
    "result": {
      "duration": 255780848,
      "status": "passed"
    },
    "name": "a \"ABC\" ABC customer",
    "keyword": "Given ",
    "line": 7,
    "match": {
      "arguments": [
        {
          "val": "ABC",
          "offset": 3
        }
      ],
      "location": "ABCTestStepDefs.a_ABC_customer(String)"
    }
  },

from Cucumber JVM 1.0.9 (json content)

"steps": [
  {
    "name": "a \"ABC\" ABC customer",
    "keyword": "Given ",
    "line": 7,
  },


Reply to this email directly or view it on GitHub.

from cucumber-reporting.

holalchi avatar holalchi commented on September 28, 2024

Is there any way to enable detail json file?
Right now,I am using below format
format = {"pretty", "html:target/cucumber", "json-pretty:target/cucumber.json"}

Pls suggest.

from cucumber-reporting.

kingsleyh avatar kingsleyh commented on September 28, 2024

I'm not too sure to be honest

Sent from my iPad

On 12 Mar 2014, at 17:46, holalchi [email protected] wrote:

Is there any way to enable detail json file?
Right now,I am using below format
format = {"pretty", "html:target/cucumber", "json-pretty:target/cucumber.json"}

Pls suggest.


Reply to this email directly or view it on GitHub.

from cucumber-reporting.

holalchi avatar holalchi commented on September 28, 2024

Hi Kingsleyh,
only reason i want to upgrade JVM 1.0.2 to 1.0.9 is to get support for "cucumber.options" , so that i can run maven command with options from Jenkins to override the options from RunCukesTest.java file
$mvn test -Dcucumber.options="--tags @all_test --format html:target/cucumber json-pretty:target/cucumber.json"

Please suggest some ways to override the RunCukesTest options from command line

Thanks!

from cucumber-reporting.

kingsleyh avatar kingsleyh commented on September 28, 2024

why not move to the latest version? 1.1.5

--K

On 13 Mar 2014, at 14:15, holalchi [email protected] wrote:

Hi Kingsleyh,
only reason i want to upgrade JVM 1.0.2 to 1.0.9 is to get support for , so that i can run maven command with options from Jenkins to override the options from RunCukesTest.java file
$mvn test -Dcucumber.options="--tags @all_test --format html:target/cucumber json-pretty:target/cucumber.json"

Please suggest some ways to override the RunCukesTest options from command line

Thanks!


Reply to this email directly or view it on GitHub.

from cucumber-reporting.

holalchi avatar holalchi commented on September 28, 2024

With JVM 1.1.5, junit 4.11 ,maven-surefire-plugin 2.14.1 , I get below error, any clue what could be wrong?

java.lang.TypeNotPresentException: Type Cucumber not present
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:390)
at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:371)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:300)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:241)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:88)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3178)
at java.lang.Class.getAnnotation(Class.java:3137)
at org.apache.maven.surefire.common.junit4.JUnit4TestChecker.isValidJUnit4Test(JUnit4TestChecker.java:64)
at org.apache.maven.surefire.common.junit4.JUnit4TestChecker.accept(JUnit4TestChecker.java:51)
at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:97)
at org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:206)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)

at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)

from cucumber-reporting.

kingsleyh avatar kingsleyh commented on September 28, 2024

I think there were some changes to the Cucumber runner class - check the docs

On 13 Mar 2014, at 14:15, holalchi [email protected] wrote:

Hi Kingsleyh,
only reason i want to upgrade JVM 1.0.2 to 1.0.9 is to get support for , so that i can run maven command with options from Jenkins to override the options from RunCukesTest.java file
$mvn test -Dcucumber.options="--tags @all_test --format html:target/cucumber json-pretty:target/cucumber.json"

Please suggest some ways to override the RunCukesTest options from command line

Thanks!


Reply to this email directly or view it on GitHub.

from cucumber-reporting.

holalchi avatar holalchi commented on September 28, 2024

Cucumber-JVM/Core 1.1.4 is having fix for this issue.
The ticket can be closed.
Thanks!

from cucumber-reporting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.