-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indent & Format the page source for html reports #287
Comments
The HtmlReports as we see today are designed to report on the test execution. It means each report element (feature/scenario/step) has an associated runtime id, status, execution time, error details, and attachments and in the case of the parameterized steps, they may contain runtime generated data (Guids, dates, fake data). All of these make the Html report not suitable for being a source of audit logs, especially source-controlled diffs. It seems like you are looking for the ability to capture/generate the test specs (which are more like the scenario prescriptions, not the execution result) and which at this point in time are not available in LightBDD. What I would suggest here is to create your own implementation of The Report Generation Configuration wiki page describes how to wire in a custom formatter. I will leave this issue open to have further conversation, but I won't have plans to implement this requirement on the Html report. |
Ok, fair enough. I think HTML source controlled specifications documents are a really good future feature though that people would be interested in, so I'd urge you to consider it. I do want the end document to be in HTML (even if it's via an XML interim thing) because ultimately no one will read an XML document, but HTML documents can be reader friendly. In the meantime I've done my own implementation which takes a copy of the HTML generated reports, cuts out the instance level information, renames it and gives it a new heading and sends it in to somewhere source controlled. For my current tests it succeeds in removing all instance information, and also formatting the html so it will be clearer in source control. The downside is it's reliant on the current implementation of the HTML report not changing, so I'll have to maintain it if you change that. Also if I end up with different types of tests that have more instance level information, then I'll have to adjust as I go to cut that out, but I'm confident that wont be too difficult. I may look at using the IReportFormatter in future, at the moment I'm just doing a post test run step, but this works for me as a starting point. I'll post the code here in case it's helpful to anyone else wants to have their reports in source control and this gives them some inspiration.
|
Description
Currently the Html Reports put all the content on a single line. This is fine when viewing the reports in a browser. However, these reports are serving as specifications documents, and because of this, we are placing them in source control so that the specifications document changes can be tracked. However, due to the fact that everything is on one line, it makes clear Github diffs impossible. What I'd like to see is some way of easily having the HTML reports format their source code body so that specific changes will appear more clearly in diffs.
Progress
The text was updated successfully, but these errors were encountered: