Node.js 编程工作流程 - 测试、代码、测试 [英] Node.js programming workflow - Tests, Code, Tests

查看:16
本文介绍了Node.js 编程工作流程 - 测试、代码、测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开始使用 Node.js 开发有用的东西之前,您的流程是什么?您是否在 VowJS、Expresso 上创建测试?你使用 Selenium 测试吗?什么时候?

Before you start developing something useful in Node.js, what's your process? Do you create tests on VowJS, Expresso? Do you use Selenium tests? When?

我有兴趣获得一个很好的工作流程来开发我所有类似于 Rails(Cucumber、Rspec、代码)的 node.js 应用程序.

I'm interested in gaining a nice workflow to develop all my node.js applications similar to Rails (Cucumber, Rspec, Code).

抱歉,问题太多了.

让我知道你的效果如何.

Let me know how it works out with you.

推荐答案

我的测试方法不像 Java/Junit 那样过时,我应该在这方面做更多的工作(改进).我真的应该多练习一下 TDD.

My testing methodology isn't up the snuff as in for example Java/Junit and I should really work more on this(improve). I should really practice TDD more.

我在 expresso 上玩了一点,并且喜欢您可以生成代码覆盖率报告这一事实.我认为缺少的是 @before @beforeclass @after 之类的东西,您可以在 java 中找到.

I played a little bit with expresso and liked to the fact that you could generate code coverage reports. What I thought was missing was something like @before @beforeclass @after which you can find in java.

我还玩了一些 nodeunit,它确实具有设置/拆卸功能.我还是喜欢多玩一点这个框架.

I also played a bit with nodeunit which does have setup/teardown. I still like to play a little bit more with this framework.

我不喜欢 vowjs 语法,但它是非常流行的 BDD 框架,所以也许我应该(更多)使用它来像许多其他用户一样出售.但现在我要解雇 vowjs.

I don't like the vowjs syntax, but it is very popular BDD framework, so maybe I should use it (more) to get sold like a lot of other users. But for now I am going to dismiss vowjs.

我还玩了一点zombie.js,这也很酷.我最近还看到了另一个很酷的测试框架,我不记得它的名字了,但幸运的是在 node.js 中有足够的选项来进行测试.

I also played with zombie.js a litle bit which is also pretty cool. I also lately saw another cool testing framework which I can't remember the name, but there are luckily enough options to do testing in node.js.

我唯一不喜欢的是与 IDE 的集成在我看来还不够.我为 Java 开发的 IDE 无法与我为 node.js 找到的 IDE 相提并论,但我认为只要稍加努力,我就可以打造一个更有用的编程环境.我会尽量让你们了解这一进展.

The only thing I don't like is that the integration with IDE is not up to snuff in my opinion. The IDE I had for Java cannot be compared with what I have found for node.js, but I think with a little bit effort I can make a more useful programming environment. I will try and keep you guys informed about this progress.

P.S: 但我最喜欢的是 npm 包管理器.当您将它与例如 maven 进行比较时,您只会说哇.我仍然有一些小错误,因为它仍然是一个年轻的项目.但在我看来,npm 还是很不错的!

P.S: But what I do like a lot is the npm package manager. When you compare it to for example maven you just say wow. I still has some minor bugs because it is still a young project. But still npm is very good in my opinion!

这篇关于Node.js 编程工作流程 - 测试、代码、测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆