With visual assertions, mabl generates assertion criteria from your prompt to provide a consistent set of criteria to evaluate each time your test runs. Previously, the only way to update these criteria was to change the assertion description and regenerate them. Starting with Desktop App version 2.45.2, you have full control over your assertion criteria: edit, delete, or add criteria directly, without needing to change your prompt!
When might you want to edit assertion criteria? Here are a few such scenarios:
- Too specific - if a generated criterion is too specific about dynamic content, you can update it to something that doesn’t break in different instances.
- Redundant - if the criteria include something irrelevant to the test’s purpose, you can remove it to reduce flakiness
- Missing details - add in any other important aspects that are missing from the criteria
How it works
When you create or edit visual assertions, you can take the following actions to modify generated assertion criteria:
- Edit - click on a criterion to open an inline text field. Press [ENTER] to confirm your changes or [ESCAPE] to cancel.
- Delete - click the delete icon on a criterion that you want to remove.
- Add - click on Add below the existing criteria and describe what to check.
When you’re ready to validate your changes, click Test assertion to re-test with your current criteria. Testing does not regenerate the criteria. Instead, it evaluates the assertion using the criteria as they are, including any edits you’ve made.
To start fresh, select Regenerate criteria from the dropdown on the Test assertion button. Regenerating replaces all current criteria, including any manual edits, with new AI-generated criteria based on your prompt.
Learn more
To learn more about creating and configuring visual assertions, check out the following guides: