本文介绍了Karma vs Chutzpah的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图弄清楚在visual studio中编写/运行自动茉莉花测试的最佳方法是什么。目前,我正在使用茉莉花与Resharper(使用PhantomJS),测试可以从visual studio运行。现在我想将测试作为持续集成的一部分运行,并且正在使用TFS。在线搜索给我几个选项让我相当困惑。

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)使用Chutzpah作为测试运行器来执行茉莉花测试。

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

2)使用Karma作为测试运行器(但它也需要Chutzpah测试适配器用于visual studio)。

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

我觉得使用Karma比其他任何东西都要好,但我无法理解Karma的好处,而不仅仅是使用Chutzpah。任何人都可以澄清应该使用什么?

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?

推荐答案

免责声明:我是Chutzpah的作者所以我会说一些偏见。

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

Karma和Chutzpah都是能够运行JavaScript单元测试的好工具。 Karma是一个更活跃的开源项目,有很多人为此做出贡献。它是非常可配置的,让你(如肖恩所说)除Phantom之外的目标浏览器。还有VS插件,但我没有太多使用它们。

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是一个成熟的产品,也是非常可配置的。它将始终在PhantomJS中运行您的测试,但允许您在新的浏览器中打开它们以进行调试。 Chutzpah VS集成是成熟且无缝的。

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.

这篇关于Karma vs Chutzpah的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 11:55