Karma vs Chutzpah

笑着哭i 提交于 2020-01-12 14:17:35

问题


I have been trying to figure out what is the best way to write/run automated jasmine tests in visual studio. Currently, I am using jasmine with Resharper (using PhantomJS) and the test can be run from visual studio. Now I want to run the tests as part of continuous integration and very are using TFS. Searching online give me few options which made me rather confused.

1) Use Chutzpah as a test runner to execute jasmine tests.

2) Use Karma as a test runner (but it also requires Chutzpah test adaptor for visual studio).

I get the feeling that using Karma is somewhat better than anything else but I couldn't understand the benefits of Karma instead of just using Chutzpah. Can anyone please clarify what should be the usage?


回答1:


DISCLAIMER: I am the author of Chutzpah so take anything I say with a pinch of bias.

Both Karma and Chutzpah are both good tools to be able to run JavaScript unit tests. Karma is the more active open source project and has a large group of people contributing to it. It is very configurable and lets you (as Sean says) target browser besides Phantom. There are VS plugins for it as well but I have not used them much.

Chutzpah is a mature product that is also very configurable. It will always run your tests in PhantomJS but does let you open them in a new browser in order to debug. Chutzpah VS integration is mature and seamless.




回答2:


The biggest benefit of Karma over Chutzpah is it can be configured to use Chrome (or any other browser) to be the test runner which makes tests a lot easier to debug with browser developer tools.



来源:https://stackoverflow.com/questions/30868041/karma-vs-chutzpah

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!