Class SoftAssert

java.lang.Object
org.testng.asserts.Assertion
org.testng.asserts.SoftAssert
All Implemented Interfaces:
IAssertLifecycle

public class SoftAssert extends Assertion
When an assertion fails, don't throw an exception but record the failure. Calling assertAll() will cause an exception to be thrown if at least one assertion failed.
  • Constructor Details

    • SoftAssert

      public SoftAssert()
  • Method Details

    • doAssert

      protected void doAssert(IAssert<?> a)
      Overrides:
      doAssert in class Assertion
    • assertAll

      public void assertAll()
    • assertAll

      public void assertAll(String message)