Verification
Validation and assertion capabilities in Spur
Verify actions allow you to validate the state and content of your application, ensuring that elements are present, content is correct, and states are as expected.
Type Verify
Begin by typing Verify
to author a verify action.
Write Your Assertion
Note what element/state you want to check.
Execute Code and View Results
After executing your verify action, you can view the result of your assertion.
Basic Usage
Common Testing Flows
Best Practices
-
Be Specific: Use clear, specific selectors and expected values
-
Timing: Add appropriate waits before verifications when needed
-
Error Messages: Include meaningful error messages for failures
-
State Management: Verify important state changes after actions
-
Multiple Conditions: Combine verifications when needed
example of combined verifications
- Dynamic Content: Use flexible matching when appropriate
example of flexible matching
- Complex Validation: Use JavaScript for advanced verification
example of javascript for verification
Troubleshooting
When a verification fails, Spur provides:
-
Detailed error messages
-
Screenshots of the failure state
-
DOM state at time of failure
-
Console logs and network requests
This information helps quickly identify and fix issues in your tests.