JGiven
JGiven copied to clipboard
Create an AsciiDoc Reporter
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.
Scenarios: http://jgiven.org/jgiven-report/html5/#/tag/Feature/AsciiDoc%20Report
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?
The AsciiDoc reporter is really alpha state. If you want to work on that you are free to change the implementation however you want :-)
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.
cool feature. Is there still someone working on it? Is there somewhere a demo of a report which shows what already has been done?
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
)