title: Junit 5 (Jupiter) status of Test
body: <p>hello every one i'm using Junit 5 Jupiter and i want to know after each test if it succeeded or fails and use the   @AfterEach methods by each test result like if succeeded i will do something but if i fail i will do something else 
  can u help me out .. 
  seems that @rule work for Junit 4 not for Jupiter </p>
  
  <pre><code>package Example;
  
  import static org.junit.Assert.*;
  import static org.junit.jupiter.api.Assertions.assertEquals;
  
  import org.junit.After;
  import org.junit.AfterClass;
  import org.junit.Before;
  import org.junit.BeforeClass;
  import org.junit.Rule;
  import org.junit.Test;
  import org.junit.platform.runner.JUnitPlatform;
  import org.junit.platform.suite.api.SelectPackages;
  import org.junit.rules.TestRule;
  import org.junit.rules.TestWatcher;
  import org.junit.runner.Description;
  import org.junit.runner.RunWith;
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.chrome.ChromeDriver;
  
  
  
  public class SSJunit5 {
      static WebDriver driver;
      @BeforeAll
      public static void setUpBeforeClass() throws Exception {
          System.setProperty("webdriver.chrome.driver", "C:\\Users\\david\\Desktop\\Documents\\Chrome Driver\\chromedriver.exe");
          driver = new ChromeDriver();
          driver.manage().window().maximize();
      }
  
      @AfterAll
      public static void tearDownAfterClass() throws Exception {
          driver.quit();
      }
  
      @BeforeEach
      public void setUp() throws Exception {
      }
  
      @AfterEach
      public void tearDown() throws Exception {
      }
  
      @Rule
      public TestRule watcher = new TestWatcher() {
          @Override
          protected void succeeded(Description description) {
              System.out.println("Pass!");
          }
  
          @Override
          protected void failed(Throwable e, Description description) {
              ScreenShots.ScreenShot(driver, "SSafterSendKeys");
              System.out.println("Fail!");
          }
      };
      @Test
      public void test() {
          driver.get("https://www.google.com");
          //ScreenShots.ScreenShot(driver, "webPageON");
          driver.findElement(By.id("lsta-ib")).sendKeys("hello");
          String expected = "asd";
          String actual = "qwert";
          assertEquals(expected, actual);
      }
  
  }
  </code></pre>