Created
December 29, 2021 11:30
-
-
Save muditlambda/10267d693934be74de3907c6eb37e1fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ParallelTestsInJUnit; | |
import org.junit.jupiter.api.*; | |
public class DemoTest1 { | |
@BeforeAll | |
public static void start() { | |
System.out.println("=======Starting junit 5 tests========"); | |
} | |
@Test | |
@DisplayName("Login_Test") | |
void DemoTest1_A() { | |
System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()+" => executed successfully"); | |
} | |
@Test | |
@DisplayName("Product_Test") | |
void DemoTest1_B() { | |
System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()+" => executed successfully"); | |
} | |
@Test | |
@DisplayName("Home_Test") | |
void DemoTest1_C() { | |
System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()+" => executed successfully"); | |
} | |
@AfterAll | |
public static void end() { | |
System.out.println("All the tests are executed successfully"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment