getgauge / html-report

HTML report generation plugin for Gauge
Apache License 2.0
29 stars 41 forks source link

Html report is not being generated #227

Open jonathangiber opened 5 years ago

jonathangiber commented 5 years ago

Using new feature allow_filtered_parallel_execution.

This is happening when using the filter feature. I use a tag for running a scenario in serial when the other scenarios in same spec still run in parallel.

Example:

Spec test Tags: parallel

Scenario 1

Scenario 2

Scenario 3

Scenario 4

Tags: serial

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

goroutine 1 [running]: github.com/getgauge/html-report/generator.computeTableDrivenStatuses(0xc4200e0000) /tmp/src/github.com/getgauge/html-report/generator/transform.go:396 +0x2d github.com/getgauge/html-report/generator.toSpec(0xc42015c000, 0x0) /tmp/src/github.com/getgauge/html-report/generator/transform.go:348 +0x145f github.com/getgauge/html-report/generator.ToSuiteResult(0xc420691c00, 0x13, 0xc42025a580, 0x27) /tmp/src/github.com/getgauge/html-report/generator/transform.go:68 +0x7e3 main.createReport(0xc420172090, 0x852601, 0xc420014300, 0x0, 0x0, 0x0, 0x0) /godata/pipelines/HTML_Report/htmlReport.go:139 +0xde main.(reportAccumulator).Meta(0xc420099ef0, 0xc420172090) /godata/pipelines/HTML_Report/htmlReport.go:75 +0x254 main.(reportAccumulator).Meta-fm(0xc420172090) /godata/pipelines/HTML_Report/htmlReport.go:127 +0x34 github.com/getgauge/html-report/listener.(GaugeListener).processMessages(0xc420099ec0, 0xc4201ada40) /tmp/src/github.com/getgauge/html-report/listener/gaugeListener.go:98 +0x316 github.com/getgauge/html-report/listener.(GaugeListener).Start(0xc420099ec0) /tmp/src/github.com/getgauge/html-report/listener/gaugeListener.go:75 +0xb7 main.createExecutionReport() /godata/pipelines/HTML_Report/htmlReport.go:129 +0x1a7 main.main() /godata/pipelines/HTML_Report/main.go:59 +0x2ab Successfully generated json-report to => /tmp/tmp.IxyX1IpLBn/reports/json-report Plugin [JSON Report] with pid [2663] has exited Plugin [Html Report] with pid [2658] has exited Specifications: 47 executed 45 passed 2 failed 0 skipped Scenarios: 73 executed 71 passed 2 failed 0 skipped

Total time taken: 37m33.713s

Gauge version: 1.0.5 Commit Hash: 562f036

Plugins

html-report (4.0.8) java (0.7.2) json-report (0.3.1) screenshot (0.0.1) spectacle (0.1.3) xml-report (0.2.1)

Apoorva-GA commented 5 years ago

@jonathangiber was able to reproduce the issue. We will try and fix it as soon as possible.

Attaching the sample project bellow where the issue is reproducible :
tmp.zip

Run command : gauge run specs --parallel --only "parallelizable && \!serial" To see the above error.

bholya commented 2 years ago

@Apoorva-GA @sriv We are experiencing same issue. We are starting gauge using npm. Crash happens on different scenarios and it is difficult to identify root cause.

HTML Report v4.1.4 Gauge v1.4.2 taiko v1.2.8 Gauge JS v2.4.0

Number of scenarios > 200


veniam, qui|data/PDF1_kleiner10MB.pdf| 12:32:09 [runner: 8] ## Aktenvermerkt kann mit einer zu langen Beschreibung nicht erfolgreich hinzugefügt werden 12:33:31 [runner: 8]
12:33:31 Failed Step: Projekt Aktenvermerk wird angelegt: 12:33:31 Specification: specs/implemented/projekt/projekt-aktenvermerk.spec:54 12:33:31 Error Message: Error: CustomSelector with query input[aria-describedby="fileUploadHintLabel"] not found 12:33:31 Stacktrace: 12:33:31 Error: CustomSelector with query input[aria-describedby="fileUploadHintLabel"] not found 12:33:31 at findElements (node_modules/taiko/lib/elementSearch.js:260:11) 12:33:31 at async waitAndGetActionableElement (node_modules/taiko/lib/actions/pageActionChecks.js:149:43) 12:33:31 at async attach (node_modules/taiko/lib/actions/attach.js:31:19) 12:33:31 at async module.exports.attach (node_modules/taiko/lib/taiko.js:1117:16) 12:33:31 at async module.exports. (node_modules/taiko/lib/taiko.js:2610:14) 12:33:31 at async Object. (tests/aktenvermerk.js:48:7) 12:33:31 [runner: 8] 12:33:36 [runner: 2] 12:33:51 Error Message: Runner is not Alive 12:33:51 Stacktrace: 12:33:51
12:33:51 panic: runtime error: invalid memory address or nil pointer dereference 12:33:51 [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x813aed] 12:33:51 goroutine 4368 [running]: 12:33:51 github.com/getgauge/html-report/generator.computeTableDrivenStatuses(0xc00091d880) 12:33:51 /home/runner/work/html-report/html-report/generator/transform.go:416 +0x2d 12:33:51 github.com/getgauge/html-report/generator.toSpec(0xc000127860, 0xc000038004, 0x57, 0xc00091d6c0) 12:33:51 /home/runner/work/html-report/html-report/generator/transform.go:368 +0x1397 12:33:51 github.com/getgauge/html-report/generator.ToSuiteResult(0xc000038004, 0x57, 0xc00031d080, 0x7f) 12:33:51 /home/runner/work/html-report/html-report/generator/transform.go:69 +0x8be 12:33:51 main.createReport(0xc000448e40, 0x9d6101) 12:33:51
12:33:51 /home/runner/work/html-report/html-report/htmlReport.go:54 +0xd5 12:33:51 main.(handler).NotifySuiteResult(0xc000102300, 0x9d2e00, 0xc000448e10, 0xc000448e40, 0xc000102300, 0xc00053fa50, 0x46b807) 12:33:51 /home/runner/work/html-report/html-report/handler.go:47 +0x30 12:33:51 github.com/getgauge/html-report/gauge_messages._Reporter_NotifySuiteResult_Handler(0x8cd120, 0xc000102300, 0x9d2e00, 0xc000448e10, 0xc0003b6f00, 0x0, 0x9d2e00, 0xc000448e10, 0xc0005fc000, 0xf61db) 12:33:51 /home/runner/work/html-report/html-report/gauge_messages/services.pb.go:1316 +0x214 12:33:51 google.golang.org/grpc.(Server).processUnaryRPC(0xc000106480, 0x9d5ff8, 0xc000106780, 0xc0002d4100, 12:33:51 0xc00019d350, 0xc43c20, 0x0, 0x0, 0x0) 12:33:51 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.25.1/server.go:1007 +0x482 12:33:51 google.golang.org/grpc.(Server).handleStream(0xc000106480, 0x9d5ff8, 0xc000106780, 0xc0002d4100, 0x0) 12:33:51 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.25.1/server.go:1287 +0xd2c 12:33:51 google.golang.org/grpc.(Server).serveStreams.func1.1(0xc0002742c0, 0xc000106480, 0x9d5ff8, 0xc000106780, 0xc0002d4100) 12:33:51 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.25.1/server.go:722 +0xab 12:33:51 created by google.golang.org/grpc.(*Server).serveStreams.func1 12:33:51 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.25.1/server.go:720 +0xa5 12:33:51 Error occurred while waiting for plugin process to finish. 12:33:51 Error : exit status 2 12:33:51 Unable to connect to plugin Html Report 4.1.2. rpc error: code = Unavailable desc = error reading from server: EOF 12:33:51
12:33:51 Failed to kill plugin Html Report 4.1.2. os: process already finished 12:33:51
12:33:51 Successfully generated json-report to => /home/jenkins/......reports/json-report/2022-02-19 12.33.50 12:33:51
12:33:51 Specifications: 32 executed 25 passed 7 failed 2 skipped 12:33:51 Scenarios: 218 executed 192 passed 26 failed 3 skipped 12:33:51
12:33:51 Total time taken: 25m18.116s