title: SoftAssert fails all my test methods after calling SoftAssertobj.assertAll() function
body: <p>I am automating a website and i'm using soft assert for failing my testcases. But now I am getting failure reports for all the testmethods which comes after a test method that failed in a particular scenario. Given below is the sample code</p>
  
  <pre><code>    //Function Call 
  
      commFunction.backnavigation(driver, props,"Item",ExcelResult_Field, className,"CustomerPricing");
  
  //Function Declaration
  
      public void backnavigation(WebDriver driver, Properties props,
              String MenuName, boolean TestStatus, String className,
              String MethodName) throws InterruptedException,
              EncryptedDocumentException, InvalidFormatException, IOException {
  
  
  
          Boolean bool_backButton = ValidationHelper.isElementPresent(driver,
                  By.xpath(LocatorModule(props, "BackNavigationButton")));
  
          if (bool_backButton.equals(true)) {
              ExecutionHelper.ElementTobeClicked_Xpath(driver,
                      By.xpath(LocatorModule(props, "BackNavigationButton")));
  
            ListClassView = ExecutionHelper
                      .waitForElementVisible(
                              driver,
                              By.xpath("//ul[@id='settings_menu']//li/a[text()='"
                                      + MenuName
                                      + "']/ancestor::li/following-sibling::li[1]/ul/li"));
  
              if (ListClassView.equals(true)) {
                   writeResulttoExcel(TestStatus, className,
                          MethodName);
                    if(TestStatus!=true)
                    {
                          // softAssert.assertEquals(false, true,"TEST STATUS Fail--assert fail"); 
                        softAssert.fail("TEST STATUS Fail--assert fail");
                    }
              }
  
              else {
                  Thread.sleep(3000);
                  driver.findElement(
                          By.xpath(".//*[@id='settings_menu']/li[@class='left width_fluid']/a[text()='"
                                  + MenuName + "']")).click();
                   writeResulttoExcel(false, className, MethodName);
                   //softAssert.assertEquals(false, true,"ListClassView FALSE--assert fail"); 
                     softAssert.fail("ListClassView FALSE--assert fail");
                   Thread.sleep(2000);
              }
  
              Thread.sleep(3000);
          }
  
          else {
              driver.navigate().back();
              Boolean ListClassView = ExecutionHelper
                      .waitForElementVisible(
                              driver,
                              By.xpath("//ul[@id='settings_menu']//li/a[text()='"
                                      + MenuName
                                      + "']/ancestor::li/following-sibling::li[1]/ul/li"));
              if (ListClassView.equals(true))
              {
                   writeResulttoExcel(false, className, MethodName);
                  // softAssert.assertEquals(false, true,"BACK BUTTON FALSE LIST VIEW AVAILABLE--assert fail");
  
                     softAssert.fail("BACK BUTTON FALSE LIST VIEW AVAILABLE--assert fail");
  
              }
  
              else {
                  Thread.sleep(3000);
                  driver.findElement(
                          By.xpath(".//*[@id='settings_menu']/li[@class='left width_fluid']/a[text()='"
                                  + MenuName + "']")).click();
                   writeResulttoExcel(false, className, MethodName);
              //   softAssert.assertEquals(false, true,"BACK BUTTON FALSE LIST VIEW NOT AVAILABLE--assert fail"); 
                   softAssert.fail("BACK BUTTON FALSE LIST VIEW NOT AVAILABLE--assert fail");
  
              }
  
              Thread.sleep(3000);
          }
         softAssert.assertAll();
      }
  </code></pre>
  
  <p>Here Method 1 should fail in my actual scenario and Method 2 should pass. But after calling softAssert.assertAll(); both Method 1 &amp; 2 is failing. Attaching the TestNG report for the scenario. The Tests After customer pricing should fail but report shows all the test method got failed.What change should be applied to resolve this.?</p>
  
  <p><a href="http://i.stack.imgur.com/y1SB0.png" rel="nofollow">TestNG Report Image File </a></p>