Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Customising default field - Test Case Type


#1

Hi,

I’m trying to customise a test case field which is a default field in TestRail.

Specifically, I’m trying to change “Test Case Type” from a drop-down single select field to a drop-down multi-select field. It seems I’m only able to “Add Type”.

This is because some test cases are more than one type: i.e. a ‘Compliance’ test type could also be a ‘Functional’ and ‘Security’ test type and we don’t want to miss test cases when filtering during test run creation.

Is this possible or are these fields unchangeable?

I can of course create a new custom field, but given the ‘Test Case Type’ field is mandatory for test cases, it would be better to only have one test type field in test cases to avoid confusion.

Thanks,
Justin


#2

Hello Justin,

Thanks for your posting. The Type field cannot be changed to a multi-select field currently. I would recommend adding a separate multi-select custom field for this (e.g. “Tags”) and keeping the Type field. You can customize the values of the Type field and change the focus/meaning of this field to avoid confusion (e.g., you could use Manual (default), Exploratory and Automated instead of describing the test context). Would this work for you?

Regards,
Tobias


#3

Thanks Tobias, we will do that.

Kind Regards,
Justin


#4

Great to hear that this works for you, Justin!

Regards,
Tobias


#5

Hello Tobias,

We also using Tag multi-select custom field.
I wanted to know if there is an option to get all tags ids, as they can be seen in get_cases response under custom_tag ( ‘tag’ is field API name ) variable.

Thanks,
Dmitri


#6

Hi Dmitri!

Thanks for your posting. Yes, this is possible and you can get the mapping between IDs and the actual names/values via the get_case_fields API method:

http://docs.gurock.com/testrail-api2/reference-cases-fields

This also includes all other relevant options for the custom fields such as project scope etc.

Regards,
Tobias


#7

Hi Tobias,

Thank you, that’s just what we need.

Kind Regards,
Dmitri


#8

i am automating test rail in our project. I need to feed value read from an excel file into the testrail. I have to specify build number which is a custom field in the test rail and is a dropdown list. I need to feed index number for e.g 1 if i want to use the build number at index 1 in the dropdown list. I want to traverse the dropdown list and fetch all available values and compare them one by one from the read input. So i am willing to use get_case_fields API in order to fetch all available values of the dropdown list. How can i achieve this? Any suggestion would be of great help.


#9

Hi Kumar,

Thanks for your posting. get_case_fields is the right API method in this case and this returns all case custom fields. You would first need to check if the custom field applies to your project via the context field (global vs. select projects):

http://docs.gurock.com/testrail-api2/reference-cases-fields

The values can then be found via options > items. This is a key/value list (ID => label) and TestRail’s API methods would expect the IDs to submit values for your dropdown field.

I hope this helps!

Cheers,
Tobias


#10

Hi Tobias,

Thank you again for helping me with get_case_fields method.
I wonder if there is a post method that’ll help me automatically update custom field available values?
For example, I want to add tag to one of my cases, but it isn’t in the list and doesn’t have suitable id.

Thanks,
Dmitri


#11

You are welcome, Dmitri!

The API only provides read support for the custom fields currently as modifying custom fields is usually not a frequent action you would automate. That said, we understand that this can be useful as well and this is already on our list of things to look into. Thanks for your feedback on this (I just added another vote to this feature request)!

Cheers,
Tobias


#12

Hi Tobias,

Thank you and hope this feature will be released some day :smile:

Cheers,
Dmitri