I am trying to set State
property value of Test Case Work item. I am creating using TFS API and C# code.
It throws an error while I save the test case using Save()
method. I have called the Validate()
method of a work item and the ArrayList
shows the value I am trying to assign is an invalid state.
testCase.State = TestPointState.Ready.ToString();
ArrayList result = testCase.WorkItem.Validate();
if (!testCase.WorkItem.IsValid())
{
//this block executes
}
When I manually opened the MTM to see what are the different STATE values for existing work items, then I found READY
and DESIGN
. That's why I tried t assign TestPointState.Ready
enum. I tried assiging READY
string directly in that statement, but still the same exception whlie saving the test case.
Any idea on how to fix this issue ?
Ready
orDesign
. You shouldn't useTestPointState
, it's not for this use. – DaveShaw