getgauge / gauge

Light weight cross-platform test automation
https://gauge.org
Apache License 2.0
2.99k stars 341 forks source link

getting panic run time error with "--parallel --only" tag #1529

Closed Debashis9012 closed 4 years ago

Debashis9012 commented 4 years ago

Expected behavior

gauge should run successfully with the --parallel --only tag

Actual behavior

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x132ee1d]
goroutine 1 [running]:
github.com/getgauge/html-report/generator.computeTableDrivenStatuses(0xc4200d02c0)
        /tmp/src/github.com/getgauge/html-report/generator/transform.go:396 +0x2d
github.com/getgauge/html-report/generator.toSpec
(0xc42014a000, 0x0)
        /tmp/src/github.com/getgauge/html-report/generator/transform.go:348 +0x145f
github.com/getgauge/html-report/generator.ToSuiteResult(0xc420026084
, 0x36, 0xc4200d0160, 0x4a)
        /tmp/src/github.com/getgauge/html-report/generator/transform.go:68 +0x7e3
main.createReport(0xc4200947e0,
0x1464001, 0xc4200921e0, 0x0, 0x0, 0x0, 0x0)
        /godata/pipelines/HTML_Report/htmlReport.go:139 +
0xde
main.(*reportAccumulator).Meta(0xc420095ef0
, 0xc4200947e0)
        /godata/pipelines/HTML_Report/htmlReport.go:75 +0x254
main.(*reportAccumulator).Meta-fm
(0xc4200947e0)
        /godata/pipelines/HTML_Report/htmlReport.go:127 +0x34
github.com/getgauge/html-report/listener.(*GaugeListener).processMessages(0xc420095ec0, 0xc42019da40)
        /tmp/src/github.com/getgauge/html-report/listener/gaugeListener.go:98 +0x316
github.com/getgauge/html-report/listener.(*GaugeListener).Start(0xc420095ec0)
        /tmp/src/github.com/getgauge/html-report/listener/gaugeListener.go:75 +0xb7
main.createExecutionReport()
        /godata/pipelines/HTML_Report/htmlReport.go:129 +0x1a7

Steps to reproduce

  1. create a sample java project gauge init java
  2. run the command gauge run specs --parallel --only "single word" either from vs-code or from terminal

Gauge version

Gauge version: 1.0.7
Commit Hash: 104e7eef

Plugins
-------
html-report (4.0.8)
java (0.7.3)
sriv commented 4 years ago

issue is with html-report and not gauge. moving this.

sriv commented 4 years ago

This issue is actually with Gauge (my mistake on moving it prematurely). It seems gauge is incoorectly setting isTableDriven flag when sending the suite result, causing html-report to check for a datatable for the specresult. This causes the exception

Debashis9012 commented 4 years ago

This issue has been verified and found fixed. Tested version: Gauge version: 1.0.7 Commit Hash: b9d1cdcc