Skip to content
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

Implement reporter interface #405

Closed
jzaefferer opened this issue Jan 31, 2013 · 13 comments
Closed

Implement reporter interface #405

jzaefferer opened this issue Jan 31, 2013 · 13 comments
Labels
Category: API Status: Ready A "Meta" issue that has reached consensus. Type: Enhancement
Milestone

Comments

@jzaefferer
Copy link
Member

We have JUnit, which can be improved a lot. Is there a difference to XUnit?

There's a plugin for TAP output ( https://github.com/twada/qunit-tap ), which we should at least link to, though maybe that could become an official add-on.

@JamesMGreene
Copy link
Member

I'd love to see a generic hook for "reporters" so that people can more easily write their own as well.

As for differences between JUnit and XUnit, @gboissinot explained a little bit in #393.

@twada
Copy link

twada commented Feb 3, 2013

👍

@JamesMGreene
Copy link
Member

@Krinkle Any thoughts on a "reporters" hook or config? If none are specified before QUnit.load then we could default to a theoretical "qunit-reporter-html" reporter which would basically do what QUnit core does today.

@jzaefferer
Copy link
Member Author

@JamesMGreene how would that hook be different from the callbacks we have right now?

@JamesMGreene
Copy link
Member

@jzaefferer Main difference is being able to essentially disable the default HTML reporter in favor of some othere reporter, thus reducing the work being done (and making it easier to integrate in Node.js). Does such an option already exist and I'm just unaware of It?

@jzaefferer
Copy link
Member Author

You can disable the HTML reporter by not including the <div id="qunit"> element.

@JamesMGreene
Copy link
Member

Sure, I suppose that makes total sense but it didn't dawn on me. Either way, I would like to isolate/modularize the "qunit-reporter-html" aspect of QUnit core when we tackle #378.

@ghost ghost assigned Krinkle May 7, 2013
@Krinkle
Copy link
Member

Krinkle commented May 7, 2013

Making this dependant on #422. The reporter interface would be an abstraction around several event listeners.

We can then port the current html generation to be the default reporter.

@JamesMGreene
Copy link
Member

@Krinkle: Makes sense. Should we still add a method like addReporter/reporters.add to hook them in, or just allow them to be standalone (loosely coupled)? Thinking we need the former in order to have enough knowledge as to whether to make the HTML reporter the default (or not).

@Krinkle
Copy link
Member

Krinkle commented May 7, 2013

@JamesMGreene Yes, I intend to create such method.

@Krinkle
Copy link
Member

Krinkle commented Sep 30, 2013

Plan for #351, #405 and #472:

We can also consider having a linear model as well (either in addition or instead of the data model). The difference would be that that one would only contain assertions and the logical structure would be repeated in each object (e.g. which grouping it is part of).

The linear model could then be used to e.g. extract or provide a list of failed assertions only.

@leobalter
Copy link
Member

This is solved by #890 (before QUnit 2) and js-reporters (after QUnit 2)

@leobalter
Copy link
Member

We finally have this! \o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: API Status: Ready A "Meta" issue that has reached consensus. Type: Enhancement
Development

No branches or pull requests

5 participants