Hi Alex,
Sorry for a late reply.
You wouldn't be really passing anything to writeReport() as it's a method called by Geb internally. What you need is a geb.report.Reporter implementation that has a reference to your proxy. I can see two ways of doing it:
- making your proxy reference a singleton accessible in static context, that way you can start/reset your proxy from setup() method in a base spec class class and access it to save the file from your reporter implementation registered via the config file
- start/instantiate your proxy from setup/setupSpec() method in a base spec, then pass it to a new instance of the reporter which should then be configured to be used by Geb via geb.Configuration#setReporter() (there's a configuration instance available on geb.Browser instances), possibly using geb.report.CompositeReporter if you want to keep the reporters that are shipped with Geb, and finally tear down the proxy in cleanup/cleanupSpec()
I hope that this helps.