tolbertam / mocha-appveyor-reporter

Mocha reporter for AppVeyor CI Integration
Other
13 stars 5 forks source link

Upload each test individually on completion, capture console output. #5

Closed tolbertam closed 8 years ago

tolbertam commented 8 years ago

Like @gerich-home reported in #4 (sorry, didn't see your pull request until this morning!), I wanted to remove the dependency of --no-exit for reporting to work. I solved the issue in the same way by using deasync to block until the report had been completed, but I've also made a change to report tests as they complete. Of course this creates many more API calls, but the appveyor API seems to handle this no problem (and I suspect they wouldn't have this API if they were worried about it). I added an implicit timeout of 5 seconds where upon the next test will proceed if appveyor has not responded, it usually responds in 1-10ms it seems.

I also thought it would be nice if the reporter could capture console output like mocha-jenkins-reporter so I added support for that. It will capture all console.log calls to stdout and console.error/console.warn calls to stderr.

I also made quite a few style changes (mostly just adding semicolons), I hope that is ok and I can revert that if you like so the changes only include functionality.

Example AppVeyor builds using this plugin:

tolbertam commented 8 years ago

Encountered a small bug that i've since resolved in c96ffb0 while running a test that creates unexpected behaviors / messed with domains. Have fixed that by checking that the apply function is in tact before applying the log message.

nathanboktae commented 8 years ago

Cool thanks I'll look at this more today.

nathanboktae commented 8 years ago

@tolbertam are you interested ijln owning this project? I've been Windows free for several months.

BTW it needs to be bumped to 0.2.0 at least there are some big functionality changes herr

tolbertam commented 8 years ago

@nathanboktae, sure I would definitely be interested in maintaining the project.

I'm currently evaluating appveyor, but it is very likely I will be using it going forward since it has worked pretty well for me thus far.

I'll go ahead and bump the version and will also address your comments.

gerich-home commented 8 years ago

Great! Funny that we have chosen almost the same approach :)

I vote for a merge of the pull request (please do not forget publishing the package in npm)

gerich-home commented 8 years ago

Hi, I have checked today the recent changes. And I see that my problem was fixed. Now all tests are displayed correctly in app veyor build: https://ci.appveyor.com/project/gerich-home/it-depends/branch/master/tests

tolbertam commented 8 years ago

@gerich-home, that is great news! Thanks for following up and glad to hear that it is working for you :+1: