Skip to content

CaseField

parkd126 edited this page Dec 10, 2018 · 9 revisions

Overview

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).

Fields

Name Type Description Request Methods
id Int The unique ID of the case field TODO
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. TODO
entityId Int The ID of the entity (test case, test result) this field is for TODO
typeId Int The ID of the custom field type TODO
locationId Int TODO TODO
displayOrder Int TODO TODO
isMulti Boolean TODO TODO
isActive Boolean TODO TODO
statusId Int TODO TODO
isSystem Boolean TODO TODO
type Type The type identifier for the new custom field TODO
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. TODO
label String The label for the new custom field TODO
description String The description for the new custom field TODO
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) TODO
templateIds List<Int> ID's of templates new custom field will apply to if include_all is set to false TODO
configs List<Config> An object wrapped in an array with two default keys, 'context' and 'options' TODO

Methods

GET Requests:


1. getCaseFields()

Description:

Returns a list of available test case custom fields.

Returns:
Example:
val caseFields = Case().getCaseFields()

 

POST Requests:


1. addCaseField()

Description:

Creates a new test case custom field.

Parameters:
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
Returns:
Example:
val caseFieldFoo = CaseField(
        type = Type.USER,
        name = "My CaseField",
        label = "my_casefield"
)
caseFieldFoo.addCaseField()

 

Clone this wiki locally