public static TestStep CreateTestStep(string stepDisplayName) { var stepInfo = TestStepInfoMgr.Instance.TestStepInfoList.Where(x => x.DisplayName == stepDisplayName).FirstOrDefault(); TestStep step = null; if (stepDisplayName == TestStepType.Loop) { step = new LoopTestStep(); } else if (stepDisplayName == TestStepType.Manual) { step = new ManualLoopTestStep(); } else if (stepDisplayName == TestStepType.Cal) { step = new FormulaCalcTestStep(); } else if (stepDisplayName == TestStepType.Link) { step = new LinkTestStep(); } else { Type stepType = stepInfo.Assembly.GetType(stepInfo.StepType.ToString()); step = Activator.CreateInstance(stepType) as TestStep; } return(step); }
private void GetValidTestStep(LoopTestStep step) { foreach (var item in step.ChildTestStepList) { if (item.GetType() == typeof(LoopTestStep)) { GetValidTestStep(item as LoopTestStep); } else { Steplist.Add(item); } } }