Check HTTP Response Code assetion in DevTest is not behaving correctly

Document ID : KB000102707
Last Modified Date : 07/09/2018
Show Technical Document Details
Issue:
Setting a value {{result=fail}} in  Log text Field  of " HTTP Response Code Assertion" to PASS or FAIL a test   does not work as expected.
Environment:
All DevTest Supported Environments 
Cause:
Setting the properties via log text fields is not a reliable way, since it might work in few cases and will not in other cases. Due to this inconsistent behavior we recommend users to always use Javascript step to set and evaluate Lisa properties so that the bean shell script can properly evaluate the code with in the {{ }}.
Resolution:
Settling properties in Log text field in the assertion  is not recommended and not a good practice to do. 
As per our documentation, the property needs to be set by using a Java Script step in order for the beanshell script to evaluate the property values correctly.

Here are few useful links :
Property expression : https://docops.ca.com/devtest-solutions/10-1/en/using/using-ca-application-test/using-devtest-workstation-with-ca-application-test/building-test-cases/properties/property-expressions
Using beanshell in Devtest : https://docops.ca.com/devtest-solutions/10-1/en/using/using-ca-application-test/using-devtest-workstation-with-ca-application-test/using-beanshell-in-devtest
Scripted Assertion : https://docops.ca.com/devtest-solutions/10-1/en/reference/assertion-descriptions/other-assertions/scripted-assertion

 
Additional Information:
In the future release we will be making the "CheckHTTPResponseCode" logging to look similar to  to the assertion "Ensure property" with the  comparison of expected response vs actual response.