diff --git a/UTS_Core/UTSModule/Station/StationTestPlan.vb b/UTS_Core/UTSModule/Station/StationTestPlan.vb index 8a6420b..7ccb862 100644 --- a/UTS_Core/UTSModule/Station/StationTestPlan.vb +++ b/UTS_Core/UTSModule/Station/StationTestPlan.vb @@ -162,6 +162,11 @@ Namespace UTSModule.Station ''' 测试流程固定模块 ''' Enum FixedModuleEnum + ''' + ''' 空模块,无测试时默认值 + ''' + None + ''' ''' 主模块,测试起始模块 ''' diff --git a/UTS_Core/UTSModule/Test/FrmStationTest.vb b/UTS_Core/UTSModule/Test/FrmStationTest.vb index 4ae7f59..591face 100644 --- a/UTS_Core/UTSModule/Test/FrmStationTest.vb +++ b/UTS_Core/UTSModule/Test/FrmStationTest.vb @@ -886,13 +886,14 @@ Namespace UTSModule.Test Private Sub UpdateTestNode(node As RowNode) If _tester.DebugMode Then Return + If _tester.TestFiexdModule <> FixedModuleEnum.Main Then Return + If node.Action = False Then Return + If LblTestStep.InvokeRequired Then '判断是否需要开委托 LblTestStep.Invoke(New Action(Of RowNode)(AddressOf UpdateTestNode), New Object() {node}) Return End If - If node.Action = False Then Return - LblTestStep.Text = $"Step : [{node.RowListIndex}] - [{_recordGrid.GetRowByNode(node)}]" LblStepTip.Text = $"[{node.RowListIndex}]-{node.ParentNode.Label}:{node.Description}" diff --git a/UTS_Core/UTSModule/Test/UtsTester.vb b/UTS_Core/UTSModule/Test/UtsTester.vb index 21ecc5b..20c17c0 100644 --- a/UTS_Core/UTSModule/Test/UtsTester.vb +++ b/UTS_Core/UTSModule/Test/UtsTester.vb @@ -149,6 +149,9 @@ Namespace UTSModule.Test ''' 当前测试节点 Private _testNode As RowNode + ''' 当前测试固定模块 + Private _testFixedModule As FixedModuleEnum = FixedModuleEnum.None + ''' 测试耗时计时器 Private ReadOnly _testWatch As New Stopwatch @@ -271,6 +274,12 @@ Namespace UTSModule.Test End Get End Property + Public ReadOnly Property TestFiexdModule As FixedModuleEnum + Get + Return _testFixedModule + End Get + End Property + ''' ''' 判定测试失败的模式 ''' @@ -437,6 +446,8 @@ Namespace UTSModule.Test ''' Public Function ExecuteFixedModule(moduleName As FixedModuleEnum) As TestCommandReturn Dim result As TestCommandReturn + + _testFixedModule = moduleName If _testModules.ContainsKey(moduleName.ToString()) Then Dim node As RowNode = _testModules(moduleName.ToString()) node.IsRetry = False '顶级节点最初重试状态为false @@ -447,6 +458,7 @@ Namespace UTSModule.Test result.ExecuteResultTipString = $"未搜索到[{moduleName}]模块" End If + _testFixedModule = FixedModuleEnum.None '重置测试固定模块 Return result End Function @@ -755,8 +767,8 @@ Namespace UTSModule.Test result.StepTimeSpan = watch.Elapsed '进度修改 - If node.RowListIndex > _startTestIndex AndAlso node.RowIndex < _endTestIndex Then - Dim p As Double = (node.RowListIndex - _startTestIndex) / _testCount * 100 + If node.RowListIndex > _startTestIndex AndAlso node.RowListIndex < _endTestIndex Then + Dim p As Double = (node.RowListIndex - _startTestIndex) / (_testCount * 100) RaiseEvent TestProgressChanged(Me, New TestProgressChangedEventArgs(p)) End If