与jUnit相比,TestNG的缺点? [英] Drawbacks of TestNG compared to jUnit?

查看:336
本文介绍了与jUnit相比,TestNG的缺点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我熟悉jUnit,听说TestNG可以解决jUnit的某些烦恼-例如坚持要为每个测试创建测试类的单独实例,从而迫使我对要在测试之间重用的对象使用静态字段.

I'm familiar with jUnit, and heard TestNG might be a solution to some of jUnit's annoyences - e.g. its insistence to create a separate instance of the test class per test, thus forcing me to use static field for objects I want to reuse between tests.

(假设您同意我的观点,这是一个缺点,请不要将这个问题变成并非如此)

(Let's say you agree with me that this is a drawback, and not turn this question to something it's not)

我要问的是,与jUnit相比,TestNG有哪些缺点?假设这是一个新项目并且没有任何迁移成本,为什么不使用TestNG?

What I'm asking here, is what drawbacks does TestNG have, compared to jUnit? Why not use TestNG, assuming this is a new project and there isn't any migration cost?

推荐答案

我是TestNG的创建者.由于我明显有偏见,所以我不愿发言,但我很乐意回答您对TestNG可能有的任何疑问.

I'm the creator of TestNG. I'm not going to weigh in since I'm obviously biased, but I'm happy to answer any question you might have about TestNG.

安迪:感谢您的评论.仅供参考(您可能已经知道,但也许原始海报不知道),有一个TestNG Eclipse插件(我与TestNG并行开发).

Andy: thanks for your comment. FYI (you probably already know that but maybe the original poster doesn't), there is a TestNG Eclipse plug-in (which I develop in parallel to TestNG).

这篇关于与jUnit相比,TestNG的缺点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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