JUnit — Annotations
2 min readAug 20, 2023
- @BeforeClass:- The first annotation is @BeforeClass. So, Now, this annotation is used to initialize any object that you are going to use in your test case or your running testes. @BeforeClass annotation specifies that method will be executed only once, before starting all the tests.
- @Before annotation specifies that method will be executed before each test.
- @Test annotation specifies that method is the test method.
- @After annotation will be executed every time after each test case. So, whatever you have initialized in @Before that should be…