Hi Marc,
Thanks for your suggestion! I tried the get executiondata and successfully run
the offline instrument -> deploy to GAE -> collection data. I got the .exec
file in the google cloud storage, but the:
Caused by: java.io.IOException: Invalid execution data file.
at
org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:89)
at org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:59)
at org.jacoco.ant.ReportTask.loadExecutionData(ReportTask.java:514)
... 25 more
when I try to get the report from the exec file. This file is send through the
google's api and I try to write the byte[] in the output stream and save as a
.exec file. Not sure whether the invalid file is due to this byte[] to file
save process. We used to try to save the coboertura data file by write the
whole data object and it can parse after the donwload.
Yutian Song
On Thursday, May 11, 2017 at 10:53:42 PM UTC-7, Marc R. Hoffmann wrote:
> Hi,
>
> JaCoCo offers an runtime API for this:
> http://www.jacoco.org/jacoco/trunk/doc/api/org/jacoco/agent/rt/package-summary.html
>
> With
>
> byte[] execdata = RT.getAgent().getExecutionData(false);
>
> you can get the execution data within the App engine and transfer/store
> it by a apropriate mechanism.
>
> If you get JaCoCo running with Goole AppEngine please let us know!
>
> Regards,
> -marc
>
> On 12.05.17 02:57, yutian.song via JaCoCo and EclEmma Users wrote:
> > I'm working on a project to collect code coverage for end to end mode
> > server side code. We used to use the cobertura to achieve this but
> > interested in transfer to Jacoco.
> >
> > Our service is running on the Google appengine which bring us a lot of
> > trouble like no file read/write allowed, no socket server allowed. These
> > limitation makes it has only one solution to read the test result file is
> > through Google's cloud platform storage. Something like we send the code
> > coverage data in byte array to somewhere. Cobertura github wiki provide a
> > java reflect method that collect data and we try to using servlet to
> > trigger this collection and data transmission.
> >
> > Google appengine not allow using java agent force us to use the offline
> > instrument. I just tried the ant task for Jacoco and got the instrumented
> > classes but wonder if there is similar thing we could do to trigger data
> > collection and transmission in servlet with Jacoco.
> >
--
You received this message because you are subscribed to the Google Groups
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/e5b88ec0-2f97-4fff-8313-1226a721bb83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.