FR: Growl Support #119

Closed
semperos opened this Issue Dec 11, 2012 · 12 comments

Projects

None yet

4 participants

@semperos

While the tabbed terminal interface is quite nice, I don't always have enough screen real estate to keep browser(s), editor, and Testem runner visible. It would be great to have (optional) support for Growl-like notifications on test success/failure.

For Growl specifically, there's winston-growl which extends the logging library you're already using. I'm not familiar with options for other platforms, but this is a start.

@airportyh
Collaborator

That would be nice to have.

@semperos

I hacked on my local copy of testem's lib/api.js file and was able simply to use winstonGrowl = require('winston-growl'); and then log.add(winstonGrowl) for a bare-bones Winston configuration that includes Growl support.

I noticed that the log messages included things like attaching to/detaching from PhantomJS, but I didn't see log statements at the default level regarding test success/failure.

@airportyh
Collaborator

Yeah, the log messages that are being ... logged, are mostly for debugging purposes. So, we would want finer control. Maybe just use the growl lib directly instead of going through winstonGrowl.

@semperos

Understood. I'll take it however we can get it :)

The work in lib/api.js looks promising; looking forward to having more programmatic access to Testem's workflow as development there continues. If I could hook into a "test execution" phase in a Testem workflow programmatically, I could do whatever I want on test success/failure without having to propose edits to Testem core itself.

@semperos

Of course, I guess that's what custom adapters are for.

@airportyh
Collaborator

I am excited about api.js too! I actually have a little bit of an aversion to plugin ecosystems, and the opposite of plugins is to let you include it as a lib. See what I did? I just inverted Inversion of Control.

@airportyh
Collaborator

Although, I would also be open to changing the log level of all existing log messages to .debug() and only use .log() for growl notifications.

@semperos

I definitely agree on the lib vs. plugin debate; thanks for not pursuing the goal of being a framework.

@oldfartdeveloper

+1 for both Growl support and the lib vs. plugin debate

@airportyh
Collaborator

Please test this out!

@airportyh airportyh closed this Jan 31, 2013
@bytasv
bytasv commented Feb 18, 2013

Just tried this out, at first with no success. I had to figure it out that I needed to do "gem install terminal-notifier" before I can see anything, maybe you should mention it in documentation.

@airportyh
Collaborator

@bytasv done! Thanks.

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