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 files.To perform this task, we go for Batch Run concept in Junit.

Below are the 3 Java files

Test1.java

Test2.java

Test3.java


Instead of executing Test1,Test2,Test3 Java classes individually. Junit has provided an option to execute all the Test1.java,Test2.java,Test3.java at one stretch.

Example on Batch Run Execution using Junit :

OUTPUT :

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 files.To perform this task, we go for Batch Run concept in Junit.

Below are the 3 Java files

Test1.java


Test2.java


Test3.Java


Instead of executing Test1,Test2,Test3 Java classes individually. Junit has provided an option to execute all the Test1.java,Test2.java,Test3.java at one stretch.

Example on Batch Run Execution using Junit :


OUTPUT :

Leave a Comment

Your email address will not be published. Required fields are marked *