JGiven icon indicating copy to clipboard operation
JGiven copied to clipboard

Create an AsciiDoc Reporter

Open janschaefer opened this issue 10 years ago • 6 comments

Having a reporter that generates AsciiDoc would have several benefits:

  • The result can be transformed into many other formats like HTML or PDF
  • The resulting files could be included in an overall AsciiDoc documentation that is completely separate from JGIven and could be even maintained by non-developers.

janschaefer avatar Jan 11 '15 08:01 janschaefer

Scenarios: http://jgiven.org/jgiven-report/html5/#/tag/Feature/AsciiDoc%20Report

janschaefer avatar Jan 24 '15 21:01 janschaefer

I see that the AsciiDocReportModelVisitor implements ReportModelHandler, while a lot of others implement ReportModelVisitor that can access more details from the report. Can you please share your thoughts on how this should work?

How would I acccess information from tags and attachments and put them into the asciidoc report?

ahus1 avatar Jan 31 '16 22:01 ahus1

The AsciiDoc reporter is really alpha state. If you want to work on that you are free to change the implementation however you want :-)

janschaefer avatar Feb 01 '16 08:02 janschaefer

I think the best way to go here is to first come up with an example asciidoc document to get a feeling for what generated documents should look like. That's what I'll start with, anyway. :-)

A first few tests show me, however, that we will need to deliver some theme / style file. At least for reference. For example, for formatting reasons I'd use a table for displaying a scenario, but inside the asciidoc document there's no way to turn off parity-dependent backgrounds (odd / even rows). :-( Using a plain paragraph just doesn't look all that good.

Edit: Actually I don't like tables for the scenario anymore. I think verses may be a better choice. I'll just keep working on a draft and present it when it's finished.

Airblader avatar Jul 09 '16 21:07 Airblader

cool feature. Is there still someone working on it? Is there somewhere a demo of a report which shows what already has been done?

rdmueller avatar Jun 04 '19 13:06 rdmueller

No, nobody is working on this. There is an early state that implements some basic features (AsciiDocReportGenerator). There is a also a rudimentary test that it works (AsciiDocReportGeneratorTest)

janschaefer avatar Jun 05 '19 19:06 janschaefer