karma-runner / grunt-karma

Grunt plugin for Karma.
MIT License
468 stars 116 forks source link

Make process exit on test failure configurable #108

Closed gantaa closed 9 years ago

gantaa commented 10 years ago

We run multiple grunt-karma executions that test large data sets. If one fails, we do not wish to halt the execution of the rest, therefore, we have made this configurable.

aymericbeaumet commented 10 years ago

Hello @gantaa, thanks for the contribution.

Nevertheless, there was already someone working on this subject in this PR (https://github.com/karma-runner/grunt-karma/pull/106) so it bothers me.

Can you add some documentation on this option here?

Also see my code comments, it's important to fix them as we try to keep a consistant code style between all the Karma plugins.

Moreover, could you please follow the commit conventions and squash your commits into a single one when you are done?

gantaa commented 10 years ago

I see your concerns between this change and the other PR that you've mentioned. We are currently pointing one of our projects at this my Github branch until a solution gets merged. My solution is backwards compatible and configurable. I've made the requested changes code style changes and squashed all commits. If you decide not to merge this in favor of PR #106, we can try using that to solve our problems in the future.

reebalazs commented 10 years ago

Hi! For what's worth, I am using this branch and works fine for the moment. However it would be inevitable to have this feature landed in master soon (be it this PR or the alternate one). Simply put: there must be a way to allow grunt to move on if some test fails, as some people need to execute more karma tasks after each other, but current master makes this impossible.

In this context, if a test fails it does not mean that the task itself failed: it did its job correctly and we can check the generated xml reports to process the failures later.

gantaa commented 10 years ago

Thanks @reebalazs. Just waiting for approval of this merge.

mgol commented 10 years ago

I'll reiterate my question from #106: I use grunt-karma 0.8.3 and karma 0.12.16 and when I have an error in tests, it does exit the Grunt process. When exactly doesn't it currently do that?

gantaa commented 10 years ago

This change is for scenarios where we do NOT want the grunt process to exit on error. (ex: when running multiple grunt executions in sequence). With this change, the normal behavior of exiting the grunt process is the default behavior still, but we allow configuration to allow for things not to exit when failures occur.

mgol commented 10 years ago

@gantaa OK, I misread the default looking at the README example. In PR #106, however, someone claimed that's not the default which puzzled me.

dignifiedquire commented 10 years ago

Okay, so from my understanding this PR is the way to go, rather than #106.

@gantaa Can you please update the commit message to follow http://karma-runner.github.io/0.12/dev/git-commit-msg.html

dignifiedquire commented 9 years ago

Thanks a lot, and sorry for the delays :/

davidparsson commented 9 years ago

Has this feature been lost somewhere? It seems to be merged into karma-runner:master and not grunt-karma:master, which seems strange to me, and I'm unable to find any traces of the changes in the source tree or the commit log.

dignifiedquire commented 9 years ago

@davidparsson you are right something strange happend, not sure what yet though. I'll take a look later.

wcainboundary commented 9 years ago

Is there any chance this change could get revived? I still don't see it in master as mentioned above.

silverfangs commented 7 years ago

In case, there is anyone need to use this feature, I have create a temporarily package for this via npm by $ npm i grunt-karma-serial. This package will be remove until this issue is fix in the master branch. Cheers!