-
Notifications
You must be signed in to change notification settings - Fork 642
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
Add HTMLReporter to Generate HTML Based on XML #2130
Conversation
HTMLReporter
to Generate HTML Based on XML id("java") | ||
kotlin("multiplatform") | ||
id("java-library") | ||
id("org.jetbrains.kotlin.plugin.spring") version Libs.kotlinVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is spring needed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe so, this must be a typo. I'll check it and remove it.
import java.nio.file.Paths | ||
import java.nio.file.StandardOpenOption | ||
|
||
class HtmlReporter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The project listener that locates the test data, and the class that generates HTML could be separated since they are different things. The former could invoke the latter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind that. What would we call these? HtmlReporter
and HtmlGenerator
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HtmlWriter maybe for the thing that does the html generator and HtmlReporter yeah for the listener class.
@sksamuel I've refactored this code a bit. I moved the logic to generate the HTML to a separate class called |
Thanks for the approve @sksamuel. Are you happy if I merge this? |
Yep.
…On Sun, 11 Apr 2021 at 14:21, Hugo Martins ***@***.***> wrote:
Thanks for the approve @sksamuel <https://github.com/sksamuel>. Are you
happy if I merge this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2130 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGVARDPUDAYUDXWEQ7LTIHZE3ANCNFSM4YKFTK4A>
.
|
I cannot do that, I'm sorry, because I don't seem to have permissions to merge PRs in Kotest's repository. |
Yes of course, I'm thinking I'm at work :) |
This PR has the aim of tackling #2011 and adds a listener named
HTMLReporter
which will produce HTML reports based on the XML generated by theJunitXmlReporter
. It has the following results:It currently generates some very basic HTML reports but they have the essential functionality of showing the test classes that have failed and the tests that have failed.
The tests still need some working on but I thought it would be important to open this PR early to get some early feedback because it is getting quite big, due mostly to the fact that I had to add an entire module containing the
HTMLReporter
.