Automate test reporting using JUnit TestWatcher
Preconditions (2)
Step 1: Create a TestWatcher extension class that overrides testSuccessful, testFailed, and testDisabled methods
Step 2: In each overridden method, log the test method name and its result (success, failure, or disabled)
Step 3: Attach the TestWatcher extension to the sample test class using @ExtendWith annotation
Step 4: Run the test class
Step 5: Observe the console output for correct reporting of each test method's result
✅ Expected Result: The console shows messages indicating each test method's name and whether it passed, failed, or was skipped