Top-Q / difido-reports

This project aims to provide a generic implementation for HTML test reports.
http://top-q.github.io/difido-reports
Apache License 2.0
46 stars 30 forks source link

Using "existing.execution.id=-1" causing for errors in log #243

Closed NirBY closed 3 years ago

NirBY commented 3 years ago

I have used your example, for automatically getting the following execution.id: Config Example Used.

System Info: Difido Ver: v2.2.05 Elasticsearch ver: v6.7.0

Config Used:

#Properties were edited using Jenkins
#Sun Apr 07 13:08:01 IDT 2019
port=8088
execution.description=Difido_Tag
append.to.existing.execution=true
existing.execution.id=-1
force.new.execution=true
enabled=true
execution.properties=Git Date\=git_updated;Git Last Commit\=https\://git_Hash
host=host_ip
use.shared.execution=false

It works fine, but I see lots of errors in server side:

2020-07-25 06:45:26.095 DEBUG 25930 --- [10-8088-exec-14] i.c.t.r.front.rest.TestDetailsResource   : POST - Add execution details to execution with id 716257
2020-07-25 06:45:26.095 DEBUG 25930 --- [.10-8088-exec-6] i.c.t.r.front.rest.TestDetailsResource   : POST - Add execution details to execution with id -1
2020-07-25 06:45:26.096 DEBUG 25930 --- [.10-8088-exec-4] i.c.t.r.front.rest.TestDetailsResource   : POST - Add execution details to execution with id 716253
2020-07-25 06:45:26.096 DEBUG 25930 --- [10-8088-exec-13] i.c.t.r.front.rest.TestDetailsResource   : POST - Add execution details to execution with id 716259
2020-07-25 06:45:26.112 ERROR 25930 --- [.10-8088-exec-6] i.c.t.r.b.execution.MetadataController   : Trying to get execution meta data of execution -1 which is not exist
2020-07-25 06:45:26.113 ERROR 25930 --- [.10-8088-exec-6] i.c.t.r.front.rest.TestDetailsResource   : Can't update test details for execution -1 which is null
2020-07-25 06:45:26.115 ERROR 25930 --- [.10-8088-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [java.lang.IllegalArgumentException: Metadata can't be null in event from type TestDetailsCreatedEvent] with root cause

java.lang.IllegalArgumentException: Metadata can't be null in event from type TestDetailsCreatedEvent
    at il.co.topq.report.events.AbsMetadataEvent.<init>(AbsMetadataEvent.java:12) ~[difido-server-plugins-common-2.2.05.jar!/:na]
    at il.co.topq.report.events.TestDetailsCreatedEvent.<init>(TestDetailsCreatedEvent.java:11) ~[difido-server-plugins-common-2.2.05.jar!/:na]
    at il.co.topq.report.front.rest.TestDetailsResource.post(TestDetailsResource.java:50) ~[classes!/:2.2.05]
    at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
.
.
.
itaiag commented 3 years ago

When using the append to existing execution mode, you have to provide a valid execution id. This is done by calling the Add Execution service as described in the Server API Documentation . The service will respond with an integer that represents the new execution id. At the end of the execution you will also need to call the End Execution service with the same execution id.

NirBY commented 3 years ago

It seems to be fix in V3.0. I should have mention using jSystem, also added the config used 👆 - will try to see if you implement it in jSystem's difido plugin