Assert test step
This test step compares the supplied values, failing the test if unsuccessful.
Drag the Assert test step from the Test Palette into your test case.
Then, update the parameters as follows and save the test case.
- Expected Value: The value that is expected
- Actual Value: The actual value
- Operator: See comparison type for the supported comparison types (EqualTo, LessThan, etc.)
- Failure Message: The message that should be logged if the comparison fails
- Case Sensitive: Whether the comparison should be case-sensitive or not. If false then abc = ABC will assert successfully
- Keep trailing zeros: Whether the comparison keeps trailing zeroes when comparing numbers. By default trailing zeroes are trimmed, e.g. 1.0 becomes 1
- Nulls are Greater: Whether unpopulated (or null) values should be treated as greater than non-null values. If true then ‘a < null’ will assert successfully
- Match Multi-line: The Multiline flag for Regular Expressions
- Match dot all: The DotAll flag for Regular Expressions
Examples:
Actual Value | Comparison | Expected Value | Relevant Checkbox | Result |
25 | Greater Than | 24 | True – Success | |
1 | Equals | 1.0 | Keep trailing zeros = false | True – Success |
Abcd | Contains | abc | True – Success | |
ABCD | Equals | Case Sensitive = false | True – Success | |
Abcd | Matches | bc | True – Success |
Documentation library
- General information
- Licensing Provar
- Provar trial guide and extensions
- Using Provar
- API testing
- Behavior-driven development
- Creating and importing projects
- Creating test cases
- Custom table mapping
- Functions
- Debugging tests
- Defining a namespace prefix on a connection
- Defining proxy settings
- Environment management
- Exporting test cases into a PDF
- Exporting test projects
- Managing test steps
- Namespace org testing
- Provar desktop
- Provar Test Builder
- Refresh and Recompile
- Reload Org Cache
- Reporting
- Running tests
- Searching Provar with find usages
- Secrets management and encryption
- Setup and teardown test cases
- Tags and Service Level Agreements (SLAs)
- Test cycles
- Test plans
- Testing browser options
- Tooltip testing
- Using the Test Palette
- Using custom APIs
- Callable tests
- Data-driven testing
- Page objects
- Block locator strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript locator support
- Label locator strategies
- Maintaining page objects
- Mapping non-Salesforce fields
- Page object operations
- ProvarX™
- Refresh and reselect field locators in Test Builder
- Using Java method annotations for custom objects
- Applications testing
- DevOps
- Introduction to test scheduling
- Apache Ant
- Configuration for sending emails via the Provar Command Line Interface (CLI)
- Continuous integration
- AutoRABIT
- Azure DevOps
- Running a Provar CI task in Azure DevOps
- Configuring the Provar secrets password in Microsoft Azure Pipelines
- Parallel execution in Microsoft Azure Pipelines using multiple build.xml files
- Parallel execution in Microsoft Azure Pipelines using targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- Circle CI
- Copado
- Docker
- Flosum
- Gearset
- GitHub Actions
- GitLab CI
- Jenkins
- Travis CI
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Team foundation server
- Version control
- Zephyr Cloud and Server
- Salesforce testing
- Adding a Salesforce connection
- Assert Page Error Messages on Add/Edit Product
- Dynamic Forms
- Internationalization support
- List and table testing
- Salesforce Release Updates
- Salesforce Lightning Testing
- Salesforce Lightning Web Component (LWC) locator support
- Salesforce console testing
- Visualforce Testing
- Testing best practices
- Troubleshooting
- Release notes
Trying to raise a case with Customer Success?
Other available resources
Looking for something different?
Keep your finger on the pulse with our latest blog posts
Do a Salesforce deep-dive with our webinars
Get inspired by the latest MVP & Trailblazer stories
Read the latest Provar company updates