Seven_Investmen
12 years agoNew Contributor
[Reg]Message Content Assertion RESTnumericalcomparisons fail
Goal:
- When dealing with a JSON based REST service I want to assert that a certain returned value is greater than, say 10.
Steps to reproduce:
- Create a new assertion test step following a REST request test step
- Add a Message Content Assertion with source set to preceding REST request
- Enable the numerical field that you want to compare, select <,>,<=,>= as appropriate (e.g. "10 < [value]" )
- Run the test case
Expected result
- If you setup assertion "10 < [value]", and the value returned is greater than 10, then expect a PASS
Actual result
- The <,>,<=,>= operators always fail when comparing numerical values from a REST response (however, = and != work as expected)
This issue means I cannot check REST responses contain correct numerical values. Any ideas on this? Can we get this fixed please?
- When dealing with a JSON based REST service I want to assert that a certain returned value is greater than, say 10.
Steps to reproduce:
- Create a new assertion test step following a REST request test step
- Add a Message Content Assertion with source set to preceding REST request
- Enable the numerical field that you want to compare, select <,>,<=,>= as appropriate (e.g. "10 < [value]" )
- Run the test case
Expected result
- If you setup assertion "10 < [value]", and the value returned is greater than 10, then expect a PASS
Actual result
- The <,>,<=,>= operators always fail when comparing numerical values from a REST response (however, = and != work as expected)
This issue means I cannot check REST responses contain correct numerical values. Any ideas on this? Can we get this fixed please?