This repository has been archived by the owner. It is now read-only.

Buster.log only output in case of faulty tests #163

Closed
megoth opened this Issue Apr 24, 2012 · 8 comments

Comments

Projects
None yet
3 participants
@megoth

megoth commented Apr 24, 2012

Would be nice if it was possible to make buster.log output only in case of faulty tests (i.e. tests that have faulty assessments).

Maybe implement some sort of opt-in/opt-out feature? E.g. buster.log output all the time by default, but you could make it output only in faulty tests by setting a property in buster.js.

@augustl

This comment has been minimized.

Member

augustl commented Apr 24, 2012

In the unforseeable future, we will add support for only running the tests that failed in the previous test run. This would solve the problem of getting log output for non-failing tests, as only the failing tests will run. In other words, adding this feature request would be a temporary solution.

At the same time, it would also be a very useful feature, and it might be a long time until we add the aforementioned feature. So I say +1!

@cjohansen

This comment has been minimized.

Member

cjohansen commented Apr 24, 2012

I've been thinking about this for a while. The default needs to be to only log for failing tests, as the current situation is very rarely useful.

@cjohansen

This comment has been minimized.

Member

cjohansen commented Apr 25, 2012

Fixed in 0.5.1

@cjohansen cjohansen closed this Apr 25, 2012

@augustl

This comment has been minimized.

Member

augustl commented Apr 27, 2012

I actually find this feature kind of annoying at times.. I'm trying to debug some behaviour by logging an object directly in the test case, and I spent at least one minute pulling out hair before I remembered that we only show the log output for failing tests.

I think the filtering should only apply to buster.log, not console.log. Feels kind of broken for buster to override console.log like this.

@cjohansen

This comment has been minimized.

Member

cjohansen commented Apr 28, 2012

That makes a lot of sense. I agree.

@cjohansen

This comment has been minimized.

Member

cjohansen commented Apr 28, 2012

...but I disagree that it's broken that buster overrides console this way. If we didn't, you wouldn't see any of those messages, cause they would be in the browser... :)

@cjohansen cjohansen reopened this Apr 28, 2012

@augustl

This comment has been minimized.

Member

augustl commented Apr 28, 2012

I guess it makes sense for buster to overload console with a special version of buster.log that isn't hidden from reporters if the test passes. Then buster.log is only visible for tests that pass.

@cjohansen

This comment has been minimized.

Member

cjohansen commented Jun 6, 2012

Solution for now is to print all messages by default, then hide messages for passing tests if you do buster test -q. Good enough for now.

@cjohansen cjohansen closed this Jun 6, 2012

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.