01-04-2010 07:09 AM
Sequence mySequence = myEngine.NewSequence();
mySequence.Name = "myAction";
//Create new step of type Action and set Name
Step mystep = myEngine.NewStep(AdapterKeyNames.DotNetAdapterKeyname, StepTypes.StepType_Action);
mystep.Name = "GetStringObject";
//Obtain the code module from the step
DotNetModule myModule = mystep.Module as DotNetModule;
//Set properties of the module
myModule.SetAssembly(DotNetModuleAssemblyLocations.DotNetModule_AssemblyLocation_File, @"C:\Documents and Settings\My Documents\Visual Studio 2005\Projects\HelperClass\HelperClass\bin\Debug\HelperClass.dll");
myModule.ClassName = "Class1";
myModule.MemberType = DotNetModuleMemberTypes.DotNetMember_GetProperty;
myModule.MemberName = "StringObject";
mySequence.InsertStep(mystep, 0, StepGroups.StepGroup_Setup);
mySequence.Locals.NewSubProperty("StringObject", PropertyValueTypes.PropValType_Reference, false, "", 0);
DotNetParameterDirections reference = mySequence.Locals as DotNetParameterDirections;
mySequence.Locals.GetPropertyObject("StringObject", 0);
myModule.ClassReference = "Locals.StringObject";
myModule.LoadPrototypeFromMetadataToken(385875969, 0);
After this I am not able to proceed.herewith attached documents contain screenshot of teststand file marked red is to be solved. How to define the value field of the return parameters?
01-06-2010 04:30 PM
Please see my answer to your question on page two of the following forum thread:
Programmatically generating DotNet Steps in TestStand