建议在 Windows 上使用 Node JS 的 BDD 测试框架

发布于 2024-12-25 06:45:41 字数 258 浏览 0 评论 0原文

我的团队正在开发具有丰富 HTML5 客户端和 RESTfull 服务器的 Web 应用程序。尽管我们的服务器端代码是典型的 Java 堆栈,但我们在构建过程中使用 Node JS。特别是 CoffeeScript 编译、jsHint 和脚本缩小。

我想为客户端代码引入自动化测试,并且我需要选择一个 BDD 框架。需要注意的是,我们的应用程序部署在 Windows 上,我们也使用它进行开发。所以我担心特定的 BDD 框架是否能与 Windows 版本的 Node JS 很好地配合。

My team is working on web application with rich HTML5 client and RESTfull server. Although our server-side code is a typical Java stack we use Node JS in our build process. Notably for CoffeeScript compilation, jsHint, and script minification.

I'd like to introduce automated testing for the client-side code and i need to pick a BDD framework. One note is that our application is deployed on Windows and we use it for development as well. So I'm worried whether a particular BDD framework would play along nicely with Windows version of Node JS.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

墨落画卷 2025-01-01 06:45:41

不能说它的窗口兼容性,但是有两个 BDD 框架可以在 jenkins 中用于自动测试: Jasmine trough the Jasmine maven 插件BusterJs

Can't say something about its window compatibility, but there are two BDD frameworks that you can use with automatic testing in jenkins: Jasmine trough the Jasmine maven plugin and BusterJs

御弟哥哥 2025-01-01 06:45:41

如果您有兴趣测试客户端代码(就像在浏览器中一样),请查看 ZombieJS。另外 Mocha 是一个很好的测试框架,所以你可能想将它们两者混合在一起。

If you are interested in testing client side code, as it is in the browser, take a look at ZombieJS. Also Mocha is a good testing framework, so you may want to mix the two of them together.

演多会厌 2025-01-01 06:45:41

Yadda 也值得一试。它可以让您编写真正的 BDD 测试,如下所示。

Scenario: A bottle falls from the wall

Given 100 green bottles are standing on the wall
when 1 green bottle accidentally falls
then there are 99 green bottles standing on the wall

它可以插入其他框架,如 Mocha、CasperJS 和 Zombie。

Yadda is also worth checking out. It lets you write true BDD tests as follows

Scenario: A bottle falls from the wall

Given 100 green bottles are standing on the wall
when 1 green bottle accidentally falls
then there are 99 green bottles standing on the wall

It plugs into other frameworks like Mocha, CasperJS and Zombie.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文