4

From what I understand, there are two major packages that help in testing a package - TinyTest, and Velocity, which became the official Meteor testing framework.

From the Meteor's DevShop in June, the Velocity team said that Velocity can run alongside TinyTest, but I do not understand the difference in the features these two packages provides, is one (TinyTest) redundant?

Is TinyTest only meant for unit testing? If I want integration testing, functional testing, would I need to turn to Velocity and its supported frameworks? Or something else completely different? There is a comparison table, but it is a bit dated.

4

2 回答 2

5

TinyTest 是目前唯一允许您测试包的解决方案,这也是它仍然在地图上的原因之一。另一个原因是 TinyTest 是 Velocity 之前的官方测试解决方案,因此它仍然有追随者。

目前只有Jasmine支持单元测试(服务器和客户端) 。Jasmine 和Mocha-web支持集成测试(服务器和客户端)。Xolv.io Cucumber以及CasperNightwatch支持端到端测试。您还可以将Xolv.io webdriver添加到 mocha/jasmine,事实上您甚至可以根据需要将 webdriver 添加到 TinyTest!

您可能会发现我写的这篇博文很有用,它讨论了 Meteor 的不同测试模式,底部还有一个比较表。

你可能还会发现我写的关于 Velocity 的这一章很有用。

于 2015-01-12T03:53:14.293 回答
1

您可以使用 Velocity+ Jasmine测试包。

去看看这里的例子,并使用这个命令来运行测试。

VELOCITY_TEST_PACKAGES=1 meteor test-packages --driver-package velocity:html-reporter package-to-test

于 2015-06-24T06:44:46.463 回答