C
C
CyMpak2011-03-16 14:34:06
Software testing
CyMpak, 2011-03-16 14:34:06

JUnit vs TestNG?

I would like to hear the opinion of habrausers on this topic. What is better now and why?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
J
javenue, 2011-03-16
@javenue

TestNG was made based on JUnit. Even the annotations are similar there. All the advantages that are described on the TestNG website, it seems to me, are not advantages, since the vast majority of them are supported at the IDE level (for example, running multiple classes) or language (for example, synchronization). Maybe logging is an advantage.
And the moks are neither there nor there.
Still more use JUnit though. So I would recommend looking in that direction.

D
dkurilenko, 2011-03-16
@dkurilenko

I'm not sure if there is such functionality in JUNIT4, but in TestNG we use test dependencies and parallel execution.

G
googol, 2011-03-16
@googol

JUnit is more "standard" or something. I recommend starting with it, and only if something is really missing, switch to TestNG.

U
uthark, 2011-03-16
@uthark

I am using JUnit 3/4 in already existing projects. In the new ones - TestNG.
In terms of functionality at the moment, they provide approximately the same opportunities.
There is a fairly detailed comparison of both at www.mkyong.com/unittest/junit-4-vs-testng-comparison/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question