JUnit

Using it with IDE

it is integrated with IDEs such as (eclipse, netbeans, intelij idea).

Use it with command line

IDEA

Example

import org.junit.Test; import static org.junit.Assert.assertEquals; public class TestSum { // annotte method with @Test @Test public void testSum(){ int n1 = 10 , n2 = 20 ; // use Assert to set Conditions to test, first value is expected, second is actual assertEquals(30 , n1+n2); // there are several methods, assertEquals, assertSame, assertNull. } }

Aggregate Tests into Suite

Exception Handling tests

Ignor tests

we may need to ignor some tests possible ways

Paramaterized tests