| | |
| | | public Guid Guid2 { get; set; } |
| | | } |
| | | |
| | | protected override void OnRootChanged(TestPlan plan) |
| | | { |
| | | LoadTestPlan(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// This is the list of path of test plan loaded and used to prevent recursive TestPlan references. |
| | | /// </summary> |
| | |
| | | { |
| | | realPath = this.GetParent<TestPlan>()?.Path; |
| | | } |
| | | LoadTestPlan(); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | [Display("共享变量")] |
| | | //[Display("共享变量")] |
| | | public bool ShareGlobals { get; set; } |
| | | |
| | | [Browsable(false)] |
| | |
| | | var xml = plan.SerializeToString(); |
| | | var listeners = OpenTap.Log.GetListeners(); |
| | | var resultSetting = ResultSettings.Current; |
| | | var fileGlobalsContext = PlanRun.fileGlobalsContext; |
| | | using (Session.Create()) |
| | | { |
| | | SequenceContext.SetLocals(new VariableContext(null)); |
| | | var plan2 = Utils.DeserializeFromString<TestPlan>(xml); |
| | | plan2.PrintTestPlanRunSummary = false; |
| | | plan2.VisualPath = plan.Path; |
| | | foreach (var listener in listeners) |
| | | { |
| | | OpenTap.Log.AddListener(listener); |
| | | } |
| | | TestPlanRun subRun; |
| | | if (ShareGlobals) |
| | | { |
| | | subRun = plan2.Execute(SequenceName, resultSetting, null, null, |
| | | new VariableContainer(GetMergeContainer(), this.PlanRun.FileGlobalsRuntime, this.PlanRun.StationGlobalsRuntime)); |
| | | } |
| | | else |
| | | { |
| | | subRun = plan2.Execute(SequenceName, resultSetting, null, null, new VariableContainer(GetMergeContainer(), null, |
| | | this.PlanRun.StationGlobalsRuntime)); |
| | | } |
| | | new VariableContainer(GetMergeContainer(), fileGlobalsContext, this.PlanRun.StationGlobalsRuntime)); |
| | | //if (ShareGlobals) |
| | | //{ |
| | | // subRun = plan2.Execute(SequenceName, resultSetting, null, null, |
| | | // new VariableContainer(GetMergeContainer(), fileGlobalsContext, this.PlanRun.StationGlobalsRuntime)); |
| | | //} |
| | | //else |
| | | //{ |
| | | // subRun = plan2.Execute(SequenceName, resultSetting, null, null, new VariableContainer(GetMergeContainer(), null, |
| | | // this.PlanRun.StationGlobalsRuntime)); |
| | | //} |
| | | UpgradeVerdict(subRun.Verdict); |
| | | } |
| | | } |