-
Notifications
You must be signed in to change notification settings - Fork 1
CaseField
parkd126 edited this page Dec 26, 2018
·
9 revisions
TestRail currently supports custom fields for two entities, namely for test cases and test results. Custom fields for test cases allow you to add additional details to your test cases. Custom fields for test results can be used to record additional information when test results are entered (for example, on the Add Test Result dialog).
Name | Type | Description | Request Methods |
---|---|---|---|
id | Int | The unique ID of the case field | getCaseFields |
systemName | String | The unique name of this field in the database. Should be all lower case, no spaces. Please note: this name cannot be changed later. | getCaseFields |
entityId | Int | The ID of the entity (test case, test result) this field is for | getCaseFields |
typeId | Int | The ID of the custom field type | getCaseFields |
locationId | Int | The ID of the location for the custom case field. Top for small fields and bottom for large fields. | getCaseFields |
displayOrder | Int | The index of the custom field in the list of other custom fields | getCaseFields |
isMulti | Boolean | True if the case field is available in multiple specified projects. Otherwise false and the case field is available in all projects. | getCaseFields |
isActive | Boolean | Set flag to true if you want the custom field included for all cases. Otherwise (false). Disabling a field can be useful to hide it from TestRail's user interface without the need to delete the project assignments or the entire field (including data). | getCaseFields |
statusId | Int | The ID of the custom field status | getCaseFields |
isSystem | Boolean | True if the caseField is a default system case field. False otherwise. | getCaseFields |
type | Type | The type identifier for the new custom field | getCaseFields, addCaseField |
name | String | The name for new the custom field; When creating new custom fields, use simple names without the “custom_” prefix since this will be added automatically. | getCaseFields, addCaseField |
label | String | The label for the new custom field | getCaseFields, addCaseField |
description | String | The description for the new custom field | getCaseFields, addCaseField |
includeAll | Boolean | Set flag to true if you want the new custom field included for all templates. Otherwise (false) specify the ID's of templates to be included as the next parameter (template_ids) | getCaseFields, addCaseField |
templateIds | List<Int> | ID's of templates new custom field will apply to if include_all is set to false | getCaseFields, addCaseField |
configs | List<Config> | An object wrapped in an array with two default keys, 'context' and 'options' | getCaseFields, addCaseField |
Returns a list of available test case custom fields.
- List<CaseField>
val caseFields = Case().getCaseFields()
Creates a new test case custom field.
Name | Type | Description | Required |
---|---|---|---|
type | String | The type identifier for the new custom field See Type doc | Yes |
name | String | The name for new the custom field | Yes |
label | String | The label for the new custom field | Yes |
description | String | The description for the new custom field | No |
includeAll | Boolean | Set flag to true if you want the new custom field included for all templates. Otherwise (false) specify the ID's of templates to be included as the next parameter (template_ids) | No |
templateIds | List<Int> | ID's of templates new custom field will apply to if include_all is set to false | No |
configs | List<Config> | An object wrapped in an array with two default keys, 'context' and 'options' | No |
val caseFieldFoo = CaseField(
type = Type.USER,
name = "My CaseField",
label = "my_casefield"
)
caseFieldFoo.addCaseField()