skip to main content
What's New in Corticon : What was new and changed in Corticon 5.7.1 : Testsheets can specify locale

Try Corticon Now

Testsheets can specify locale

The Studio enables you to pass the locale for a request into its Tester. Specifying locale instructs Corticon how to parse locale sensitive data in a testsheet input such as dates and numeric formats. The setting applies to tests run in Studio and run against Server. The chosen locale property is stored with the Testsheet, and any exported XML or JSON files from the Testsheet. If the Locale is not set, then a Locale value is not sent in the request. The default value is the Server default.
To set the locale on a Testsheet:
1. Open the Ruletest in its editor, and then choose a Testsheet on which you want to set the locale.
2. In its Properties section, choose the Testsheet tab, as illustrated:
3. On the Locale dropdown menu, choose the locale for this Testsheet.
4. Save the Rulestest.
When you run the Testsheet, the selected locale is applied. For example, where the locale is set to French, the requests exported from Tester have the following header lines:
<ExecutionProperty name="PROPERTY_EXECUTION_LOCALE" value="fr" />
"__metadataRoot": {"#locale": "fr"},

Use case in the Ruletest editor

For a given property that is a decimal value, illustrated as price in this example, entering the value 2,2 is shown to be an error in the default locale:
Setting the locale to French, the comma delimiter for a decimal value is correct. The value is valid:
This information was added as the topic Setting the locale for a Testsheet