getgauge / Intellij-Plugin

Gauge IntelliJ IDEA plugin
Apache License 2.0
43 stars 28 forks source link

Data table driven spec run gives segmentation violation #292

Closed sswaroopgupta closed 7 years ago

sswaroopgupta commented 7 years ago

Expected behavior If there is a failure in the specs with Data table execution, it should handled.

Actual behavior Getting a runtime error

/usr/local/bin/gauge run --machine-readable --simple-console /Users/sswaroop/work/t/untitled/specs/example.spec:18
Testing started at 10:16 AM ...

   |Word |
   |-----|
   |AEIOU|

Failed: Almost all words have vowels
Filename: specs/example.spec
Message: java.lang.AssertionError: expected:<3> but was:<0>
Stack Trace:
org.junit.Assert.fail(Assert.java:88)
org.junit.Assert.failNotEquals(Assert.java:834)
org.junit.Assert.assertEquals(Assert.java:645)
org.junit.Assert.assertEquals(Assert.java:631)
StepImplementation.verifyVowelsCountInMultipleWords(StepImplementation.java:31)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.thoughtworks.gauge.execution.MethodExecutor.execute(MethodExecutor.java:38)
com.thoughtworks.gauge.execution.StepExecutionStage.executeStepMethod(StepExecutionStage.java:74)
com.thoughtworks.gauge.execution.StepExecutionStage.executeStep(StepExecutionStage.java:67)
com.thoughtworks.gauge.execution.StepExecutionStage.execute(StepExecutionStage.java:49)
com.thoughtworks.gauge.execution.AbstractExecutionStage.executeNext(AbstractExecutionStage.java:24)
com.thoughtworks.gauge.execution.HookExecutionStage.execute(HookExecutionStage.java:43)
com.thoughtworks.gauge.execution.ExecutionPipeline.start(ExecutionPipeline.java:29)
com.thoughtworks.gauge.processor.ExecuteStepProcessor.process(ExecuteStepProcessor.java:39)
com.thoughtworks.gauge.connection.MessageDispatcher.dispatchMessages(MessageDispatcher.java:91)
com.thoughtworks.gauge.GaugeRuntime.dispatchMessages(GaugeRuntime.java:105)
com.thoughtworks.gauge.GaugeRuntime.access$100(GaugeRuntime.java:37)
com.thoughtworks.gauge.GaugeRuntime$2.run(GaugeRuntime.java:86)
java.lang.Thread.run(Thread.java:745)

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x130d87d]

goroutine 1 [running]:
github.com/getgauge/html-report/generator.computeTableDrivenStatuses(0x4216ef9e0)
    /tmp/src/github.com/getgauge/html-report/generator/transform.go:360 +0x2d
github.com/getgauge/html-report/generator.toSpec(0x4217dc540, 0x0)
    /tmp/src/github.com/getgauge/html-report/generator/transform.go:312 +0x107e
github.com/getgauge/html-report/generator.ToSuiteResult(0x421670064, 0x1f, 0x42175e360, 0x33)
    /tmp/src/github.com/getgauge/html-report/generator/transform.go:59 +0x3ea
main.createReport(0x421666260)
    /godata/pipelines/HTML_Report/htmlReport.go:84 +0xb0
github.com/getgauge/html-report/listener.(*GaugeListener).processMessages(0x4217b2480, 0x4217b1960)
    /tmp/src/github.com/getgauge/html-report/listener/gaugeListener.go:80 +0x211
github.com/getgauge/html-report/listener.(*GaugeListener).Start(0x4217b2480)
    /tmp/src/github.com/getgauge/html-report/listener/gaugeListener.go:60 +0xf3
main.createExecutionReport()
    /godata/pipelines/HTML_Report/htmlReport.go:75 +0xe5
main.main()
    /godata/pipelines/HTML_Report/main.go:57 +0x2f1
Specifications: 1 executed  0 passed    1 failed    0 skipped
Scenarios:  1 executed  0 passed    1 failed    0 skipped

Total time taken: 670ms
Updates are available. Run `gauge update -c` for more info.

Process finished with exit code 1

Steps to replicate

Version

Gauge version: 0.9.2.nightly-2017-08-30
Commit Hash: b0fda9f

Plugins
-------
csharp (0.10.1)
html-report (4.0.2.nightly-2017-08-07)
java (0.6.5.nightly-2017-08-14)
ruby (0.4.1)
spectacle (0.1.2)
xml-report (0.2.0)

Gauge-IntelliJ - Version: 0.3.7.nightly-2017-08-30

kashishm commented 7 years ago

Issue already exists in HTML report https://github.com/getgauge/html-report/issues/158.