IRunIteractionFactory.AddItem returns Null???
I am trying to import results on an iteration-by-iteration basis into QC. I can import the step results OK; I can also import the Iteration Summary XML fragment so that the Iteration Status appears correct; but I cannot create the individual Iterations using the OTA API. When I get hold of the factory like so:
... C# code to get theRun here...
dynamic theRun = runF.AddItem("run100");
theRun.AutoPost = true;
// NOTE: Without the Cast, this does not work.
IRun3 run3 = theRun as IRun3;
dynamic rif = run3.RunIterationFactory;
IRunIterationFactory irif = rif as IRunIterationFactory;
The irif.AddItem("iterationName") call always returns Null. According to the API, this appears to be the correct way to add iterations to a run; is this a bug or am I not calling something in the correct sequence?!
Re: IRunIteractionFactory.AddItem returns Null???
The problem is that when calling .AddItem, you must do this:
dynamic iteration = irif.AddItem(System.DBNull.Value)