JUnit Using Assertions and Annotations Example
In this example we are going to create test cases so as to understand the use of assertions and annotations in JUnit testing framework. Also, we will see how to run these test cases from the command...
View ArticleJUnit Suite Test Example
In this example we are going to explain how to use a test suite in JUnit testing framework. Test suite is a collection of some test cases from different classes that can be run all together using...
View ArticleJUnit Ignore Test Example
In this example we are going to see how to use @Ignore annotation in JUnit testing framework. Also, we will see how to run the created test cases from the command line by using the...
View ArticleJUnit Time Test Example
In this example we are going to see how to use @Test annotation along with its optional parameter timeout in JUnit testing framework. Also, we will see how to run our test case from the command line by...
View ArticleJUnit Exceptions Test Example
In this example we are going to see how to use @Test annotation along with its optional parameter expected in JUnit testing framework. Also, we will see how to run our test case from the command line...
View ArticleJUnit Parameterized Test Example
In this example we are going to see how to create a parameterized test in JUnit testing framework. 1. Create the java class to be tested Create a folder named JUnitParameterized. This is the folder...
View ArticleJUnit Annotations Example
JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks which is...
View ArticleJUnit Assertions Example
JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks which is...
View ArticleJUnit RunWith Example
In this example we are going to explain how to run simultaneously more than one test cases using JUnit testing framework and Eclipse IDE. This collection of different test cases that will be executed...
View ArticleJUnit @Before and @BeforeClass Example
In this example we are going to explain the difference between the @Before and @BeforeClass annotations of JUnit testing framework, using Eclipse IDE. 1. Create JUnit test In this section, we will...
View Article