Assertions (Hard Assert) are 'Critical Failures'βthe test stops immediately and marks as FAILED. Verifications (Soft Assert) are 'Non-Critical'βthe test logs the failure but continues to the next step and marks as FAILED at the end. Hard asserts are used for blocking issues, while soft asserts are used for non-blocking issues. Choosing the right type is crucial for test design.
Hard Assert: If the login fails, there's no point checking if the dashboard loads. Soft Assert: If the username is misspelled, we still want to check if the profile picture loaded correctly.
You are testing a checkout page. You want to check the 'User Name' is correct and that the 'Total Price' is correct. Which one should be a Hard Assert?