Validating JSON Messages

JsonPath Assertions

JSON messages received by TestSteps can be asserted directly through the JSON structure. Much like with Json, you can do matches (Match, RegEx Match) and JsonPath validation (Count, Existence).

JsonPath Count

JsonPath Count uses a JsonPath expression to count the occurrences of an element. Applicable to any property containing JSON.

Configuration

JsonPath Count

Option Description Comment
Json Expression    
Node Pick node from the structure Pro Feature
Namespace Declare namespace from request structure Pro Feature
Field Json expression to use in the match  
Expected Result    
Select from Current Pick element from structure Pro Feature
Test Evaluate match expression  
Field Expression to match May contain Property Expansions
Checkboxes    
Allow Wildcards Treat * as wildcard in match  

JsonPath Existence Match

JsonPath Existence Match uses a JsonPath expression to select content from the target property and compares the result to an expected value. Applicable to any property containing JSON.

Configuration

JsonPath Existence Match

Option Description Comment
Json Expression    
Node Pick node from the structure Pro Feature
Namespace Declare namespace from request structure Pro Feature
Field Json expression to use in the match  
Expected Result    
Select from Current Pick element from structure  
Test Evaluate match expression  
Field Expression to match May contain Property Expansions
Checkboxes    
Allow Wildcards Treat * as wildcard in match  

JsonPath Match

JsonPath Match uses a JsonPath expression to select content from the target property and compares the result to an expected value. If the values match the assertion passes, otherwise it fails. Applicable to any property containing JSON.

Configuration

JsonPath Match

Option Description Comment
Json Expression    
Node Pick node from the structure Pro Feature
Namespace Declare namespace from request structure Pro Feature
Field Json expression to use in the match  
Expected Result    
Select from Current Pick element from structure  
Test Evaluate match expression  
Field Expression to match May contain Property Expansions
Checkboxes    
Allow Wildcards Treat * as wildcard in match  

JsonPath RegEx Match

JsonPath RegEx Match uses a JsonPath expression to select content from the target property and compares the result to a specified Regular Expression. Applicable to any property containing JSON.

Configuration

JsonPath RegEx Match

Option Description Comment
Json Expression    
Node Pick node from the structure Pro Feature
Namespace Declare namespace from request structure Pro Feature
Field Json expression to use in the match  
Expected Result    
Regular Expression Regular Expression to use in match  
Expected Result    
Select from Current Pick element from structure  
Test Evaluate match expression  
Field Expression to match May contain Property Expansions
Checkboxes    
Allow Wildcards Treat * as wildcard in match