Skip to content Skip to navigation
Check Our New Demo Website!
Home >> Taxonomy >> Term >> JUnit

JUnit

How to create Test Suite in JUnit

What is Test Suite?

A Test Suite is a grouping unit test cases together and running it. In JUnit, both @RunWith and @Suite annotations are used to run the suite test.

We will show you how to create and run a Suite. We will create two test classes TestOne and TestTwo.

First create a program with class "TestOne" as below:

import org.junit.Test;
public class TestOne {
	@Test
	public void testcaseOne(){
		System.out.println("Hello im in test case one");
	}
}

Now Create another program with class "TestTwo" as below:

Tags: 

JUnit Introduction with Example

JUnit is a unit testing framework for the Java programming language and it became important in the development of test-driven development. Annotations - Given by Apache Foundation.

JUnit promotes the idea of testing for developers which emphasis on setting up the test data for a piece of code which can be tested first and can be implemented.

Features of JUnit

Tags: 
Subscribe to RSS - JUnit