ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

String values containing numbers change to integer when used in tests


Article ID: 108128


Updated On:


CA Application Test Service Virtualization CA Continuous Application Insight (PathFinder)


A string value of "010" from a JSON request is being evaluated to an integer "10" when used in the test in a script. 

For example:

There is property TestEQ_Code="010"

When the above property is used in a script with the code  testExec.setStateValue(EQ_Code,"TestEQ_Code"); The new property EQ_Code will have a value of 10 instead of 010.


It is the Java which is deleting the preceding zero's.


All supported DevTest environments.


One workaround is it to  use String EQ_Code= testExec.getStateValue("EquipmentCode"); instead of testExec.setStateValue(EQ_Code,"EquipmentCode");