Junit

TimeOut in Junit

We have a scenario where if our test case is taking more time to execute than that of the expected time then we can restrict using Junit to wait for specified amount of milliseconds and proceed further to rest of …

Read more

First Junit Test

We have a scenario where there are three individual unit tests needed to be executed in Java. So, we will be using Junit as unit testing framework to achieve this task. Lets see with an example Before using Junit : …

Read more

Batch Run in Junit

We have a scenario where we have 3 java files having Test scripts. Instead of executing the Java files individually. We can execute the 3 Java files at one go,meaning with single file we can execute all our 3 Java …

Read more

Assertions in Junit

Junit has an in-built class called Assert, which contains a set of assertion methods used for writing tests to identify the failures. Let’s explore the Assert statements of Junit assertEquals(String1,String2) This method is used to compare two strings to check …

Read more