Test Assertions

Example Code:

//HOOKS (Header) import org.testng.Assert; //Verify Title driver.get(https://www.amazon.com); String ActualTitle = driver.getTitle(); String ExpectedTitle = “Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more”; Assert.assertEquals(ActualTitle, ExpectedTitle);

For more information and options please visit this page: https://testng.org/doc/documentation-main.html#test-results

 

You can use TestNG assertion. https://testng.org/doc/documentation-main.html#test-results

For more information about Rest Assured Assertions, please visit this page: https://github.com/rest-assured/rest-assured/wiki/Usage#verifying-response-data

Assert.JS and Should.JS are available for assertion.

https://nodejs.org/api/assert.html

https://shouldjs.github.io/

 

For more information and options please visit this page: https://cucumber.io/docs/cucumber/checking-assertions/#javascript