public class AssertHelper extends Object
| Constructor and Description |
|---|
AssertHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertContains(String expected,
String actual)
assert actual contains expected
|
static void |
assertEquals(boolean expected,
boolean actual) |
static void |
assertEquals(int expected,
int actual) |
static void |
assertEquals(String expected,
String actual) |
static void |
assertFalse(String message) |
static void |
assertFalse(String message,
boolean value) |
static void |
assertTrue(String message,
boolean value)
assert true
|
static String |
getLogsAsString(String message)
added test steps with stack trace
useful for CI test results for quick view of the test steps with errors
|
static void |
logStackTrace(AssertionError e) |
static void |
logStackTrace(Exception e) |
static org.testng.asserts.SoftAssert |
softAssert() |
static void |
softAssertAll() |
static void |
softAssertEqual(int expected,
int actual) |
static void |
softAssertEqual(String expected,
String actual) |
static void |
softAssertTrue(String message,
boolean value) |
public static void assertTrue(String message, boolean value)
message - value - public static void assertFalse(String message)
public static void assertFalse(String message, boolean value)
public static void assertEquals(boolean expected,
boolean actual)
public static void assertEquals(int expected,
int actual)
public static void softAssertTrue(String message, boolean value)
public static void softAssertEqual(int expected,
int actual)
public static org.testng.asserts.SoftAssert softAssert()
public static void softAssertAll()
public static void assertContains(String expected, String actual)
actual - expected - public static void logStackTrace(AssertionError e)
public static void logStackTrace(Exception e)
Copyright © 2022. All rights reserved.