| || |
Importing test results per iteration into QC
I am trying to import results on a per-iteration basis into QC 11 using OTA 11 but when I execute this code:
... get hold of the test ...
Set runF = theTest.RunFactory
Set theRun = runF.AddItem("run100")
theRun.AutoPost = True
' RunIteractionFactory is not supported
Set rif = theRun.RunIterationFactory
I get an error saying "Object doesn't support this property or method. 'theRun.RunIterationFactory'.
The Documentation (QC11, V11 in the OTAClient.DLL) seems to imply I should have access to the RunIterationFactory property. IRun3 (the interface) seems to surface it but I cannot call it.
Could I please ask if this is the correct way to import results on a per-iteration basis or are there any other ways? I have tried poking values directly into theRun fields:
theRun.Field("RN_ITERS_PARAMS_VALUES") = ...
theRun.Field("RN_ITERS_SUM_STATUS") = ...
And those values ARE surfaced in the Results Summary, but when I drill down into the details there are obviously no iterations (because I haven't added them). Any help appreciated!
Re: Importing test results per iteration into QC
Using C#, I did manage to get hold of the RunIterationFactory (from VBScript, I always get the error above). The C# code is simply this:
dynamic theRun = runF.AddItem("run100");
theRun.AutoPost = true;
// NOTE: Without the Cast/QI, this does not work.
IRun3 run3 = theRun as IRun3;
dynamic rif = run3.RunIterationFactory;
IRunIterationFactory irif = rif as IRunIterationFactory;
But there is another problem (I will raise a new issue): calling irif.AddItem("theIterationName") returns Null [img]/images/graemlins/frown.gif[/img]