I'm trying to make a utility for working with TFS and I get some values from testcases:
entrie.TestCase.CustomFields["IsReference"].Value,
entrie.TestCase.CustomFields["Microsoft.VSTS.TCM.AutomationStatus"].Value,
entrie.TestCase.CustomFields["TestType"].Value
///...
i show this values to the user, and after that i want to change this values. I tried:
testCase.CustomFields["Microsoft.VSTS.TCM.AutomationStatus"] = item.Value; // Error: The indexer has no setter
testCase.Priority = item.Value; // OK
How to change CustomFields
in test-case with tfs api?
CustomFields
is a FieldCollection
who's indexer has no setter , however the indexer return a Field
who's property Value
has one
Just change:
testCase.CustomFields["Microsoft.VSTS.TCM.AutomationStatus"] = item.Value;
to:
testCase.CustomFields["Microsoft.VSTS.TCM.AutomationStatus"].Value = item.Value;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.