04-14-2014 08:51 AM
Hi,
I like to create a sequence file with several steps via TestStand API. This works fine.
Now I want to have Step.StdOut and Step.StdError as AdditionalResult in the Report.
I know how to do it in TestStand but I can't manage the same task via the C# API.
I prepare everything to get the STDOUT and STDERR stored in variables. But the last step
to get the values into the report I can't manage.
I have found the AdditionalResult class but it's a abstract class. How do I create an object of type AdditionalResult?
How do I add it to the step? Or do I have to add it somewhere else?
------snip--------
step = engine.NewStep("", "CallExecutable");
step.Name = classname + "." + tcname;
step.AsPropertyObject().SetValString("Executable", 0, filename);
step.AsPropertyObject().SetValString("Arguments", 0, "test.test");
step.AsPropertyObject().SetValString("ExitCodeStatusAction", 0, "EXIT_CODE_NEQ_ZERO");
pob = step.AsPropertyObject().GetPropertyObject("StdOutput", 0);
pob.SetValVariant("Dest", 0, 1);
pob = step.AsPropertyObject().GetPropertyObject("StdError", 0);
pob.SetValVariant("Dest", 0, 1);
------snip--------
Thanks for any help!
Wolfram
04-15-2014 09:18 AM - edited 04-15-2014 09:46 AM
See the API help for Step.AdditionalResults.
I think you need to do something like the following:
mystep.AdditionalResults.CustomResults.Insert("\"Result Name\"", "Step.StdOut");
Hope this helps,
-Doug