├── data
└── .gitkeep
├── deploy
├── Lib
│ └── .gitkeep
├── Resources
│ └── .gitkeep
├── expressionconfig.xml
├── slavelog.xml
└── platformlog.xml
├── source
├── src
│ ├── Dev
│ │ ├── UserInterfaces
│ │ │ └── .gitkeep
│ │ ├── Logger
│ │ │ ├── packages.config
│ │ │ ├── ModuleErrorCode.cs
│ │ │ ├── Constants.cs
│ │ │ └── logconfig.xml
│ │ ├── Authentification
│ │ │ ├── AuthenticationInspector.cs
│ │ │ ├── AuthorityRequired.cs
│ │ │ └── AuthenticationStrategy.cs
│ │ ├── UserLibInterface
│ │ │ ├── Constants.cs
│ │ │ ├── Synchronous
│ │ │ │ ├── SynchronizedFunctionAttribute.cs
│ │ │ │ └── SynchronousType.cs
│ │ │ ├── Common
│ │ │ │ ├── AssertionAttribute.cs
│ │ │ │ ├── DescriptionAttribute.cs
│ │ │ │ ├── HideAttribute.cs
│ │ │ │ ├── CallBackAttribute.cs
│ │ │ │ ├── TestflowTypeAttribute.cs
│ │ │ │ └── TestflowElementAttribute.cs
│ │ │ ├── ISynchronizedResource.cs
│ │ │ ├── IFlowConsole.cs
│ │ │ └── LibTypeNames.cs
│ │ ├── Utility
│ │ │ ├── packages.config
│ │ │ ├── Collections
│ │ │ │ └── Convertor
│ │ │ │ │ └── EnumConvertor.cs
│ │ │ ├── MessageUtil
│ │ │ │ ├── IMessage.cs
│ │ │ │ ├── ReceiveType.cs
│ │ │ │ ├── MessengerType.cs
│ │ │ │ ├── IMessageConsumer.cs
│ │ │ │ └── FormatterType.cs
│ │ │ ├── ModuleErrorCode.cs
│ │ │ ├── I18nUtil
│ │ │ │ └── I18NOptionComparer.cs
│ │ │ └── UtilityConstants.cs
│ │ └── Common
│ │ │ ├── Data
│ │ │ ├── Sequence
│ │ │ │ ├── ISequenceElement.cs
│ │ │ │ ├── IArgumentCollection.cs
│ │ │ │ ├── IVariableCollection.cs
│ │ │ │ ├── ISequenceGroupCollection.cs
│ │ │ │ ├── ISequenceCollection.cs
│ │ │ │ ├── ITypeDataCollection.cs
│ │ │ │ ├── ISequenceStepCollection.cs
│ │ │ │ ├── IParameterDataCollection.cs
│ │ │ │ ├── ISequenceDataContainer.cs
│ │ │ │ ├── IVariableInitValue.cs
│ │ │ │ ├── ParameterType.cs
│ │ │ │ ├── RunBehavior.cs
│ │ │ │ ├── ISequenceParameter.cs
│ │ │ │ ├── IParameterData.cs
│ │ │ │ ├── ILoopCounter.cs
│ │ │ │ ├── ISequenceFlowContainer.cs
│ │ │ │ ├── IArgument.cs
│ │ │ │ ├── ISequence.cs
│ │ │ │ ├── ISequenceStepParameter.cs
│ │ │ │ ├── ISequenceParameterInfo.cs
│ │ │ │ ├── IRetryCounter.cs
│ │ │ │ ├── IVariable.cs
│ │ │ │ ├── ISequenceGroupParameter.cs
│ │ │ │ ├── SequenceStepType.cs
│ │ │ │ └── ISequenceGroupInfo.cs
│ │ │ ├── IAssemblyInfoCollection.cs
│ │ │ ├── ExecutionModel.cs
│ │ │ ├── Expression
│ │ │ │ ├── ExpressionTypeData.cs
│ │ │ │ ├── IExpressionCalculator.cs
│ │ │ │ ├── IExpressionElement.cs
│ │ │ │ ├── IExpressionData.cs
│ │ │ │ ├── ExpressionOperatorInfo.cs
│ │ │ │ └── ExpressionCalculatorInfo.cs
│ │ │ ├── Description
│ │ │ │ ├── IDescriptionData.cs
│ │ │ │ ├── IPropertyDescription.cs
│ │ │ │ ├── IArgumentDescription.cs
│ │ │ │ ├── IClassInterfaceDescription.cs
│ │ │ │ ├── ITypeDescription.cs
│ │ │ │ └── IFuncInterfaceDescription.cs
│ │ │ ├── ArgumentModifier.cs
│ │ │ ├── CallBackType.cs
│ │ │ ├── IResultPrinter.cs
│ │ │ ├── ReportType.cs
│ │ │ ├── RecordLevel.cs
│ │ │ ├── FailedAction.cs
│ │ │ ├── VariableType.cs
│ │ │ ├── ITypeData.cs
│ │ │ ├── IAssemblyInfo.cs
│ │ │ ├── LibraryCategory.cs
│ │ │ └── FunctionType.cs
│ │ │ ├── Common
│ │ │ ├── ICloneableClass.cs
│ │ │ ├── IEntityComponent.cs
│ │ │ ├── SerializationTarget.cs
│ │ │ ├── ISerializableMap.cs
│ │ │ ├── LogLevel.cs
│ │ │ ├── TestflowDataException.cs
│ │ │ ├── TestflowRuntimeException.cs
│ │ │ ├── TestflowInternalException.cs
│ │ │ └── TestflowAssertException.cs
│ │ │ ├── Runtime
│ │ │ ├── Data
│ │ │ │ ├── IRuntimeStatusCollection.cs
│ │ │ │ ├── ITestGenerationInfo.cs
│ │ │ │ ├── ISessionGenerationInfo.cs
│ │ │ │ ├── ISequenceStatusInfo.cs
│ │ │ │ ├── IFailedInfo.cs
│ │ │ │ ├── PerformanceStatus.cs
│ │ │ │ └── StepResult.cs
│ │ │ ├── ISequenceDebuggerCollection.cs
│ │ │ ├── RunTimeType.cs
│ │ │ ├── TaskBreakException.cs
│ │ │ ├── IRuntimeConfiguration.cs
│ │ │ ├── IDebugInformation.cs
│ │ │ ├── ICallStack.cs
│ │ │ ├── GenerationStatus.cs
│ │ │ ├── IHostInfo.cs
│ │ │ ├── IPerformanceResult.cs
│ │ │ ├── IDebuggerHandle.cs
│ │ │ └── FailedType.cs
│ │ │ ├── RunMode.cs
│ │ │ ├── Modules
│ │ │ ├── IModuleConfigData.cs
│ │ │ ├── IConfigurationManager.cs
│ │ │ ├── IResultManager.cs
│ │ │ ├── I18nUtil
│ │ │ │ └── I18NOptionComparer.cs
│ │ │ ├── IController.cs
│ │ │ └── IWarningInfo.cs
│ │ │ ├── TestflowContext.cs
│ │ │ ├── I18nUtil
│ │ │ └── I18NOptionComparer.cs
│ │ │ ├── TestflowStates.cs
│ │ │ ├── TestflowRunnerOptions.cs
│ │ │ ├── DesignTime
│ │ │ └── IDesigntimeContext.cs
│ │ │ └── FlowControl
│ │ │ └── TestflowLoopBreakException.cs
│ ├── External
│ │ └── ExpressionFunctions
│ │ │ └── ArrayElementAcquirer.cs
│ ├── Modules
│ │ ├── Core
│ │ │ ├── SlaveCore
│ │ │ │ ├── packages.config
│ │ │ │ ├── Data
│ │ │ │ │ ├── StepExecutionInfo.cs
│ │ │ │ │ ├── StatusReportType.cs
│ │ │ │ │ ├── SequenceStatusInfo.cs
│ │ │ │ │ └── ExecutionTrack.cs
│ │ │ │ ├── Runner
│ │ │ │ │ ├── Model
│ │ │ │ │ │ ├── GotoStepEntity.cs
│ │ │ │ │ │ ├── SequenceCallStepEntity.cs
│ │ │ │ │ │ ├── BatchBlockStepEntity.cs
│ │ │ │ │ │ ├── TimerBlockStepEntity.cs
│ │ │ │ │ │ └── MultiThreadStepEntity.cs
│ │ │ │ │ ├── Convertors
│ │ │ │ │ │ ├── DateTimeConvertor.cs
│ │ │ │ │ │ └── ValueConvertorBase.cs
│ │ │ │ │ └── Actuators
│ │ │ │ │ │ ├── EmptyActuator.cs
│ │ │ │ │ │ └── AssertActuator.cs
│ │ │ │ ├── Coroutine
│ │ │ │ │ └── CoroutineState.cs
│ │ │ │ ├── Common
│ │ │ │ │ ├── TaskFailedException.cs
│ │ │ │ │ └── Constants.cs
│ │ │ │ ├── TestLauncher.cs
│ │ │ │ └── AppDomainTestLauncher.cs
│ │ │ ├── MasterCore
│ │ │ │ ├── packages.config
│ │ │ │ ├── ObjectManage
│ │ │ │ │ ├── IRuntimeObjectCustomer.cs
│ │ │ │ │ ├── Objects
│ │ │ │ │ │ ├── BreakPointObject.cs
│ │ │ │ │ │ ├── WatchDataObject.cs
│ │ │ │ │ │ └── EvaluationObject.cs
│ │ │ │ │ └── RuntimeObject.cs
│ │ │ │ ├── Message
│ │ │ │ │ ├── IMessageHandler.cs
│ │ │ │ │ └── AsyncMsgTransceiver.cs
│ │ │ │ ├── TestMaintain
│ │ │ │ │ ├── Container
│ │ │ │ │ │ └── ProcessRuntimeContainer.cs
│ │ │ │ │ └── ITestEntityMaintainer.cs
│ │ │ │ ├── EventData
│ │ │ │ │ ├── DebuggerHandle.cs
│ │ │ │ │ ├── TestProjectResults.cs
│ │ │ │ │ └── DebugInformation.cs
│ │ │ │ └── SyncManage
│ │ │ │ │ └── SynchronousManager.cs
│ │ │ └── CoreCommon
│ │ │ │ ├── Common
│ │ │ │ ├── RuntimeTarget.cs
│ │ │ │ ├── RunnerType.cs
│ │ │ │ ├── MQIgnoreAttribute.cs
│ │ │ │ ├── TestGenState.cs
│ │ │ │ ├── CoreConstants.cs
│ │ │ │ ├── BlockHandle.cs
│ │ │ │ └── MessageType.cs
│ │ │ │ ├── Data
│ │ │ │ └── EventInfos
│ │ │ │ │ ├── SyncEventInfo.cs
│ │ │ │ │ ├── EventType.cs
│ │ │ │ │ ├── EventInfoBase.cs
│ │ │ │ │ ├── AbortEventInfo.cs
│ │ │ │ │ ├── TestGenEventInfo.cs
│ │ │ │ │ └── ExceptionEventInfo.cs
│ │ │ │ └── Messages
│ │ │ │ └── TestGenMessage.cs
│ │ ├── SequenceManager
│ │ │ ├── packages.config
│ │ │ ├── Checker
│ │ │ │ ├── IStepChecker.cs
│ │ │ │ ├── GotoChecker.cs
│ │ │ │ ├── BatchBlockChecker.cs
│ │ │ │ ├── ExecutionChecker.cs
│ │ │ │ ├── TimerBlockChecker.cs
│ │ │ │ ├── ConditionLoopChecker.cs
│ │ │ │ ├── SequenceCallChecker.cs
│ │ │ │ ├── ConditionBlockChecker.cs
│ │ │ │ ├── MultiThreadBlockChecker.cs
│ │ │ │ ├── TryFinallyBlockChecker.cs
│ │ │ │ └── ConditionStatementChecker.cs
│ │ │ ├── SequenceChecker.cs
│ │ │ ├── Serializer
│ │ │ │ ├── Convertor
│ │ │ │ │ └── EnumConvertor.cs
│ │ │ │ └── SequenceJsonConvertor.cs
│ │ │ ├── StepCreators
│ │ │ │ ├── BatchBlockCreator.cs
│ │ │ │ ├── TimerBlockCreator.cs
│ │ │ │ ├── SequenceCallCreator.cs
│ │ │ │ ├── MultiThreadBlockCreator.cs
│ │ │ │ ├── ExecutionCreator.cs
│ │ │ │ ├── ConditionStatementCreator.cs
│ │ │ │ ├── ConditionLoopCreator.cs
│ │ │ │ ├── SequenceStepCreator.cs
│ │ │ │ ├── ConditionBlockCreator.cs
│ │ │ │ └── TryFinallyBlockCreator.cs
│ │ │ ├── Common
│ │ │ │ ├── RuntimeTypeAttribute.cs
│ │ │ │ ├── RuntimeElementTypeAttribute.cs
│ │ │ │ ├── GenericCollectionAttribute.cs
│ │ │ │ ├── SerializationOrderAttribute.cs
│ │ │ │ ├── RuntimeSerializeIgnoreAttribute.cs
│ │ │ │ ├── SerializationIgnoreAttribute.cs
│ │ │ │ └── SerializationOrderEnableAttribute.cs
│ │ │ ├── Expression
│ │ │ │ └── OperatorAdapterComparer.cs
│ │ │ ├── SequenceElements
│ │ │ │ └── SequenceGroupLocationInfo.cs
│ │ │ └── ModuleErrorCode.cs
│ │ ├── ResultManager
│ │ │ ├── Constants.cs
│ │ │ ├── ModuleErrorCode.cs
│ │ │ ├── JsonWriter.cs
│ │ │ └── XMLWriter.cs
│ │ ├── ConfigurationManager
│ │ │ ├── ModuleErrorCode.cs
│ │ │ ├── Data
│ │ │ │ ├── ConfigItem.cs
│ │ │ │ ├── ConfigBlock.cs
│ │ │ │ ├── ConfigData.cs
│ │ │ │ └── ExpressionOperatorConfiguration.cs
│ │ │ └── Constants.cs
│ │ ├── DataMaintainer
│ │ │ ├── Constants.cs
│ │ │ ├── ModuleErrorCode.cs
│ │ │ ├── packages.config
│ │ │ └── RuntimeDatabaseProxy.cs
│ │ ├── ParameterChecker
│ │ │ ├── ModuleErrorCode.cs
│ │ │ ├── WarnCode.cs
│ │ │ └── WarningInfo.cs
│ │ └── ComInterfaceManager
│ │ │ ├── Data
│ │ │ ├── PropertyDescription.cs
│ │ │ ├── TypeDescription.cs
│ │ │ ├── ArgumentDescription.cs
│ │ │ ├── FunctionInterfaceDescription.cs
│ │ │ ├── ClassInterfaceDescription.cs
│ │ │ └── ComInterfaceDescription.cs
│ │ │ ├── Constants.cs
│ │ │ └── ModuleErrorCode.cs
│ └── Services
│ │ ├── DesigntimeService
│ │ ├── Common
│ │ │ └── Constants.cs
│ │ └── ModuleErrorCode.cs
│ │ └── RuntimeService
│ │ ├── ModuleErrorCode.cs
│ │ └── Common
│ │ └── Constants.cs
├── packages
│ ├── System.Threading.Tasks.Extensions.4.5.1
│ │ ├── lib
│ │ │ ├── MonoAndroid10
│ │ │ │ └── _._
│ │ │ ├── MonoTouch10
│ │ │ │ └── _._
│ │ │ ├── netcoreapp2.1
│ │ │ │ └── _._
│ │ │ ├── xamarinios10
│ │ │ │ └── _._
│ │ │ ├── xamarinmac20
│ │ │ │ └── _._
│ │ │ ├── xamarintvos10
│ │ │ │ └── _._
│ │ │ ├── xamarinwatchos10
│ │ │ │ └── _._
│ │ │ ├── netstandard1.0
│ │ │ │ └── System.Threading.Tasks.Extensions.dll
│ │ │ ├── netstandard2.0
│ │ │ │ └── System.Threading.Tasks.Extensions.dll
│ │ │ └── portable-net45+win8+wp8+wpa81
│ │ │ │ └── System.Threading.Tasks.Extensions.dll
│ │ ├── ref
│ │ │ ├── MonoAndroid10
│ │ │ │ └── _._
│ │ │ ├── MonoTouch10
│ │ │ │ └── _._
│ │ │ ├── netcoreapp2.1
│ │ │ │ └── _._
│ │ │ ├── xamarinios10
│ │ │ │ └── _._
│ │ │ ├── xamarinmac20
│ │ │ │ └── _._
│ │ │ ├── xamarintvos10
│ │ │ │ └── _._
│ │ │ ├── xamarinwatchos10
│ │ │ │ └── _._
│ │ │ ├── netstandard1.0
│ │ │ │ └── System.Threading.Tasks.Extensions.dll
│ │ │ └── netstandard2.0
│ │ │ │ └── System.Threading.Tasks.Extensions.dll
│ │ ├── useSharedDesignerContext.txt
│ │ ├── version.txt
│ │ ├── .signature.p7s
│ │ ├── System.Threading.Tasks.Extensions.4.5.1.nupkg
│ │ └── LICENSE.TXT
│ ├── System.Runtime.CompilerServices.Unsafe.4.5.0
│ │ ├── lib
│ │ │ ├── uap10.0.16300
│ │ │ │ └── _._
│ │ │ ├── netcoreapp2.0
│ │ │ │ └── System.Runtime.CompilerServices.Unsafe.dll
│ │ │ ├── netstandard1.0
│ │ │ │ └── System.Runtime.CompilerServices.Unsafe.dll
│ │ │ └── netstandard2.0
│ │ │ │ └── System.Runtime.CompilerServices.Unsafe.dll
│ │ ├── ref
│ │ │ ├── uap10.0.16300
│ │ │ │ └── _._
│ │ │ ├── netstandard1.0
│ │ │ │ └── System.Runtime.CompilerServices.Unsafe.dll
│ │ │ └── netstandard2.0
│ │ │ │ └── System.Runtime.CompilerServices.Unsafe.dll
│ │ ├── useSharedDesignerContext.txt
│ │ ├── version.txt
│ │ ├── .signature.p7s
│ │ ├── System.Runtime.CompilerServices.Unsafe.4.5.0.nupkg
│ │ └── LICENSE.TXT
│ ├── Moq.4.10.1
│ │ ├── .signature.p7s
│ │ ├── Moq.4.10.1.nupkg
│ │ └── lib
│ │ │ └── net45
│ │ │ ├── Moq.dll
│ │ │ └── Moq.pdb
│ ├── log4net.2.0.8
│ │ ├── .signature.p7s
│ │ ├── log4net.2.0.8.nupkg
│ │ └── lib
│ │ │ └── net45-full
│ │ │ └── log4net.dll
│ └── Castle.Core.4.3.1
│ │ ├── .signature.p7s
│ │ ├── Castle.Core.4.3.1.nupkg
│ │ ├── lib
│ │ └── net45
│ │ │ └── Castle.Core.dll
│ │ ├── readme.txt
│ │ └── LICENSE
└── test
│ └── Modules
│ ├── EngineCoreTest
│ └── packages.config
│ ├── DataMaintainerTest
│ └── packages.config
│ ├── SequenceManagerTest
│ └── packages.config
│ └── EngineCoreTestLib
│ ├── CallBackForm.cs
│ ├── CallBackClass.cs
│ └── CoreTestClass.cs
├── doc
├── 接口组合关系图.pdf
├── 平台接口变更记录.xlsx
├── 序列模型变更记录.xlsx
├── 框架配置信息说明.xlsx
├── 平台版本功能变更记录.xlsx
├── TestFlow设计说明.docx
├── Testflow功能规划.xlsx
├── Testflow开发文档.docx
├── Testflow开发计划.xlsx
└── Testflow接口文档.docx
├── README.md
└── .gitignore
/data/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/deploy/Lib/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/deploy/Resources/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/src/Dev/UserInterfaces/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/MonoAndroid10/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/MonoTouch10/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/netcoreapp2.1/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/xamarinios10/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/xamarinmac20/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/xamarintvos10/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/ref/MonoAndroid10/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/ref/MonoTouch10/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/ref/netcoreapp2.1/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/ref/xamarinios10/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/ref/xamarinmac20/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/ref/xamarintvos10/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/lib/uap10.0.16300/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/ref/uap10.0.16300/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/xamarinwatchos10/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/ref/xamarinwatchos10/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/useSharedDesignerContext.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/doc/接口组合关系图.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/doc/接口组合关系图.pdf
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/useSharedDesignerContext.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/doc/平台接口变更记录.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/doc/平台接口变更记录.xlsx
--------------------------------------------------------------------------------
/doc/序列模型变更记录.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/doc/序列模型变更记录.xlsx
--------------------------------------------------------------------------------
/doc/框架配置信息说明.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/doc/框架配置信息说明.xlsx
--------------------------------------------------------------------------------
/doc/平台版本功能变更记录.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/doc/平台版本功能变更记录.xlsx
--------------------------------------------------------------------------------
/doc/TestFlow设计说明.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/doc/TestFlow设计说明.docx
--------------------------------------------------------------------------------
/doc/Testflow功能规划.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/doc/Testflow功能规划.xlsx
--------------------------------------------------------------------------------
/doc/Testflow开发文档.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/doc/Testflow开发文档.docx
--------------------------------------------------------------------------------
/doc/Testflow开发计划.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/doc/Testflow开发计划.xlsx
--------------------------------------------------------------------------------
/doc/Testflow接口文档.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/doc/Testflow接口文档.docx
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/version.txt:
--------------------------------------------------------------------------------
1 | 7ee84596d92e178bce54c986df31ccc52479e772
2 |
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/version.txt:
--------------------------------------------------------------------------------
1 | 30ab651fcb4354552bd4891619a0bdd81e0ebdbf
2 |
--------------------------------------------------------------------------------
/source/packages/Moq.4.10.1/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/Moq.4.10.1/.signature.p7s
--------------------------------------------------------------------------------
/source/packages/Moq.4.10.1/Moq.4.10.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/Moq.4.10.1/Moq.4.10.1.nupkg
--------------------------------------------------------------------------------
/source/packages/Moq.4.10.1/lib/net45/Moq.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/Moq.4.10.1/lib/net45/Moq.dll
--------------------------------------------------------------------------------
/source/packages/Moq.4.10.1/lib/net45/Moq.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/Moq.4.10.1/lib/net45/Moq.pdb
--------------------------------------------------------------------------------
/source/packages/log4net.2.0.8/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/log4net.2.0.8/.signature.p7s
--------------------------------------------------------------------------------
/source/packages/Castle.Core.4.3.1/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/Castle.Core.4.3.1/.signature.p7s
--------------------------------------------------------------------------------
/source/packages/log4net.2.0.8/log4net.2.0.8.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/log4net.2.0.8/log4net.2.0.8.nupkg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Testflow
2 | This is the repository for Testflow development. Testflow is a test automation platform for test & measurement industries maintained by JYTEK.
3 |
--------------------------------------------------------------------------------
/source/packages/Castle.Core.4.3.1/Castle.Core.4.3.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/Castle.Core.4.3.1/Castle.Core.4.3.1.nupkg
--------------------------------------------------------------------------------
/source/packages/log4net.2.0.8/lib/net45-full/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/log4net.2.0.8/lib/net45-full/log4net.dll
--------------------------------------------------------------------------------
/source/src/Dev/Logger/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/source/packages/Castle.Core.4.3.1/lib/net45/Castle.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/Castle.Core.4.3.1/lib/net45/Castle.Core.dll
--------------------------------------------------------------------------------
/source/src/Dev/Authentification/AuthenticationInspector.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Authentication
2 | {
3 | public class AuthenticationInspector
4 | {
5 |
6 | }
7 | }
--------------------------------------------------------------------------------
/source/src/External/ExpressionFunctions/ArrayElementAcquirer.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.ExpressionFunctions
2 | {
3 | public class ArrayElementAcquirer
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/Constants.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Usr
2 | {
3 | internal static class Constants
4 | {
5 | public const string I18nName = "UserLib";
6 | }
7 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Threading.Tasks.Extensions.4.5.1/.signature.p7s
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/.signature.p7s
--------------------------------------------------------------------------------
/source/src/Modules/ResultManager/Constants.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.ResultManager
2 | {
3 | internal static class Constants
4 | {
5 | public const string I18nName = "ResultManager";
6 | }
7 | }
--------------------------------------------------------------------------------
/source/src/Dev/Utility/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Checker/IStepChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.Checker
4 | {
5 | internal interface IStepChecker
6 | {
7 | void CheckStep(ISequenceStep step);
8 | }
9 | }
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/System.Threading.Tasks.Extensions.4.5.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Threading.Tasks.Extensions.4.5.1/System.Threading.Tasks.Extensions.4.5.1.nupkg
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/System.Runtime.CompilerServices.Unsafe.4.5.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/System.Runtime.CompilerServices.Unsafe.4.5.0.nupkg
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/netstandard1.0/System.Threading.Tasks.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/netstandard1.0/System.Threading.Tasks.Extensions.dll
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/netstandard2.0/System.Threading.Tasks.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/netstandard2.0/System.Threading.Tasks.Extensions.dll
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/ref/netstandard1.0/System.Threading.Tasks.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Threading.Tasks.Extensions.4.5.1/ref/netstandard1.0/System.Threading.Tasks.Extensions.dll
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/ref/netstandard2.0/System.Threading.Tasks.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Threading.Tasks.Extensions.4.5.1/ref/netstandard2.0/System.Threading.Tasks.Extensions.dll
--------------------------------------------------------------------------------
/source/src/Services/DesigntimeService/Common/Constants.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.DesigntimeService
2 | {
3 | internal static class Constants
4 | {
5 | public const int DefaultCompCollectionSize = 10;
6 | public const string I18nName = "DesignService";
7 | }
8 | }
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/lib/netstandard1.0/System.Runtime.CompilerServices.Unsafe.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/lib/netstandard1.0/System.Runtime.CompilerServices.Unsafe.dll
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/ref/netstandard1.0/System.Runtime.CompilerServices.Unsafe.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/ref/netstandard1.0/System.Runtime.CompilerServices.Unsafe.dll
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/ref/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/ref/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/Synchronous/SynchronizedFunctionAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Usr.Synchronous
4 | {
5 | ///
6 | /// 同步方法
7 | ///
8 | public class SynchronizedFunctionAttribute : Attribute
9 | {
10 |
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequenceElement.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.Serialization;
2 |
3 | namespace Testflow.Data.Sequence
4 | {
5 | ///
6 | /// 序列的元素
7 | ///
8 | public interface ISequenceElement : ISerializable
9 | {
10 |
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/Synchronous/SynchronousType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Usr.Synchronous
2 | {
3 | ///
4 | /// 同步类型
5 | ///
6 | public enum SynchronousType
7 | {
8 | Type,
9 |
10 | Instance,
11 |
12 | Function,
13 | }
14 | }
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SeeSharpOpenSource/Testflow/HEAD/source/packages/System.Threading.Tasks.Extensions.4.5.1/lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.dll
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/IAssemblyInfoCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Testflow.Data
4 | {
5 | ///
6 | /// 配置集信息的集合
7 | ///
8 | public interface IAssemblyInfoCollection : IList
9 | {
10 |
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/IArgumentCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Testflow.Data.Sequence
4 | {
5 | ///
6 | /// 参数集合
7 | ///
8 | public interface IArgumentCollection : IList
9 | {
10 |
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/IVariableCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Testflow.Data.Sequence
4 | {
5 | ///
6 | /// 变量的集合
7 | ///
8 | public interface IVariableCollection : IList
9 | {
10 |
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/ObjectManage/IRuntimeObjectCustomer.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.MasterCore.ObjectManage
2 | {
3 | internal interface IRuntimeObjectCustomer
4 | {
5 | void AddObject(RuntimeObject runtimeObject);
6 | void RemoveObject(RuntimeObject runtimeObject);
7 | }
8 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/SequenceChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager
4 | {
5 | internal class SequenceChecker
6 | {
7 | public void CheckTestProject(ITestProject testProject)
8 | {
9 |
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/Common/AssertionAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Usr.Common
4 | {
5 | ///
6 | /// 用于断言声明的注解
7 | ///
8 | [AttributeUsage(AttributeTargets.Method)]
9 | public class AssertionAttribute : Attribute
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequenceGroupCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Testflow.Data.Sequence
4 | {
5 | ///
6 | /// 测试序列组集合
7 | ///
8 | public interface ISequenceGroupCollection : IList
9 | {
10 |
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/ISynchronizedResource.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Usr
2 | {
3 | ///
4 | /// 同步资源的接口
5 | ///
6 | public interface ISynchronizedResource
7 | {
8 | ///
9 | ///
10 | ///
11 | void Synchronize();
12 | }
13 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Common/ICloneableClass.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Usr
2 | {
3 | ///
4 | /// 可拷贝接口
5 | ///
6 | public interface ICloneableClass
7 | {
8 | ///
9 | /// 复制当前的实例
10 | ///
11 | TDataType Clone();
12 | }
13 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/Data/IRuntimeStatusCollection.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.Runtime.Data
4 | {
5 | ///
6 | /// 运行时状态集合
7 | ///
8 | public interface IRuntimeStatusCollection : ISerializableMap
9 | {
10 |
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequenceCollection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Testflow.Data.Sequence
5 | {
6 | ///
7 | /// IsequeceData的列表容器
8 | ///
9 | public interface ISequenceCollection : IList
10 | {
11 |
12 | }
13 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ITypeDataCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Usr;
3 |
4 | namespace Testflow.Data.Sequence
5 | {
6 | ///
7 | /// 测试序列组使用的所有Type的集合
8 | ///
9 | public interface ITypeDataCollection : IList
10 | {
11 |
12 | }
13 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/ISequenceDebuggerCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Usr;
3 |
4 | namespace Testflow.Runtime
5 | {
6 | ///
7 | /// 序列调试器的集合
8 | ///
9 | public interface ISequenceDebuggerCollection : ISerializableMap
10 | {
11 |
12 | }
13 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Checker/GotoChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.Checker
4 | {
5 | internal class GotoChecker : IStepChecker
6 | {
7 | public void CheckStep(ISequenceStep step)
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Utility/Collections/Convertor/EnumConvertor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Utility.Collections.Convertor
4 | {
5 | internal class EnumConvertor
6 | {
7 | public static object ReadData(Type propertyType, string attribute)
8 | {
9 | return Enum.Parse(propertyType, attribute);
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Authentification/AuthorityRequired.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Authentication
4 | {
5 | [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property)]
6 | public class AuthorityRequired : Attribute
7 | {
8 | public AuthorityRequired(Enum test)
9 | {
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Modules/ConfigurationManager/ModuleErrorCode.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.ConfigurationManager
4 | {
5 | public static class ModuleErrorCode
6 | {
7 | public const int InvalidEnvDir = 1 | CommonErrorCode.ConfigureErrorMask;
8 | public const int ConfigDataError = 2 | CommonErrorCode.ConfigureErrorMask;
9 | }
10 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Checker/BatchBlockChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.Checker
4 | {
5 | internal class BatchBlockChecker : IStepChecker
6 | {
7 | public void CheckStep(ISequenceStep step)
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Checker/ExecutionChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.Checker
4 | {
5 | internal class ExecutionChecker : IStepChecker
6 | {
7 | public void CheckStep(ISequenceStep step)
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Checker/TimerBlockChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.Checker
4 | {
5 | internal class TimerBlockChecker : IStepChecker
6 | {
7 | public void CheckStep(ISequenceStep step)
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Utility/MessageUtil/IMessage.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.Serialization;
2 |
3 | namespace Testflow.Utility.MessageUtil
4 | {
5 | ///
6 | /// 消息类
7 | ///
8 | public interface IMessage : ISerializable
9 | {
10 | ///
11 | /// 会话ID
12 | ///
13 | int Id { get; }
14 | }
15 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Checker/ConditionLoopChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.Checker
4 | {
5 | internal class ConditionLoopChecker : IStepChecker
6 | {
7 | public void CheckStep(ISequenceStep step)
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Checker/SequenceCallChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.Checker
4 | {
5 | internal class SequenceCallChecker : IStepChecker
6 | {
7 | public void CheckStep(ISequenceStep step)
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Common/IEntityComponent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Data.Sequence;
3 |
4 | namespace Testflow.Usr
5 | {
6 | ///
7 | ///
8 | ///
9 | public interface IEntityComponent : IDisposable
10 | {
11 | ///
12 | /// 初始化组件
13 | ///
14 | void Initialize();
15 | }
16 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Checker/ConditionBlockChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.Checker
4 | {
5 | internal class ConditionBlockChecker : IStepChecker
6 | {
7 | public void CheckStep(ISequenceStep step)
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Checker/MultiThreadBlockChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.Checker
4 | {
5 | internal class MultiThreadBlockChecker : IStepChecker
6 | {
7 | public void CheckStep(ISequenceStep step)
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Checker/TryFinallyBlockChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.Checker
4 | {
5 | internal class TryFinallyBlockChecker : IStepChecker
6 | {
7 | public void CheckStep(ISequenceStep step)
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Serializer/Convertor/EnumConvertor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.SequenceManager.Serializer.Convertor
4 | {
5 | public class EnumConvertor
6 | {
7 | public static object ReadData(Type propertyType, string attribute)
8 | {
9 | return Enum.Parse(propertyType, attribute);
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Common/RuntimeTarget.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.CoreCommon.Common
2 | {
3 | public enum RuntimePlatform
4 | {
5 | ///
6 | /// 基于Clr运行的Host
7 | ///
8 | Clr = 0,
9 |
10 | ///
11 | /// 通用Host运行(支持跨主机、跨语言调用)
12 | ///
13 | Common = 1
14 | }
15 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Checker/ConditionStatementChecker.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.Checker
4 | {
5 | internal class ConditionStatementChecker : IStepChecker
6 | {
7 | public void CheckStep(ISequenceStep step)
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/RunTimeType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Runtime
2 | {
3 | ///
4 | /// 运行时类型
5 | ///
6 | public enum RuntimeType
7 | {
8 | ///
9 | /// 运行模式
10 | ///
11 | Run = 0,
12 |
13 | ///
14 | /// 调试模式
15 | ///
16 | Debug = 1
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/RunMode.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow
2 | {
3 | ///
4 | /// Testflow的运行模式
5 | ///
6 | public enum RunMode
7 | {
8 | ///
9 | /// 完整运行,启用所有模块
10 | ///
11 | Full = 0,
12 |
13 | ///
14 | /// 最小运行模式,只启动运行相关模块
15 | ///
16 | Minimal = 1
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/StepCreators/BatchBlockCreator.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.StepCreators
4 | {
5 | internal class BatchBlockCreator : SequenceStepCreator
6 | {
7 | protected override ISequenceStep CreateSequenceStep()
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/StepCreators/TimerBlockCreator.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.StepCreators
4 | {
5 | internal class TimerBlockCreator : SequenceStepCreator
6 | {
7 | protected override ISequenceStep CreateSequenceStep()
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/StepCreators/SequenceCallCreator.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.StepCreators
4 | {
5 | internal class SequenceCallCreator : SequenceStepCreator
6 | {
7 | protected override ISequenceStep CreateSequenceStep()
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequenceStepCollection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Testflow.Data.Sequence
8 | {
9 | ///
10 | /// 序列Step的集合
11 | ///
12 | public interface ISequenceStepCollection : IList
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/StepCreators/MultiThreadBlockCreator.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.SequenceManager.StepCreators
4 | {
5 | internal class MultiThreadBlockCreator : SequenceStepCreator
6 | {
7 | protected override ISequenceStep CreateSequenceStep()
8 | {
9 | throw new System.NotImplementedException();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Common/SerializationTarget.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Usr
2 | {
3 | ///
4 | /// 保存的目标
5 | ///
6 | public enum SerializationTarget
7 | {
8 | ///
9 | /// 序列化到文件
10 | ///
11 | File = 0,
12 |
13 | ///
14 | /// 序列化到数据库
15 | ///
16 | DataBase = 1
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/IParameterDataCollection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Testflow.Data.Sequence
8 | {
9 | ///
10 | /// 参数信息的集合
11 | ///
12 | public interface IParameterDataCollection : IList
13 | {
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/source/src/Dev/Utility/MessageUtil/ReceiveType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Utility.MessageUtil
2 | {
3 | ///
4 | /// 接收类型
5 | ///
6 | public enum ReceiveType
7 | {
8 | ///
9 | /// 异步接收
10 | ///
11 | Asynchronous = 0,
12 |
13 | ///
14 | /// 同步接收
15 | ///
16 | Synchronous = 1
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/ExecutionModel.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data
2 | {
3 | ///
4 | /// 执行模型,顺序执行/并行执行
5 | ///
6 | public enum ExecutionModel
7 | {
8 | ///
9 | /// 顺序执行
10 | ///
11 | SequentialExecution = 0,
12 |
13 | ///
14 | /// 并行执行
15 | ///
16 | ParallelExecution = 1
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/Utility/MessageUtil/MessengerType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Utility.MessageUtil
2 | {
3 | ///
4 | /// 信使类型
5 | ///
6 | public enum MessengerType
7 | {
8 | ///
9 | /// 使用MSMQ作为消息队列
10 | ///
11 | MSMQ = 0,
12 |
13 | ///
14 | /// 使用卡夫卡作为消息队列
15 | ///
16 | Kafka = 1,
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/StepCreators/ExecutionCreator.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 | using Testflow.SequenceManager.SequenceElements;
3 |
4 | namespace Testflow.SequenceManager.StepCreators
5 | {
6 | internal class ExecutionCreator : SequenceStepCreator
7 | {
8 | protected override ISequenceStep CreateSequenceStep()
9 | {
10 | return new SequenceStep();
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/source/src/Modules/DataMaintainer/Constants.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.DataMaintainer
2 | {
3 | internal static class Constants
4 | {
5 | public const string I18nName = "DataMaintainer";
6 | public const string DataBaseName = "testflowData.db3";
7 | public const string SqlFileName = "TestflowDb.sql";
8 | public const int CommandTimeout = 1000;
9 | public const int BlockTimeout = 10000;
10 | }
11 | }
--------------------------------------------------------------------------------
/source/src/Services/RuntimeService/ModuleErrorCode.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 |
4 | namespace Testflow.RuntimeService
5 | {
6 | public class ModuleErrorCode
7 | {
8 | public const int TestProjectDNE = 1 | CommonErrorCode.RuntimeErrorMask;
9 | public const int SequenceGroupDNE = 2 | CommonErrorCode.RuntimeErrorMask;
10 | public const int ServiceNotLoaded = 3 | CommonErrorCode.RuntimeErrorMask;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/source/test/Modules/EngineCoreTest/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Common/RunnerType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.CoreCommon.Common
2 | {
3 | ///
4 | /// 运行容器中的数据类型
5 | ///
6 | public enum RunnerType
7 | {
8 | ///
9 | /// 运行TestProject
10 | ///
11 | TestProject,
12 |
13 | ///
14 | /// 运行SequenceGroup
15 | ///
16 | SequenceGroup
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/TaskBreakException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Runtime
4 | {
5 | ///
6 | /// 任务停止异常。在运行中途抛出该异常将停止序列的执行
7 | ///
8 | public class TaskBreakException : ApplicationException
9 | {
10 | ///
11 | /// 创建TaskBreakException的实例
12 | ///
13 | public TaskBreakException() : base("Task running break.")
14 | { }
15 | }
16 | }
--------------------------------------------------------------------------------
/source/src/Modules/ParameterChecker/ModuleErrorCode.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.ParameterChecker
4 | {
5 | public static class ModuleErrorCode
6 | {
7 | public const int InvalidParent = 1 | CommonErrorCode.ParamCheckErrorMask;
8 | public const int VariableNotFound = 2 | CommonErrorCode.ParamCheckErrorMask;
9 | public const int InvalidType = 3 | CommonErrorCode.ParamCheckErrorMask;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/source/test/Modules/DataMaintainerTest/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/source/test/Modules/SequenceManagerTest/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/source/src/Modules/DataMaintainer/ModuleErrorCode.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.DataMaintainer
4 | {
5 | public static class ModuleErrorCode
6 | {
7 | public const int ConnectDbFailed = 1 | CommonErrorCode.DataMaintainErrorMask;
8 | public const int DbOperationFailed = 2 | CommonErrorCode.DataMaintainErrorMask;
9 | public const int DbOperationTimeout = 3 | CommonErrorCode.DataMaintainErrorMask;
10 | }
11 | }
--------------------------------------------------------------------------------
/source/src/Modules/ResultManager/ModuleErrorCode.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.ResultManager
4 | {
5 | public static class ModuleErrorCode
6 | {
7 | public const int InvalidFilePath = 1 | CommonErrorCode.ResultManageErrorMask;
8 | public const int IOError = 2 | CommonErrorCode.ResultManageErrorMask;
9 | public const int CustomWriterNonExistent = 3 | CommonErrorCode.ResultManageErrorMask;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/source/src/Services/DesigntimeService/ModuleErrorCode.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.DesigntimeService
4 | {
5 | public static class ModuleErrorCode
6 | {
7 | public const int InvalidEditOperation = 0 | CommonErrorCode.DesigntimeErrorMask;
8 | public const int DuplicateDefinition = 1 | CommonErrorCode.DesigntimeErrorMask;
9 | public const int TargetNotExist = 2 | CommonErrorCode.DesigntimeErrorMask;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Expression/ExpressionTypeData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml.Serialization;
3 |
4 | namespace Testflow.Data.Expression
5 | {
6 | ///
7 | /// 表达式类型信息
8 | ///
9 | [Serializable]
10 | public class ExpressionTypeData
11 | {
12 | [XmlAttribute]
13 | public string AssemblyPath { get; set; }
14 |
15 | [XmlAttribute]
16 | public string ClassName { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Modules/ConfigurationManager/Data/ConfigItem.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Testflow.ConfigurationManager.Data
4 | {
5 | [XmlType("ConfigurationPair")]
6 | public class ConfigItem
7 | {
8 | [XmlAttribute]
9 | public string Name { get; set; }
10 |
11 | [XmlAttribute]
12 | public string Value { get; set; }
13 |
14 | [XmlAttribute]
15 | public string Type { get; set; }
16 | }
17 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Description/IDescriptionData.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data.Description
2 | {
3 | ///
4 | /// Description对象的基类
5 | ///
6 | public interface IDescriptionData
7 | {
8 | ///
9 | /// 参数名称
10 | ///
11 | string Name { get; set; }
12 |
13 | ///
14 | /// 参数的功能描述
15 | ///
16 | string Description { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequenceDataContainer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Usr;
3 |
4 | namespace Testflow.Data.Sequence
5 | {
6 | ///
7 | /// 序列数据的父接口
8 | ///
9 | public interface ISequenceDataContainer : ISequenceElement, ICloneableClass
10 | {
11 | ///
12 | /// 使用所属序列对象初始化
13 | ///
14 | void Initialize(ISequenceFlowContainer parent);
15 | }
16 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/IVariableInitValue.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data.Sequence
2 | {
3 | ///
4 | /// 变量的初始值
5 | ///
6 | public interface IVariableInitValue : ISequenceDataContainer
7 | {
8 | ///
9 | /// 变量名称
10 | ///
11 | string Name { get; set; }
12 |
13 | ///
14 | /// 变量的值
15 | ///
16 | string Value { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/Common/DescriptionAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Usr.Common
4 | {
5 | ///
6 | /// 描述信息
7 | ///
8 | [AttributeUsage(AttributeTargets.All)]
9 | public class DescriptionAttribute : Attribute
10 | {
11 | public string Description { get; }
12 | public DescriptionAttribute(string description)
13 | {
14 | this.Description = description;
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/ArgumentModifier.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data
2 | {
3 | ///
4 | /// 参数的修饰符
5 | ///
6 | public enum ArgumentModifier
7 | {
8 | ///
9 | /// 无修饰符
10 | ///
11 | None = 0,
12 |
13 | ///
14 | /// 使用ref修饰
15 | ///
16 | Ref = 1,
17 |
18 | ///
19 | /// 使用out修饰
20 | ///
21 | Out = 2
22 | }
23 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Common/RuntimeTypeAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.SequenceManager.Common
4 | {
5 | ///
6 | /// 标记某个属性在运行时的真实类型
7 | ///
8 | [AttributeUsage(AttributeTargets.Property)]
9 | internal class RuntimeTypeAttribute : Attribute
10 | {
11 | public Type RealType { get; }
12 |
13 | public RuntimeTypeAttribute(Type realType)
14 | {
15 | this.RealType = realType;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Modules/IModuleConfigData.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.Modules
4 | {
5 | ///
6 | /// 参数配置
7 | ///
8 | public interface IModuleConfigData : IPropertyExtendable
9 | {
10 | ///
11 | /// 配置模型的版本号
12 | ///
13 | string Version { get; set; }
14 |
15 | ///
16 | /// 配置对象的名称,等于对应模块接口的类名
17 | ///
18 | string Name { get; set; }
19 | }
20 | }
--------------------------------------------------------------------------------
/source/src/Dev/Utility/MessageUtil/IMessageConsumer.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Utility.MessageUtil
2 | {
3 | ///
4 | /// 消息的消费者接口
5 | ///
6 | public interface IMessageConsumer
7 | {
8 | ///
9 | /// 会话ID
10 | ///
11 | int SessionId { get; }
12 |
13 | ///
14 | /// 处理接收到的消息
15 | ///
16 | /// 待处理的消息
17 | void Handle(IMessage message);
18 | }
19 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/Message/IMessageHandler.cs:
--------------------------------------------------------------------------------
1 | using Testflow.CoreCommon.Messages;
2 | using Testflow.Utility.MessageUtil;
3 |
4 | namespace Testflow.MasterCore.Message
5 | {
6 | internal interface IMessageHandler
7 | {
8 | ///
9 | /// 同步处理消息
10 | ///
11 | bool HandleMessage(MessageBase message);
12 |
13 | ///
14 | /// 异步添加消息到待处理队列
15 | ///
16 | void AddToQueue(MessageBase message);
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Common/ISerializableMap.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Runtime.Serialization;
3 | using System.Xml.Serialization;
4 |
5 | namespace Testflow.Usr
6 | {
7 | ///
8 | /// 可序列化的键值集合
9 | ///
10 | /// 键类型
11 | /// 数值类型
12 | public interface ISerializableMap : IDictionary, ISerializable
13 | {
14 |
15 | }
16 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Common/MQIgnoreAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.CoreCommon.Common
4 | {
5 | [AttributeUsage(AttributeTargets.Property)]
6 | public class MQIgnoreAttribute : Attribute
7 | {
8 | public bool Ignore { get; }
9 |
10 | public MQIgnoreAttribute()
11 | {
12 | this.Ignore = true;
13 | }
14 |
15 | public MQIgnoreAttribute(bool ignore)
16 | {
17 | this.Ignore = ignore;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/IRuntimeConfiguration.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.Runtime
4 | {
5 | ///
6 | /// 运行器配置接口
7 | ///
8 | public interface IRuntimeConfiguration : IPropertyExtendable
9 | {
10 | ///
11 | /// 运行时类型,运行/调试
12 | ///
13 | RuntimeType Type { get; set; }
14 |
15 | ///
16 | /// 状态更新周期,单位为ms
17 | ///
18 | int StatusTransCycle { get; set; }
19 | }
20 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Common/RuntimeElementTypeAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.SequenceManager.Common
4 | {
5 | ///
6 | /// 标记某个集合类运行时的元素类型
7 | ///
8 | [AttributeUsage(AttributeTargets.Class)]
9 | internal class RuntimeElementTypeAttribute : Attribute
10 | {
11 | public Type RealType { get; }
12 |
13 | public RuntimeElementTypeAttribute(Type realType)
14 | {
15 | this.RealType = realType;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/Utility/MessageUtil/FormatterType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Utility.MessageUtil
2 | {
3 | ///
4 | /// 格式化器的类型
5 | ///
6 | public enum FormatterType
7 | {
8 | ///
9 | /// Xml类型的格式化器
10 | ///
11 | Xml = 0,
12 |
13 | ///
14 | /// 二进制类型的格式化器
15 | ///
16 | Bin = 1,
17 |
18 | ///
19 | /// json类型的格式化器
20 | ///
21 | Json = 2
22 | }
23 | }
--------------------------------------------------------------------------------
/source/src/Modules/DataMaintainer/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Common/TestGenState.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.CoreCommon.Common
2 | {
3 | ///
4 | /// 测试生成状态
5 | ///
6 | public enum TestGenState
7 | {
8 | ///
9 | /// 开始生成
10 | ///
11 | StartGeneration = 0,
12 |
13 | ///
14 | /// 结束
15 | ///
16 | GenerationOver = 1,
17 |
18 | ///
19 | /// 错误
20 | ///
21 | Error = 2
22 | }
23 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Common/GenericCollectionAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.SequenceManager.Common
4 | {
5 | ///
6 | /// 标记某个集合类在运行时的真实元素类型
7 | ///
8 | [AttributeUsage(AttributeTargets.Class)]
9 | internal class GenericCollectionAttribute : Attribute
10 | {
11 | public Type GenericType { get; }
12 |
13 | public GenericCollectionAttribute(Type genericType)
14 | {
15 | this.GenericType = genericType;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/ObjectManage/Objects/BreakPointObject.cs:
--------------------------------------------------------------------------------
1 | using Testflow.CoreCommon.Common;
2 | using Testflow.CoreCommon.Data;
3 | using Testflow.MasterCore.Common;
4 |
5 | namespace Testflow.MasterCore.ObjectManage.Objects
6 | {
7 | internal class BreakPointObject : RuntimeObject
8 | {
9 | public CallStack BreakPoint { get; }
10 |
11 | public BreakPointObject(CallStack breakPoint) : base(Constants.BreakPointObjectName)
12 | {
13 | this.BreakPoint = breakPoint;
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Expression/OperatorAdapterComparer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Testflow.SequenceManager.Expression
4 | {
5 | internal class OperatorAdapterComparer : IComparer
6 | {
7 | // 从打到小排序
8 | public int Compare(OperatorAdapter x, OperatorAdapter y)
9 | {
10 | if (x.Priority == y.Priority)
11 | {
12 | return 0;
13 | }
14 | return x.Priority > y.Priority ? 1 : -1;
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/CallBackType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Testflow.Data
8 | {
9 | ///
10 | /// 回调函数同步或者异步类型
11 | ///
12 | public enum CallBackType
13 | {
14 | ///
15 | /// 同步
16 | ///
17 | Synchronous = 1,
18 |
19 | ///
20 | /// 异步
21 | ///
22 | Asynchronous = 2
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/source/src/Modules/ResultManager/JsonWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Data;
3 |
4 | namespace Testflow.ResultManager
5 | {
6 | internal class JsonWriter : IResultPrinter
7 | {
8 | ///
9 | /// 输出TestInstance的json report
10 | ///
11 | ///
12 | public void PrintReport(string filePath, string runtimeHash)
13 | {
14 | //todo
15 | throw new NotImplementedException("not implemented yet");
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/source/src/Modules/ResultManager/XMLWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Data;
3 |
4 | namespace Testflow.ResultManager
5 | {
6 | internal class XMLWriter : IResultPrinter
7 | {
8 | ///
9 | /// 输出TestInstance的report到xml文件
10 | ///
11 | ///
12 | public void PrintReport(string filePath, string runtimeHash)
13 | {
14 | //todo
15 | throw new NotImplementedException("not implemented yet");
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/source/src/Dev/Logger/ModuleErrorCode.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.Logger
4 | {
5 | ///
6 | /// 模块异常码
7 | ///
8 | public static class ModuleErrorCode
9 | {
10 | ///
11 | /// 日志队列初始化失败
12 | ///
13 | public const int LogQueueInitFailed = 1 | CommonErrorCode.LogErrorMask;
14 |
15 | ///
16 | /// 非法日志参数
17 | ///
18 | public const int InvalidLogArgument = 2 | CommonErrorCode.LogErrorMask;
19 | }
20 | }
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/Common/HideAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Usr.Common
4 | {
5 | ///
6 | /// 是否隐藏某个类/属性/方法
7 | ///
8 | [AttributeUsage(AttributeTargets.All)]
9 | public class HideAttribute : Attribute
10 | {
11 | public bool Hide { get; }
12 | public HideAttribute()
13 | {
14 | this.Hide = false;
15 | }
16 |
17 | public HideAttribute(bool isHide)
18 | {
19 | this.Hide = isHide;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/source/src/Modules/ComInterfaceManager/Data/PropertyDescription.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Data;
3 | using Testflow.Data.Description;
4 |
5 | namespace Testflow.ComInterfaceManager.Data
6 | {
7 | [Serializable]
8 | public class PropertyDescription : IPropertyDescription
9 | {
10 | public string Name { get; set; }
11 | public string Description { get; set; }
12 | public VariableType ArgumentType { get; set; }
13 | public ITypeData Type { get; set; }
14 | public string DefaultValue { get; set; }
15 | }
16 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Data/StepExecutionInfo.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Runtime.Data;
2 | using Testflow.SlaveCore.Runner.Model;
3 |
4 | namespace Testflow.SlaveCore.Data
5 | {
6 | internal class StepExecutionInfo
7 | {
8 | public StepResult StepResult { get; set; }
9 |
10 | public StepTaskEntityBase StepEntity { get; }
11 |
12 | public StepExecutionInfo(StepTaskEntityBase stepEntity, StepResult result)
13 | {
14 | this.StepEntity = stepEntity;
15 | this.StepResult = result;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Modules/ConfigurationManager/Data/ConfigBlock.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace Testflow.ConfigurationManager.Data
5 | {
6 | [XmlType("ModuleConfiguration")]
7 | public class ConfigBlock
8 | {
9 | public ConfigBlock()
10 | {
11 | this.ConfigItems = new List(10);
12 | }
13 |
14 | [XmlAttribute]
15 | public string Name { get; set; }
16 |
17 | [XmlElement]
18 | public List ConfigItems { get; set; }
19 | }
20 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/IDebugInformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Testflow.Usr;
4 | using Testflow.Data.Sequence;
5 |
6 | namespace Testflow.Runtime
7 | {
8 | ///
9 | /// 调试信息
10 | ///
11 | public interface IDebugInformation
12 | {
13 | ///
14 | /// 断点命中信息
15 | ///
16 | ICallStack BreakPoint { get; }
17 |
18 | ///
19 | /// 变量调试信息
20 | ///
21 | IDictionary WatchDatas { get; }
22 | }
23 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Runner/Model/GotoStepEntity.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 | using Testflow.SlaveCore.Common;
3 |
4 | namespace Testflow.SlaveCore.Runner.Model
5 | {
6 | internal class GotoStepEntity : StepTaskEntityBase
7 | {
8 | public GotoStepEntity(ISequenceStep step, SlaveContext context, int sequenceIndex) : base(step, context, sequenceIndex)
9 | {
10 | }
11 |
12 | protected override void InvokeStepSingleTime(bool forceInvoke)
13 | {
14 | throw new System.NotImplementedException();
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Data/EventInfos/SyncEventInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Usr;
3 | using Testflow.CoreCommon.Common;
4 | using Testflow.CoreCommon.Messages;
5 |
6 | namespace Testflow.CoreCommon.Data.EventInfos
7 | {
8 | // TODO 目前仅关心是否被阻塞,不关心其他细节。
9 | public class SyncEventInfo : EventInfoBase
10 | {
11 | public bool IsAcquireOperation { get; }
12 | public SyncEventInfo(ResourceSyncMessage message) : base(message.Id, EventType.Sync, message.Time)
13 | {
14 | IsAcquireOperation = message.Acquired;
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Runner/Convertors/DateTimeConvertor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Usr;
3 |
4 | namespace Testflow.SlaveCore.Runner.Convertors
5 | {
6 | internal class DateTimeConvertor : ValueConvertorBase
7 | {
8 | protected override void InitializeConvertFuncs()
9 | {
10 | ConvertFuncs.Add(typeof(string).Name, sourceValue => ((DateTime)sourceValue).ToString(CommonConst.GlobalTimeFormat));
11 | }
12 |
13 | public override object GetDefaultValue()
14 | {
15 | return DateTime.MinValue;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/IResultPrinter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Testflow.Data
8 | {
9 | //打印类接口用于给用户自定义打印类与方法
10 | //默认有三种输出方法:txt,xml,json
11 | //目前只实现.txt
12 | public interface IResultPrinter
13 | {
14 | ///
15 | /// 报表生成
16 | ///
17 | /// 文件路径
18 | /// 运行时哈希
19 | void PrintReport(string filePath, string runtimeHash);
20 | }
21 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/ReportType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data
2 | {
3 | ///
4 | /// 报表类型生成
5 | ///
6 | public enum ReportType
7 | {
8 | ///
9 | /// .txt格式
10 | ///
11 | txt = 1,
12 |
13 | ///
14 | /// .xml格式
15 | ///
16 | xml = 2,
17 |
18 | ///
19 | /// .json格式
20 | ///
21 | json = 3,
22 |
23 | ///
24 | /// 自定义格式
25 | ///
26 | custom = 4
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Runner/Model/SequenceCallStepEntity.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 | using Testflow.SlaveCore.Common;
3 |
4 | namespace Testflow.SlaveCore.Runner.Model
5 | {
6 | internal class SequenceCallStepEntity : StepTaskEntityBase
7 | {
8 | public SequenceCallStepEntity(ISequenceStep step, SlaveContext context, int sequenceIndex) : base(step, context, sequenceIndex)
9 | {
10 | }
11 |
12 | protected override void InvokeStepSingleTime(bool forceInvoke)
13 | {
14 | throw new System.NotImplementedException();
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/source/packages/Castle.Core.4.3.1/readme.txt:
--------------------------------------------------------------------------------
1 | Thanks for downloading this Castle package.
2 | You can find full list of changes in CHANGELOG.md
3 |
4 | Documentation (work in progress, contributions appreciated):
5 | DictionaryAdapter: https://github.com/castleproject/Core/blob/master/docs/dictionaryadapter.md
6 | DynamicProxy: https://github.com/castleproject/Core/blob/master/docs/dynamicproxy.md
7 | Discussion group: http://groups.google.com/group/castle-project-users
8 | StackOverflow tags: castle-dynamicproxy, castle-dictionaryadapter, castle
9 |
10 | Issue tracker: https://github.com/castleproject/Core/issues
--------------------------------------------------------------------------------
/source/src/Modules/ComInterfaceManager/Constants.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Utility.I18nUtil;
2 |
3 | namespace Testflow.ComInterfaceManager
4 | {
5 | internal class Constants
6 | {
7 | public const string I18nName = "commanager";
8 |
9 | public const string LibFileFilter = "*.dll";
10 |
11 | public const string AppDomainName = "tfInterfaceLoader";
12 |
13 | public const int MaxAssemblyCount = 100;
14 |
15 | public const string SetPrefix = "set_";
16 | public const string GetPrefix = "get_";
17 |
18 | public const string DefaultVersion = "0.0.0.0";
19 |
20 | }
21 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/ICallStack.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Data.Sequence;
3 |
4 | namespace Testflow.Runtime
5 | {
6 | ///
7 | /// 调用堆栈
8 | ///
9 | public interface ICallStack
10 | {
11 | ///
12 | /// 会话索引号
13 | ///
14 | int Session { get; }
15 |
16 | ///
17 | /// 被调用测试序列
18 | ///
19 | int Sequence { get; }
20 |
21 | ///
22 | /// 序列步骤调用堆栈
23 | ///
24 | IList StepStack { get; }
25 | }
26 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/Data/ITestGenerationInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Usr;
3 |
4 | namespace Testflow.Runtime.Data
5 | {
6 | ///
7 | /// 测试生成信息
8 | ///
9 | public interface ITestGenerationInfo : ICloneableClass
10 | {
11 | ///
12 | /// 测试生成状态信息
13 | ///
14 | IList GenerationInfos { get; }
15 |
16 | ///
17 | /// TestProject根节点的生成信息
18 | ///
19 | ISessionGenerationInfo RootGenerationInfo { get; }
20 | }
21 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Coroutine/CoroutineState.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.SlaveCore.Coroutine
2 | {
3 | ///
4 | /// 协程运行状态
5 | ///
6 | internal enum CoroutineState
7 | {
8 | ///
9 | /// 空闲
10 | ///
11 | Idle = 0,
12 |
13 | ///
14 | /// 运行中
15 | ///
16 | Running = 1,
17 |
18 | ///
19 | /// 阻塞
20 | ///
21 | Blocked = 2,
22 |
23 | ///
24 | /// 结束
25 | ///
26 | Over = 3
27 | }
28 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Common/SerializationOrderAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.SequenceManager.Common
4 | {
5 | ///
6 | /// 配置在序列化过程中某个属性的顺序,如果序列化的属性未配置该字段,则这些属性排在最后
7 | ///
8 | [AttributeUsage(AttributeTargets.Property)]
9 | internal class SerializationOrderAttribute : Attribute
10 | {
11 | ///
12 | /// 配置序列化时该元素的位置,从0开始,数字越小越靠前
13 | ///
14 | public int Order { get; }
15 | public SerializationOrderAttribute(int order)
16 | {
17 | this.Order = order;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/RecordLevel.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data
2 | {
3 | ///
4 | /// 中间数据的保存级别
5 | ///
6 | public enum RecordLevel
7 | {
8 | ///
9 | /// 不保存
10 | ///
11 | None = 0,
12 |
13 | ///
14 | /// 保存最终结果
15 | ///
16 | FinalResult = 1,
17 |
18 | ///
19 | /// 保存被变更的每个过程的值
20 | ///
21 | Trace = 2,
22 |
23 | ///
24 | /// 无论任何step返回状态,只要该变量可用则返回值
25 | ///
26 | FullTrace = 3
27 | }
28 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/GenerationStatus.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Runtime
2 | {
3 | ///
4 | /// 测试生成状态
5 | ///
6 | public enum GenerationStatus
7 | {
8 | ///
9 | /// 待生成
10 | ///
11 | Idle = 0,
12 |
13 | ///
14 | /// 正在生成的过程
15 | ///
16 | InProgress = 1,
17 |
18 | ///
19 | /// 生成成功
20 | ///
21 | Success = 2,
22 |
23 | ///
24 | /// 生成失败
25 | ///
26 | Failed = 3
27 | }
28 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/ObjectManage/RuntimeObject.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 |
3 | namespace Testflow.MasterCore.ObjectManage
4 | {
5 | public abstract class RuntimeObject
6 | {
7 | private static long _nextId;
8 |
9 | static RuntimeObject()
10 | {
11 | _nextId = -1;
12 | }
13 |
14 | public string ObjectName { get; }
15 |
16 | public long Id { get; }
17 |
18 | protected RuntimeObject(string objectName)
19 | {
20 | this.Id = Interlocked.Increment(ref _nextId);
21 | this.ObjectName = objectName;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ParameterType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data.Sequence
2 | {
3 | ///
4 | /// 参数类型,值/变量引用
5 | ///
6 | public enum ParameterType
7 | {
8 | ///
9 | /// 不可用
10 | ///
11 | NotAvailable = -1,
12 |
13 | ///
14 | /// 参数是直接传值
15 | ///
16 | Value = 0,
17 |
18 | ///
19 | /// 参数是传的变量
20 | ///
21 | Variable = 1,
22 |
23 | ///
24 | /// 表达式类型
25 | ///
26 | Expression = 2
27 | }
28 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/RunBehavior.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data.Sequence
2 | {
3 | ///
4 | /// 运行行为,正常运行/跳过/强制成功/强制失败
5 | ///
6 | public enum RunBehavior
7 | {
8 | ///
9 | /// 正常运行
10 | ///
11 | Normal = 0,
12 |
13 | ///
14 | /// 跳过该步骤
15 | ///
16 | Skip = 1,
17 |
18 | ///
19 | /// 强制成功
20 | ///
21 | ForceSuccess = 2,
22 |
23 | ///
24 | /// 强制失败
25 | ///
26 | ForceFailed = 3
27 | }
28 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Description/IPropertyDescription.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Data.Description
4 | {
5 | ///
6 | /// 属性描述接口
7 | ///
8 | public interface IPropertyDescription : IDescriptionData
9 | {
10 | ///
11 | /// 属于那种类型
12 | ///
13 | VariableType ArgumentType { get; set; }
14 |
15 | ///
16 | /// 对应的Type对象
17 | ///
18 | ITypeData Type { get; set; }
19 |
20 | ///
21 | /// 参数默认值
22 | ///
23 | string DefaultValue { get; set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/ObjectManage/Objects/WatchDataObject.cs:
--------------------------------------------------------------------------------
1 | using Testflow.MasterCore.Common;
2 |
3 | namespace Testflow.MasterCore.ObjectManage.Objects
4 | {
5 | internal class WatchDataObject : RuntimeObject
6 | {
7 | public int Session { get; }
8 |
9 | public int Sequence { get; }
10 |
11 | public string WatchData { get; }
12 |
13 | public WatchDataObject(int session, int sequence, string watchData) : base(Constants.WatchDataObjectName)
14 | {
15 | this.Session = session;
16 | this.Sequence = sequence;
17 | this.WatchData = watchData;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/StepCreators/ConditionStatementCreator.cs:
--------------------------------------------------------------------------------
1 |
2 | using Testflow.Data.Sequence;
3 | using Testflow.SequenceManager.SequenceElements;
4 |
5 | namespace Testflow.SequenceManager.StepCreators
6 | {
7 | internal class ConditionStatementCreator : SequenceStepCreator
8 | {
9 | protected override ISequenceStep CreateSequenceStep()
10 | {
11 | SequenceStep step = new SequenceStep()
12 | {
13 | StepType = SequenceStepType.ConditionStatement,
14 | SubSteps = new SequenceStepCollection()
15 | };
16 | return step;
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/source/packages/Castle.Core.4.3.1/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2004-2016 Castle Project - http://www.castleproject.org/
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
--------------------------------------------------------------------------------
/source/src/Modules/ConfigurationManager/Data/ConfigData.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace Testflow.ConfigurationManager.Data
5 | {
6 | [XmlType("ConfigurationData")]
7 | public class ConfigData
8 | {
9 | public ConfigData()
10 | {
11 | this.ModuleConfigData = new List(10);
12 | }
13 |
14 | [XmlAttribute]
15 | public string Name { get; set; }
16 |
17 | [XmlAttribute]
18 | public string ConfigVersion { get; set; }
19 |
20 | [XmlElement]
21 | public List ModuleConfigData { get; set; }
22 | }
23 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/ObjectManage/Objects/EvaluationObject.cs:
--------------------------------------------------------------------------------
1 | using Testflow.MasterCore.Common;
2 |
3 | namespace Testflow.MasterCore.ObjectManage.Objects
4 | {
5 | internal class EvaluationObject : RuntimeObject
6 | {
7 | public int Session { get; }
8 |
9 | public int Sequence { get; }
10 |
11 | public string Expression { get; }
12 |
13 | public EvaluationObject(int session, int sequence, string expression) : base(Constants.EvaluationObjectName)
14 | {
15 | this.Session = session;
16 | this.Sequence = sequence;
17 | this.Expression = expression;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/FailedAction.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data
2 | {
3 | ///
4 | /// Step执行失败后的行为
5 | ///
6 | public enum FailedAction
7 | {
8 | ///
9 | /// 序列执行终止
10 | ///
11 | Terminate = 0,
12 |
13 | ///
14 | /// 序列继续运行
15 | ///
16 | Continue = 1,
17 |
18 | ///
19 | /// 跳出循环,只在n层上级Step为Loop的情况下使能
20 | ///
21 | BreakLoop = 2,
22 |
23 | ///
24 | /// 跳出当前运行并进入下次循环,只在n层上级Step为Loop的情况下使能
25 | ///
26 | NextLoop = 3
27 | }
28 | }
--------------------------------------------------------------------------------
/source/src/Modules/ComInterfaceManager/Data/TypeDescription.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Testflow.Data;
4 | using Testflow.Data.Description;
5 |
6 | namespace Testflow.ComInterfaceManager.Data
7 | {
8 | [Serializable]
9 | public class TypeDescription : ITypeDescription
10 | {
11 | public string AssemblyName { get; set; }
12 | public string Namespace { get; set; }
13 | public string Name { get; set; }
14 | public string Description { get; set; }
15 | public VariableType Kind { get; set; }
16 | public string Category { get; set; }
17 | public string[] Enumerations { get; set; }
18 | }
19 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Data/EventInfos/EventType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.CoreCommon.Data.EventInfos
2 | {
3 | public enum EventType
4 | {
5 | ///
6 | /// 内部异常
7 | ///
8 | Exception = -1,
9 |
10 | ///
11 | /// 测试生成
12 | ///
13 | TestGen = 0,
14 |
15 | ///
16 | /// 同步消息
17 | ///
18 | Sync = 1,
19 |
20 | ///
21 | /// 调试状态消息
22 | ///
23 | Debug = 2,
24 |
25 | ///
26 | /// 用户停止
27 | ///
28 | Abort = 3
29 | }
30 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/TestflowContext.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 |
3 | namespace Testflow
4 | {
5 | ///
6 | /// Testflow平台的上下文信息
7 | ///
8 | public class TestflowContext
9 | {
10 | private int _stateValue;
11 | ///
12 | /// 平台当前状态
13 | ///
14 | public TestflowStates State
15 | {
16 | get { return (TestflowStates) _stateValue; }
17 | set { Thread.VolatileWrite(ref _stateValue, (int) value); }
18 | }
19 |
20 | internal TestflowContext()
21 | {
22 | this._stateValue = (int) TestflowStates.Unavailable;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/Common/CallBackAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Data;
3 |
4 | namespace Testflow.Usr.Common
5 | {
6 | ///
7 | /// 回调类型注解
8 | ///
9 | [AttributeUsage(AttributeTargets.Method)]
10 | public class CallBackAttribute : Attribute
11 | {
12 | ///
13 | /// 回调类型
14 | ///
15 | public CallBackAttribute(CallBackType callBackType)
16 | {
17 | this.CallBackType = callBackType;
18 | }
19 |
20 | ///
21 | /// 回调类型,同步还是异步
22 | ///
23 | public CallBackType CallBackType { get; }
24 | }
25 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Data/EventInfos/EventInfoBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Utility.MessageUtil;
3 |
4 | namespace Testflow.CoreCommon.Data.EventInfos
5 | {
6 | ///
7 | /// 引擎内部的事件基类
8 | ///
9 | public abstract class EventInfoBase
10 | {
11 | public int Session { get; }
12 |
13 | public EventType Type { get; }
14 |
15 | public DateTime TimeStamp { get; }
16 |
17 | public EventInfoBase(int session, EventType type, DateTime timeStamp)
18 | {
19 | this.Session = session;
20 | this.Type = type;
21 | this.TimeStamp = timeStamp;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Common/RuntimeSerializeIgnoreAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.SequenceManager.Common
4 | {
5 | ///
6 | /// 标记某个属性或者类在运行时序列化时是否应该被忽略
7 | ///
8 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)]
9 | internal class RuntimeSerializeIgnoreAttribute : Attribute
10 | {
11 | public bool Ignore { get; }
12 |
13 | public RuntimeSerializeIgnoreAttribute(bool ignore)
14 | {
15 | this.Ignore = ignore;
16 | }
17 |
18 | public RuntimeSerializeIgnoreAttribute()
19 | {
20 | this.Ignore = true;
21 | }
22 |
23 | }
24 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Expression/IExpressionCalculator.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Modules;
2 |
3 | namespace Testflow.Data.Expression
4 | {
5 | ///
6 | /// 表达式函数接口
7 | ///
8 | public interface IExpressionCalculator
9 | {
10 | ///
11 | /// 表达式描述符
12 | ///
13 | string Operator { get; }
14 |
15 | ///
16 | /// 判断待测试的数据类型是否匹配
17 | ///
18 | bool IsValueTypeValid(object sourceValue, params object[] arguments);
19 |
20 | ///
21 | /// 计算表达式结果
22 | ///
23 | object Calculate(object sourceValue, params object[] arguments);
24 | }
25 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Modules/IConfigurationManager.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.Modules
4 | {
5 | ///
6 | /// 配置管理模块
7 | ///
8 | public interface IConfigurationManager : IController
9 | {
10 | ///
11 | /// 全局信息
12 | ///
13 | IPropertyExtendable GlobalInfo { get; set; }
14 |
15 | ///
16 | /// 加载模块配置数据
17 | ///
18 | void LoadConfigurationData();
19 |
20 | ///
21 | /// 为模块写入配置数据
22 | ///
23 | ///
24 | void ApplyConfigData(IController controller);
25 | }
26 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/Data/ISessionGenerationInfo.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.Runtime.Data
4 | {
5 | ///
6 | /// 序列测试生成信息
7 | ///
8 | public interface ISessionGenerationInfo : ICloneableClass
9 | {
10 | ///
11 | /// 会话ID
12 | ///
13 | int Session { get; }
14 |
15 | ///
16 | /// 测试生成状态信息
17 | ///
18 | ISerializableMap SequenceStatus { get; }
19 |
20 | ///
21 | /// Sequence整体的生成状态
22 | ///
23 | GenerationStatus Status { get; set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Expression/IExpressionElement.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.Data.Expression
4 | {
5 | ///
6 | /// 表达式元素
7 | ///
8 | public interface IExpressionElement : ISequenceDataContainer
9 | {
10 | ///
11 | /// 表达式元素的类型
12 | ///
13 | ParameterType Type { get; set; }
14 |
15 | ///
16 | /// 表达式元素的值,仅在Type为Value或Variable时生效
17 | ///
18 | string Value { get; set; }
19 |
20 | ///
21 | /// 表达式元素的值,仅在Type为Expression时生效
22 | ///
23 | IExpressionData Expression { get; set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/VariableType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data
2 | {
3 | ///
4 | /// 值的类型
5 | ///
6 | public enum VariableType
7 | {
8 | ///
9 | /// 未确定的类型
10 | ///
11 | Undefined = -1,
12 |
13 | ///
14 | /// 值类型
15 | ///
16 | Value = 0,
17 |
18 | ///
19 | /// 类类型
20 | ///
21 | Class = 1,
22 |
23 | ///
24 | /// 结构体类型
25 | ///
26 | Struct = 2,
27 |
28 | ///
29 | /// 枚举
30 | ///
31 | Enumeration = 3,
32 | }
33 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/I18nUtil/I18NOptionComparer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Testflow.Usr.I18nUtil
4 | {
5 | internal class I18NOptionComparer : IEqualityComparer
6 | {
7 | public bool Equals(I18NOption elem1, I18NOption elem2)
8 | {
9 | return elem1.FirstLanguageFile.Equals(elem2.FirstLanguageFile) && elem1.SecondLanguageFile.Equals(elem2.SecondLanguageFile) &&
10 | elem1.FirstLanguage.Equals(elem2.FirstLanguage) && elem1.SecondLanguage.Equals(elem2.SecondLanguage);
11 | }
12 |
13 | public int GetHashCode(I18NOption option)
14 | {
15 | return option.ToString().GetHashCode();
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Modules/IResultManager.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data;
2 |
3 | namespace Testflow.Modules
4 | {
5 | ///
6 | /// 结果管理模块
7 | ///
8 | public interface IResultManager : IController
9 | {
10 | ///
11 | /// 根据用户所指定文件类型输出报告
12 | ///
13 | /// 文件路径
14 | /// 运行时哈希值
15 | /// 报告类型枚举,有txt文件,xml文件,json文件,和自定义报告
16 | /// 可选参数,用于当reportType为custom的时候
17 | void PrintReport(string filePath, string runtimeHash, ReportType reportType, IResultPrinter customPrinter = null);
18 | }
19 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/IHostInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Usr;
3 |
4 | namespace Testflow.Runtime
5 | {
6 | ///
7 | /// 主机信息
8 | ///
9 | public interface IHostInfo : IPropertyExtendable
10 | {
11 | ///
12 | /// 主机名称
13 | ///
14 | string Name { get; }
15 |
16 | ///
17 | /// MAC地址
18 | ///
19 | string MacAddress { get; }
20 |
21 | ///
22 | /// IP地址
23 | ///
24 | string IpAddress { get; }
25 |
26 | ///
27 | /// 用户名
28 | ///
29 | string UserName { get; }
30 | }
31 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/SequenceElements/SequenceGroupLocationInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.SequenceManager.Common;
3 |
4 | namespace Testflow.SequenceManager.SequenceElements
5 | {
6 | [Serializable]
7 | [RuntimeSerializeIgnore]
8 | public class SequenceGroupLocationInfo
9 | {
10 | public SequenceGroupLocationInfo()
11 | {
12 | this.Name = string.Empty;
13 | this.SequenceFilePath = string.Empty;
14 | this.ParameterFilePath = string.Empty;
15 | }
16 |
17 | public string Name { get; set; }
18 |
19 | public string SequenceFilePath { get; set; }
20 |
21 | public string ParameterFilePath { get; set; }
22 | }
23 | }
--------------------------------------------------------------------------------
/source/test/Modules/EngineCoreTestLib/CallBackForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace EngineCoreTestLib
12 | {
13 | public partial class CallBackForm : Form
14 | {
15 | public CallBackForm()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | public CallBackForm(int x, int y)
21 | {
22 | InitializeComponent();
23 | label1.Text = x.ToString();
24 | label2.Text = y.ToString();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/source/src/Dev/Common/Modules/I18nUtil/I18NOptionComparer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Testflow.Usr.I18nUtil
4 | {
5 | internal class I18NOptionComparer : IEqualityComparer
6 | {
7 | public bool Equals(I18NOption elem1, I18NOption elem2)
8 | {
9 | return elem1.FirstLanguageFile.Equals(elem2.FirstLanguageFile) && elem1.SecondLanguageFile.Equals(elem2.SecondLanguageFile) &&
10 | elem1.FirstLanguage.Equals(elem2.FirstLanguage) && elem1.SecondLanguage.Equals(elem2.SecondLanguage);
11 | }
12 |
13 | public int GetHashCode(I18NOption option)
14 | {
15 | return option.ToString().GetHashCode();
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/source/src/Modules/ComInterfaceManager/Data/ArgumentDescription.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Data;
3 | using Testflow.Data.Description;
4 |
5 | namespace Testflow.ComInterfaceManager.Data
6 | {
7 | [Serializable]
8 | public class ArgumentDescription : IArgumentDescription
9 | {
10 | public string Name { get; set; }
11 | public string Description { get; set; }
12 | public VariableType ArgumentType { get; set; }
13 | public ITypeData Type { get; set; }
14 | public ITypeDescription TypeDescription { get; set; }
15 | public ArgumentModifier Modifier { get; set; }
16 | public string DefaultValue { get; set; }
17 | public bool IsOptional { get; set; }
18 | }
19 | }
--------------------------------------------------------------------------------
/source/src/Dev/Utility/ModuleErrorCode.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.Utility
4 | {
5 | ///
6 | /// 模块异常码定义
7 | ///
8 | public class ModuleErrorCode
9 | {
10 | ///
11 | /// 国际化模块运行时异常
12 | ///
13 | public const int I18nRuntimeError = 1 | CommonErrorCode.UtilityErrorMask;
14 |
15 | ///
16 | /// 消息队列接收错误
17 | ///
18 | public const int MessengerReceiveError = 100 | CommonErrorCode.UtilityErrorMask;
19 |
20 | ///
21 | /// 消息队列接收错误
22 | ///
23 | public const int SequenceDataError = 200 | CommonErrorCode.UtilityErrorMask;
24 | }
25 | }
--------------------------------------------------------------------------------
/source/test/Modules/EngineCoreTestLib/CallBackClass.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 | using Testflow.Usr.Common;
8 | using Testflow.Data;
9 |
10 | namespace EngineCoreTestLib
11 | {
12 | public static class CallBackClass
13 | {
14 | [CallBack(CallBackType.Asynchronous)]
15 | public static void StartForm()
16 | {
17 | Application.Run(new CallBackForm());
18 | }
19 |
20 | [CallBack(CallBackType.Synchronous)]
21 | public static void StartForm(int x, int y)
22 | {
23 | Application.Run(new CallBackForm(x, y));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Common/SerializationIgnoreAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.SequenceManager.Common
4 | {
5 | ///
6 | /// 标记某个类在序列化保存时是否被忽略
7 | ///
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)]
9 | internal class SerializationIgnoreAttribute : Attribute
10 | {
11 | public SerializationIgnoreAttribute()
12 | {
13 | this.Ignore = false;
14 | }
15 |
16 | public SerializationIgnoreAttribute(bool ignore)
17 | {
18 | this.Ignore = ignore;
19 | }
20 |
21 | ///
22 | /// 该属性序列化和反序列化时是否被忽略
23 | ///
24 | public bool Ignore { get; }
25 | }
26 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Runner/Model/BatchBlockStepEntity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Data.Sequence;
3 | using Testflow.SlaveCore.Common;
4 |
5 | namespace Testflow.SlaveCore.Runner.Model
6 | {
7 | internal class BatchBlockStepEntity : StepTaskEntityBase
8 | {
9 | public BatchBlockStepEntity(ISequenceStep step, SlaveContext context, int sequenceIndex) : base(step, context, sequenceIndex)
10 | {
11 | }
12 |
13 | public override void Generate(ref int coroutineId)
14 | {
15 | throw new NotImplementedException();
16 | }
17 |
18 | protected override void InvokeStepSingleTime(bool forceInvoke)
19 | {
20 | throw new System.NotImplementedException();
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Runner/Model/TimerBlockStepEntity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Data.Sequence;
3 | using Testflow.SlaveCore.Common;
4 |
5 | namespace Testflow.SlaveCore.Runner.Model
6 | {
7 | internal class TimerBlockStepEntity : StepTaskEntityBase
8 | {
9 | public TimerBlockStepEntity(ISequenceStep step, SlaveContext context, int sequenceIndex) : base(step, context, sequenceIndex)
10 | {
11 | }
12 |
13 | public override void Generate(ref int coroutineId)
14 | {
15 | throw new NotImplementedException();
16 | }
17 |
18 | protected override void InvokeStepSingleTime(bool forceInvoke)
19 | {
20 | throw new System.NotImplementedException();
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Runner/Model/MultiThreadStepEntity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Data.Sequence;
3 | using Testflow.SlaveCore.Common;
4 |
5 | namespace Testflow.SlaveCore.Runner.Model
6 | {
7 | internal class MultiThreadStepEntity : StepTaskEntityBase
8 | {
9 | public MultiThreadStepEntity(ISequenceStep step, SlaveContext context, int sequenceIndex) : base(step, context, sequenceIndex)
10 | {
11 | }
12 |
13 | public override void Generate(ref int coroutineId)
14 | {
15 | throw new NotImplementedException();
16 | }
17 |
18 | protected override void InvokeStepSingleTime(bool forceInvoke)
19 | {
20 | throw new System.NotImplementedException();
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/source/src/Dev/Utility/I18nUtil/I18NOptionComparer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Security.Cryptography;
4 |
5 | namespace Testflow.Utility.I18nUtil
6 | {
7 | internal class I18NOptionComparer : IEqualityComparer
8 | {
9 | public bool Equals(I18NOption elem1, I18NOption elem2)
10 | {
11 | return elem1.FirstLanguageFile.Equals(elem2.FirstLanguageFile) && elem1.SecondLanguageFile.Equals(elem2.SecondLanguageFile) &&
12 | elem1.FirstLanguage.Equals(elem2.FirstLanguage) && elem1.SecondLanguage.Equals(elem2.SecondLanguage);
13 | }
14 |
15 | public int GetHashCode(I18NOption option)
16 | {
17 | return option.ToString().GetHashCode();
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/source/src/Modules/ConfigurationManager/Data/ExpressionOperatorConfiguration.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Xml.Serialization;
4 | using Testflow.Data.Expression;
5 |
6 | namespace Testflow.ConfigurationManager.Data
7 | {
8 | [Serializable]
9 | public class ExpressionOperatorConfiguration
10 | {
11 | [XmlAttribute]
12 | public string Version { get; set; }
13 |
14 | [XmlArrayItem("ExpressionOperator")]
15 | [XmlArray("ExpressionOperators")]
16 | public List Operators { get; set; }
17 |
18 | [XmlArrayItem("ExpressionCalculatorInfo")]
19 | [XmlArray("ExpressionCalculators")]
20 | public List Calculators { get; set; }
21 | }
22 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Common/SerializationOrderEnableAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.SequenceManager.Common
4 | {
5 | ///
6 | /// 配置某个类在序列化时是否使能属性排序,只对非值类型的属性生效
7 | ///
8 | [AttributeUsage(AttributeTargets.Class)]
9 | internal class SerializationOrderEnableAttribute : Attribute
10 | {
11 | ///
12 | /// 该类在序列化时是否使能属性排序
13 | ///
14 | public bool OrderEnable { get; }
15 |
16 | public SerializationOrderEnableAttribute(bool orderEnable)
17 | {
18 | this.OrderEnable = orderEnable;
19 | }
20 |
21 | public SerializationOrderEnableAttribute()
22 | {
23 | this.OrderEnable = true;
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequenceParameter.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Data.Expression;
3 |
4 | namespace Testflow.Data.Sequence
5 | {
6 | ///
7 | /// 每个Sequence的参数配置
8 | ///
9 | public interface ISequenceParameter : ISequenceDataContainer
10 | {
11 | ///
12 | /// 该参数Sequence在当前SequenceGroup的索引号
13 | ///
14 | int Index { get; set; }
15 |
16 | ///
17 | /// 所有Step的Parameters
18 | ///
19 | IList StepParameters { get; set; }
20 |
21 | ///
22 | /// 序列内的变量值
23 | ///
24 | IList VariableValues { get; set; }
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/source/src/Modules/ComInterfaceManager/ModuleErrorCode.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.ComInterfaceManager
4 | {
5 | public static class ModuleErrorCode
6 | {
7 | public const int LibraryLoadError = 1 | CommonErrorCode.ComInterfaceErrorMask;
8 | public const int HighVersion = 2 | CommonErrorCode.ComInterfaceErrorMask;
9 | public const int LowVersion = 3 | CommonErrorCode.ComInterfaceErrorMask;
10 | public const int TypeCannotLoad = 4 | CommonErrorCode.ComInterfaceErrorMask;
11 | public const int PropertyNotFound = 5 | CommonErrorCode.ComInterfaceErrorMask;
12 | public const int LibraryNotFound = 6 | CommonErrorCode.ComInterfaceErrorMask;
13 | public const int AssemblyNotLoad = 7 | CommonErrorCode.ComInterfaceErrorMask;
14 | }
15 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Data/EventInfos/AbortEventInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Usr;
3 | using Testflow.CoreCommon.Common;
4 | using Testflow.CoreCommon.Messages;
5 |
6 | namespace Testflow.CoreCommon.Data.EventInfos
7 | {
8 | public class AbortEventInfo : EventInfoBase
9 | {
10 | ///
11 | /// 为取消请求指令
12 | ///
13 | public bool IsRequest { get; set; }
14 |
15 | public bool AbortSuccess { get; set; }
16 |
17 | public string FailInfo { get; set; }
18 |
19 | public AbortEventInfo(int session, bool isRequest, bool abortSuccess) : base(session, EventType.Abort, DateTime.Now)
20 | {
21 | this.IsRequest = isRequest;
22 | this.AbortSuccess = abortSuccess;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/TestMaintain/Container/ProcessRuntimeContainer.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 | using Testflow.MasterCore.Common;
3 |
4 | namespace Testflow.MasterCore.TestMaintain.Container
5 | {
6 | internal class ProcessRuntimeContainer : RuntimeContainer
7 | {
8 | public ProcessRuntimeContainer(int session, ModuleGlobalInfo globalInfo,
9 | params object[] extraParam) : base(session, globalInfo)
10 | {
11 | // TODO
12 | }
13 |
14 | public override void Start(string startConfigData)
15 | {
16 | throw new System.NotImplementedException();
17 | }
18 |
19 | public override void Dispose()
20 | {
21 | throw new System.NotImplementedException();
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/IParameterData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml.Serialization;
3 | using Testflow.Usr;
4 | using Testflow.Data.Description;
5 |
6 | namespace Testflow.Data.Sequence
7 | {
8 | ///
9 | /// 参数数据类
10 | ///
11 | public interface IParameterData : ICloneableClass, ISequenceElement
12 | {
13 | ///
14 | /// 当前ParameterData在ParametorCollection中的索引
15 | ///
16 | int Index { get; set; }
17 |
18 | ///
19 | /// 参数的值,如果是变量,则值为IVariableData
20 | ///
21 | string Value { get; set; }
22 |
23 | ///
24 | /// 当前的值是变量还是值
25 | ///
26 | ParameterType ParameterType { get; set; }
27 | }
28 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Modules/IController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Modules
4 | {
5 | ///
6 | /// 控制接口基类
7 | ///
8 | public interface IController : IDisposable
9 | {
10 | ///
11 | /// 每个模块的配置数据
12 | ///
13 | IModuleConfigData ConfigData { get; set; }
14 |
15 | ///
16 | /// 运行时初始化控制组件
17 | ///
18 | void RuntimeInitialize();
19 |
20 | ///
21 | /// 设计时初始化控制组件
22 | ///
23 | void DesigntimeInitialize();
24 |
25 | ///
26 | /// 适用该模块的参数配置
27 | ///
28 | /// 配置数据
29 | void ApplyConfig(IModuleConfigData configData);
30 | }
31 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Common/TaskFailedException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Runtime;
3 |
4 | namespace Testflow.SlaveCore.Common
5 | {
6 | internal class TaskFailedException : ApplicationException
7 | {
8 | public FailedType FailedType { get; }
9 |
10 | public int SequenceIndex { get; }
11 |
12 | public TaskFailedException(int sequenceIndex, FailedType failedType) : base($"Sequence {0} failed.")
13 | {
14 | this.SequenceIndex = sequenceIndex;
15 | this.FailedType = failedType;
16 | }
17 |
18 | public TaskFailedException(int sequenceIndex, string message, FailedType failedType) : base(message)
19 | {
20 | this.SequenceIndex = sequenceIndex;
21 | this.FailedType = failedType;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Data/EventInfos/TestGenEventInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Usr;
3 | using Testflow.CoreCommon.Common;
4 | using Testflow.CoreCommon.Messages;
5 |
6 | namespace Testflow.CoreCommon.Data.EventInfos
7 | {
8 | public class TestGenEventInfo : EventInfoBase
9 | {
10 | public TestGenState GenState { get; }
11 |
12 | public string ErrorInfo { get; set; }
13 |
14 | public TestGenEventInfo(RmtGenMessage message, TestGenState genState) : base(message.Id, EventType.TestGen, message.Time)
15 | {
16 | this.GenState = genState;
17 | }
18 |
19 | public TestGenEventInfo(int id, TestGenState genState, DateTime time) : base(id, EventType.TestGen, time)
20 | {
21 | this.GenState = genState;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/ITypeData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Serialization;
3 | using System.Xml.Serialization;
4 | using Testflow.Data.Sequence;
5 |
6 | namespace Testflow.Data
7 | {
8 | ///
9 | /// 保存类型信息
10 | ///
11 | public interface ITypeData : ISequenceElement
12 | {
13 | // ///
14 | // /// 类型数据在当前容器中的索引
15 | // ///
16 | // int Index { get; set; }
17 |
18 | ///
19 | /// 类型所在配置集名称
20 | ///
21 | string AssemblyName { get; set; }
22 |
23 | ///
24 | /// 命名空间
25 | ///
26 | string Namespace { get; set; }
27 |
28 | ///
29 | /// 类型名称
30 | ///
31 | string Name { get; set; }
32 | }
33 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/TestflowStates.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow
2 | {
3 | ///
4 | /// Testflow平台的状态信息
5 | ///
6 | public enum TestflowStates
7 | {
8 | ///
9 | /// 不可用状态,未初始化或已释放
10 | ///
11 | Unavailable = 0,
12 |
13 | ///
14 | /// 设计时
15 | ///
16 | Designtime = 1,
17 |
18 | ///
19 | /// 运行时设计
20 | ///
21 | RuntimeDesign = 2,
22 |
23 | ///
24 | /// 运行时调试状态
25 | ///
26 | RuntimeDebug = 3,
27 |
28 | ///
29 | /// 运行时状态
30 | ///
31 | Runtime = 4,
32 |
33 | ///
34 | /// 错误
35 | ///
36 | Error = 5
37 | }
38 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ILoopCounter.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 | using Testflow.Usr;
3 |
4 | namespace Testflow.Data.Sequence
5 | {
6 | ///
7 | /// Testflow的计数器
8 | ///
9 | public interface ILoopCounter : ICloneableClass, ISequenceElement
10 | {
11 | ///
12 | /// 计数器迭代变量名称
13 | ///
14 | string Name { get; set; }
15 |
16 | ///
17 | /// 计数器的最大计数值
18 | ///
19 | int MaxValue { get; set; }
20 |
21 | ///
22 | /// Counter是否被使用
23 | ///
24 | bool CounterEnabled { get; set; }
25 |
26 | ///
27 | /// 循环变量,记录当前的计数值
28 | ///
29 | string CounterVariable { get; set; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/source/src/Dev/Utility/UtilityConstants.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Utility
2 | {
3 | internal static class UtilityConstants
4 | {
5 | internal const int DefaultDispatchInterval = 1;
6 | internal const int DefaultEntityCount = 8;
7 | internal const string I18nName = "LoggerI18N";
8 | internal const string MessengerName = "MessengerI18N";
9 | internal const string UtilsName = "Utils";
10 |
11 | ///
12 | /// 中文国际化语言名
13 | ///
14 | public const string ChineseName = "zh-CN";
15 |
16 | ///
17 | /// 英文国际化语言名
18 | ///
19 | public const string EnglishName = "en-US";
20 |
21 | ///
22 | /// 英文资源文件后缀
23 | ///
24 | public const string EnglishResourceName = "en";
25 | }
26 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Modules/IWarningInfo.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 |
3 | namespace Testflow.Modules
4 | {
5 | ///
6 | /// 警告信息
7 | ///
8 | public interface IWarningInfo
9 | {
10 | ///
11 | /// 警告所在的序列组
12 | ///
13 | ISequenceGroup SequenceGroup { get; set; }
14 |
15 | ///
16 | /// 警告所在的序列
17 | ///
18 | ISequence Sequence { get; set; }
19 |
20 | ///
21 | /// 警告所在的序列Step
22 | ///
23 | ISequenceStep SequenceStep { get; set; }
24 |
25 | ///
26 | /// 告警信息
27 | ///
28 | string Infomation { get; set; }
29 |
30 | ///
31 | /// 告警码
32 | ///
33 | int WarnCode { get; set; }
34 | }
35 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequenceFlowContainer.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.Data.Sequence
4 | {
5 | ///
6 | /// 序列流程容器的基类
7 | ///
8 | public interface ISequenceFlowContainer : ISequenceElement, ICloneableClass
9 | {
10 | ///
11 | /// 名称
12 | ///
13 | string Name { get; set; }
14 |
15 | ///
16 | /// 描述信息
17 | ///
18 | string Description { get; set; }
19 |
20 | ///
21 | /// 上级流程容器
22 | ///
23 | ISequenceFlowContainer Parent { get; set; }
24 |
25 | ///
26 | /// 使用父级对象初始化
27 | ///
28 | ///
29 | void Initialize(ISequenceFlowContainer parent);
30 | }
31 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/Message/AsyncMsgTransceiver.cs:
--------------------------------------------------------------------------------
1 | using Testflow.CoreCommon.Messages;
2 | using Testflow.MasterCore.Common;
3 | using Testflow.Utility.MessageUtil;
4 |
5 | namespace Testflow.MasterCore.Message
6 | {
7 | internal class AsyncMsgTransceiver : MessageTransceiver
8 | {
9 | public AsyncMsgTransceiver(ModuleGlobalInfo globalInfo) : base(globalInfo, ReceiveType.Asynchronous)
10 | {
11 | }
12 |
13 | protected override void Start()
14 | {
15 | throw new System.NotImplementedException();
16 | }
17 |
18 | protected override void Stop()
19 | {
20 | throw new System.NotImplementedException();
21 | }
22 |
23 | protected override void SendMessage(MessageBase message)
24 | {
25 | throw new System.NotImplementedException();
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Data/StatusReportType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.SlaveCore.Data
2 | {
3 | public enum StatusReportType
4 | {
5 | ///
6 | /// 序列开始执行
7 | ///
8 | Start = 0,
9 |
10 | ///
11 | /// 状态记录
12 | ///
13 | Record = 1,
14 |
15 | ///
16 | /// 调试命中
17 | ///
18 | DebugHitted = 2,
19 |
20 | ///
21 | /// 同步请求
22 | ///
23 | SyncRequested = 3,
24 |
25 | ///
26 | /// 执行失败
27 | ///
28 | Failed = 4,
29 |
30 | ///
31 | /// 序列结束
32 | ///
33 | Over = 5,
34 |
35 | ///
36 | /// 执行错误
37 | ///
38 | Error = 6
39 | }
40 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Description/IArgumentDescription.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data.Description
2 | {
3 | ///
4 | /// 参数描述接口
5 | ///
6 | public interface IArgumentDescription : IDescriptionData
7 | {
8 | ///
9 | /// 参数属于那种类型
10 | ///
11 | VariableType ArgumentType { get; set; }
12 |
13 | ///
14 | /// 参数的Type对象
15 | ///
16 | ITypeData Type { get; set; }
17 |
18 | ///
19 | /// 参数的修饰符
20 | ///
21 | ArgumentModifier Modifier { get; set; }
22 |
23 | ///
24 | /// 参数默认值
25 | ///
26 | string DefaultValue { get; set; }
27 |
28 | ///
29 | /// 是否为可选参数
30 | ///
31 | bool IsOptional { get; set; }
32 | }
33 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Common/LogLevel.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Usr
2 | {
3 | ///
4 | /// 日志级别
5 | ///
6 | public enum LogLevel
7 | {
8 | ///
9 | /// 最低级别
10 | ///
11 | Trace = 0,
12 |
13 | ///
14 | /// 调试级别
15 | ///
16 | Debug = 1,
17 |
18 | ///
19 | /// 消息级别
20 | ///
21 | Info = 2,
22 |
23 | ///
24 | /// 警告级别
25 | ///
26 | Warn =3,
27 |
28 | ///
29 | /// 错误级别
30 | ///
31 | Error = 4,
32 |
33 | ///
34 | /// 严重错误级别
35 | ///
36 | Fatal = 5,
37 |
38 | ///
39 | /// 关闭日志
40 | ///
41 | Off = 6
42 | }
43 | }
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/IFlowConsole.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Usr
4 | {
5 | ///
6 | /// Testflow的控制台接口
7 | ///
8 | public interface IFlowConsole
9 | {
10 | ///
11 | /// 在控制台打印信息
12 | ///
13 | /// 待打印的消息
14 | void Print(string message);
15 |
16 | ///
17 | /// 在控制台打印信息
18 | ///
19 | /// 消息格式
20 | /// 消息的参数
21 | void Print(string messageFormat, params object[] args);
22 |
23 | ///
24 | /// 在控制台打印信息
25 | ///
26 | /// 异常
27 | /// 附加信息
28 | void Print(Exception exception, string message = null);
29 | }
30 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/Data/ISequenceStatusInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Usr;
3 | using Testflow.Data.Sequence;
4 |
5 | namespace Testflow.Runtime.Data
6 | {
7 | ///
8 | /// 保存一个测试序列组运行时单个监视点的综合状态信息,提供给外部模块使用。
9 | ///
10 | public interface ISequenceStatusInfo : IPropertyExtendable
11 | {
12 | ///
13 | /// 正在执行的序列
14 | ///
15 | IList RunningSequence { get; }
16 |
17 | ///
18 | /// 已成功执行的序列
19 | ///
20 | IList SuccessSequence { get; }
21 |
22 | ///
23 | /// 已失败的序列
24 | ///
25 | IList FailedSequence { get; }
26 |
27 | ///
28 | /// 待执行状态的序列
29 | ///
30 | IList IdleSequence { get; }
31 | }
32 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/IArgument.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml.Serialization;
3 | using Testflow.Usr;
4 | using Testflow.Data.Description;
5 |
6 | namespace Testflow.Data.Sequence
7 | {
8 | ///
9 | /// 参数类,描述FunctionData的接口
10 | ///
11 | public interface IArgument : ICloneableClass, ISequenceElement
12 | {
13 | ///
14 | /// 参数类
15 | ///
16 | string Name { get; set; }
17 |
18 | ///
19 | /// 参数类的Type对象
20 | ///
21 | ITypeData Type { get; set; }
22 |
23 | ///
24 | /// 参数的修饰符
25 | ///
26 | ArgumentModifier Modifier { get; set; }
27 |
28 | ///
29 | /// 参数类的类型
30 | ///
31 | [XmlIgnore]
32 | VariableType VariableType { get; set; }
33 | }
34 | }
--------------------------------------------------------------------------------
/source/src/Modules/DataMaintainer/RuntimeDatabaseProxy.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Modules;
3 | using Testflow.Runtime.Data;
4 |
5 | namespace Testflow.DataMaintainer
6 | {
7 | internal class RuntimeDatabaseProxy : DatabaseProxy
8 | {
9 | public RuntimeDatabaseProxy(IModuleConfigData configData) : base(configData, true)
10 | {
11 | }
12 |
13 | public override long GetTestInstanceCount(string filterString)
14 | {
15 | throw new System.InvalidOperationException();
16 | }
17 |
18 | public override IList GetTestInstances(string filterString)
19 | {
20 | throw new System.InvalidOperationException();
21 | }
22 |
23 | public override void DeleteTestInstance(string fileterString)
24 | {
25 | throw new System.InvalidOperationException();
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/IAssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Testflow.Data
4 | {
5 | ///
6 | /// 保存单个Assembly的描述信息
7 | ///
8 | public interface IAssemblyInfo
9 | {
10 | ///
11 | /// 程序集名称
12 | ///
13 | string AssemblyName { get; set; }
14 |
15 | ///
16 | /// 程序集所在路径
17 | ///
18 | string Path { get; set; }
19 |
20 | ///
21 | /// 程序集是否可用
22 | ///
23 | [XmlIgnore]
24 | bool Available { get; set; }
25 |
26 | // ///
27 | // /// 使用到的程序集的所有命名空间
28 | // ///
29 | // [XmlIgnore]
30 | // ISet NameSpaces { get; set; }
31 |
32 | ///
33 | /// 程序集的版本号
34 | ///
35 | string Version { get; set; }
36 | }
37 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/IPerformanceResult.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Usr;
3 |
4 | namespace Testflow.Runtime
5 | {
6 | ///
7 | /// 性能结果
8 | ///
9 | public interface IPerformanceResult : IPropertyExtendable
10 | {
11 | ///
12 | /// CPU使用事件,单位为ms
13 | ///
14 | ulong CpuTime { get; set; }
15 |
16 | ///
17 | /// 平均分配的内存
18 | ///
19 | long AverageAllocatedMemory { get; set; }
20 |
21 | ///
22 | /// 分配内存的最大值
23 | ///
24 | long MaxAllocatedMemory { get; set; }
25 |
26 | ///
27 | /// 平均使用的内存
28 | ///
29 | long AverageUsedMemory { get; set; }
30 |
31 | ///
32 | /// 最大使用的内存
33 | ///
34 | long MaxUsedMemory { get; set; }
35 |
36 | }
37 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/TestLauncher.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Newtonsoft.Json;
3 | using Testflow.SlaveCore.Common;
4 | using Testflow.Utility.I18nUtil;
5 |
6 | namespace Testflow.SlaveCore
7 | {
8 | public class TestLauncher
9 | {
10 | private SlaveContext _contextManager;
11 | private MessageTransceiver _transceiver;
12 |
13 | public TestLauncher(string configDataStr)
14 | {
15 | I18NOption i18NOption = new I18NOption(typeof(TestLauncher).Assembly, "i18n_SlaveCore_zh", "i18n_SlaveCore_en")
16 | {
17 | Name = Constants.I18nName
18 | };
19 | I18N.InitInstance(i18NOption);
20 | _contextManager = new SlaveContext(configDataStr);
21 | // _transceiver = new MessageTransceiver(_contextManager, );
22 | }
23 |
24 | public void Start()
25 | {
26 |
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Runner/Actuators/EmptyActuator.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 | using Testflow.Runtime.Data;
3 | using Testflow.SlaveCore.Common;
4 |
5 | namespace Testflow.SlaveCore.Runner.Actuators
6 | {
7 | internal class EmptyActuator : ActuatorBase
8 | {
9 | public EmptyActuator(SlaveContext context, ISequenceStep step, int sequenceIndex) : base(step, context, sequenceIndex)
10 | {
11 | }
12 |
13 | protected override void GenerateInvokeInfo()
14 | {
15 | // ignore
16 | }
17 |
18 | protected override void InitializeParamsValues()
19 | {
20 | // ignore
21 | }
22 |
23 | public override StepResult InvokeStep(bool forceInvoke)
24 | {
25 | // 开始计时
26 | StartTiming();
27 | // 停止计时
28 | EndTiming();
29 | return StepResult.Pass;
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequence.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Xml.Serialization;
4 | using Testflow.Data.Expression;
5 |
6 | namespace Testflow.Data.Sequence
7 | {
8 | ///
9 | /// 保存单个测试序列信息的数据结构
10 | ///
11 | public interface ISequence: ISequenceFlowContainer
12 | {
13 | ///
14 | /// 测试序列在当前序列组的索引。Setup的Index为0,Teardown的Index为最后一个
15 | ///
16 | int Index { get; set; }
17 |
18 | ///
19 | /// 序列的变量集合
20 | ///
21 | IVariableCollection Variables { get; set; }
22 |
23 | ///
24 | /// 测试的步骤集合
25 | ///
26 | ISequenceStepCollection Steps { get; set; }
27 |
28 | ///
29 | /// 运行时行为,正常运行/跳过/强制失败/强制成功
30 | ///
31 | RunBehavior Behavior { get; set; }
32 | }
33 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/StepCreators/ConditionLoopCreator.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 | using Testflow.SequenceManager.SequenceElements;
3 |
4 | namespace Testflow.SequenceManager.StepCreators
5 | {
6 | internal class ConditionLoopCreator : SequenceStepCreator
7 | {
8 | protected override ISequenceStep CreateSequenceStep()
9 | {
10 | SequenceStep step = new SequenceStep
11 | {
12 | StepType = SequenceStepType.ConditionLoop,
13 | SubSteps = new SequenceStepCollection(),
14 | Name = "ConditionLoop",
15 | LoopCounter = new LoopCounter()
16 | {
17 | CounterEnabled = true,
18 | CounterVariable = string.Empty,
19 | MaxValue = 0,
20 | Name = "ConditionLoop"
21 | }
22 | };
23 | return step;
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/Common/TestflowTypeAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Usr.Common
4 | {
5 | ///
6 | /// Testflow中会被使用的数据类型
7 | ///
8 | [AttributeUsage(AttributeTargets.Class)]
9 | public class TestflowTypeAttribute : Attribute
10 | {
11 | ///
12 | /// 该类是否是Testflow中会被使用的数据类型
13 | ///
14 | public bool IsTestflowDataType { get; }
15 |
16 | ///
17 | /// 标记该类为Testflow中会被使用的数据类型
18 | ///
19 | public TestflowTypeAttribute()
20 | {
21 | this.IsTestflowDataType = true;
22 | }
23 |
24 | ///
25 | /// 是否标记该类为Testflow中会被使用的数据类型
26 | ///
27 | /// 该类是否为Testflow中会被使用的数据类型
28 | public TestflowTypeAttribute(bool isDataType)
29 | {
30 | this.IsTestflowDataType = isDataType;
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/source/src/Modules/ComInterfaceManager/Data/FunctionInterfaceDescription.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Testflow.Data;
4 | using Testflow.Data.Description;
5 |
6 | namespace Testflow.ComInterfaceManager.Data
7 | {
8 | [Serializable]
9 | public class FunctionInterfaceDescription : IFuncInterfaceDescription
10 | {
11 | public FunctionInterfaceDescription()
12 | {
13 | this.Arguments = null;
14 | }
15 | public string Name { get; set; }
16 | public string Description { get; set; }
17 | public FunctionType FuncType { get; set; }
18 | public int ComponentIndex { get; set; }
19 | public ITypeData ClassType { get; set; }
20 | public bool IsGeneric { get; set; }
21 | public IArgumentDescription Return { get; set; }
22 | public IList Arguments { get; set; }
23 | public string Signature { get; set; }
24 | public string Category { get; set; }
25 | }
26 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequenceStepParameter.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Testflow.Data.Sequence
4 | {
5 | ///
6 | /// 序列单个步骤的参数配置
7 | ///
8 | public interface ISequenceStepParameter : ISequenceDataContainer
9 | {
10 | ///
11 | /// 在当前层级的索引
12 | ///
13 | int Index { get; set; }
14 |
15 | ///
16 | /// 所有子Step在当前Sequence的参数,如果没有子Step则为空
17 | ///
18 | IList SubStepParameters { get; set; }
19 |
20 | ///
21 | /// 参数配置,如果该Step包含子步骤则该项为空
22 | ///
23 | IParameterDataCollection Parameters { get; set; }
24 |
25 | ///
26 | /// 方法所在类的实例,静态方法时为空
27 | ///
28 | string Instance { get; set; }
29 |
30 | ///
31 | /// 保存返回值的变量名
32 | ///
33 | string Return { get; set; }
34 | }
35 | }
--------------------------------------------------------------------------------
/source/src/Dev/Authentification/AuthenticationStrategy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Testflow.Authentication
5 | {
6 | public class AuthenticationStrategy
7 | {
8 | private readonly Dictionary> _authorityData;
9 | internal AuthenticationStrategy()
10 | {
11 | this._authorityData = new Dictionary>(5);
12 | }
13 |
14 | public void AddUserLevel(string userLevel)
15 | {
16 |
17 | }
18 |
19 | public void AddUserAuthority(string userLevel, string authorityName, bool value = true)
20 | {
21 |
22 | }
23 |
24 | public void AddUserAuthority(string userLevel, string authorityName, object value)
25 | {
26 |
27 | }
28 |
29 | public TDataType GetAuthorityInfo(string userLevel, string authorityName)
30 | {
31 | throw new NotImplementedException();
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Compiled Object files
5 | *.slo
6 | *.lo
7 | *.o
8 | *.obj
9 |
10 | # Precompiled Headers
11 | *.gch
12 | *.pch
13 |
14 | # Compiled Dynamic libraries
15 | *.so
16 | *.dylib
17 | #*.dll
18 |
19 | # Fortran module files
20 | *.mod
21 | *.smod
22 |
23 | # Compiled Static libraries
24 | *.lai
25 | *.la
26 | *.a
27 | *.lib
28 |
29 | # Executables
30 | *.exe
31 | *.out
32 | *.app
33 |
34 | # CSharp cache folders
35 | bin/
36 | obj/
37 | TestResults/
38 | #test/
39 | .vs/
40 | ~*.*
41 |
42 | # CSharp temporary files
43 | *.cd
44 | *.DotSettings.user
45 |
46 | ## Ignore Visual Studio temporary files, build results, and
47 | ## files generated by popular Visual Studio add-ons.
48 |
49 | # User-specific files
50 | *.suo
51 | *.user
52 | *.userosscache
53 | *.sln.docstates
54 |
55 | # User-specific files (MonoDevelop/Xamarin Studio)
56 | *.userprefs
57 |
58 | # Build results
59 | [Dd]ebug/
60 | [Dd]ebugPublic/
61 | [Rr]elease/
62 | [Rr]eleases/
63 | x64/
64 | x86/
65 | bld/
66 | [Bb]in/
67 | [Oo]bj/
68 |
--------------------------------------------------------------------------------
/source/src/Dev/Common/TestflowRunnerOptions.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow
2 | {
3 | ///
4 | /// 运行器选项类
5 | ///
6 | public class TestflowRunnerOptions
7 | {
8 | ///
9 | /// 工作目录
10 | ///
11 | public string WorkDirectory { get; set; }
12 |
13 | ///
14 | /// 运行模式
15 | ///
16 | public RunMode Mode { get; set; }
17 |
18 | ///
19 | /// 创建默认配置的Options实例
20 | ///
21 | public TestflowRunnerOptions()
22 | {
23 | Mode = RunMode.Full;
24 | }
25 |
26 | ///
27 | /// 两个Opitions是否相同
28 | ///
29 | /// 待比较的Option
30 | /// 两个Options是否相同
31 | public bool Equals(TestflowRunnerOptions options)
32 | {
33 | return this.WorkDirectory.Equals(options.WorkDirectory) && this.Mode == options.Mode;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/EventData/DebuggerHandle.cs:
--------------------------------------------------------------------------------
1 | using Testflow.MasterCore.Core;
2 | using Testflow.Runtime;
3 |
4 | namespace Testflow.MasterCore.EventData
5 | {
6 | internal class DebuggerHandle : IDebuggerHandle
7 | {
8 | private readonly DebugManager _debugManager;
9 | public DebuggerHandle(DebugManager debugManager)
10 | {
11 | this._debugManager = debugManager;
12 | }
13 |
14 | public void StepInto()
15 | {
16 | _debugManager.StepInto();
17 | }
18 |
19 | public void StepOver()
20 | {
21 | _debugManager.StepOver();
22 | }
23 |
24 | public void Continue(int session)
25 | {
26 | _debugManager.Continue(session);
27 | }
28 |
29 | public void RunToEnd()
30 | {
31 | _debugManager.RunToEnd();
32 | }
33 |
34 | public void Pause(int session)
35 | {
36 | _debugManager.Pause(session);
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/source/src/Modules/ParameterChecker/WarnCode.cs:
--------------------------------------------------------------------------------
1 |
2 | using Testflow.Usr;
3 |
4 | namespace Testflow.ParameterChecker
5 | {
6 | public static class WarnCode
7 | {
8 | public const int VariableDNE = 1 | CommonErrorCode.ParamCheckErrorMask;
9 | public const int TypeInvalid = 2 | CommonErrorCode.ParamCheckErrorMask;
10 | public const int VariableValueInvalid = 3 | CommonErrorCode.ParamCheckErrorMask;
11 | public const int ParameterDataNotAvailable = 4 | CommonErrorCode.ParamCheckErrorMask;
12 | //无法加载参数类型所需的程序集,一般不会出现这种情况吧
13 | public const int ParameterTypeAssemblyInvalid = 5 | CommonErrorCode.ParamCheckErrorMask;
14 | //无法从assembly信息找到枚举类,一般不会出现这种情况吧
15 | public const int EnumClassFault = 6 | CommonErrorCode.ParamCheckErrorMask;
16 | //用户输入的枚举值不在枚举类里
17 | public const int EnumDNE = 7 | CommonErrorCode.ParamCheckErrorMask;
18 |
19 | //返回类型为void, 值不为空
20 | public const int ReturnNotEmpty = 8 | CommonErrorCode.ParamCheckErrorMask;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/source/src/Dev/Logger/Constants.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Logger
2 | {
3 | internal static class Constants
4 | {
5 | public const int DesigntimeSessionId = -1;
6 | public const int DefaultLogStreamSize = 8;
7 | public const string I18NName = "logger";
8 | public const string LogQueueName = @".\testflowlog\Journal$";
9 |
10 | public const string PlatformLogName = "PlatformLogger";
11 | public const string SlaveLogName = "SlaveLogger";
12 |
13 | public const string PlatformLogDir = @"Log\platform\";
14 | public const string SlaveLogDir = @"Log";
15 |
16 | public const string SlaveLogNameFormat = "session{0}_{1}";
17 |
18 | public const string LogFilePostfix = ".log";
19 |
20 | public const string PlatformConfFile = @"deploy\platformlog.xml";
21 | public const string SlaveConfFile = @"deploy\slavelog.xml";
22 |
23 | public const string RootAppender = "RootAppender";
24 | public const string SlaveAppender = "SlaveAppender";
25 | }
26 | }
--------------------------------------------------------------------------------
/source/src/Modules/ComInterfaceManager/Data/ClassInterfaceDescription.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Testflow.Data;
4 | using Testflow.Data.Description;
5 |
6 | namespace Testflow.ComInterfaceManager.Data
7 | {
8 | [Serializable]
9 | public class ClassInterfaceDescription : IClassInterfaceDescription
10 | {
11 | public ClassInterfaceDescription()
12 | {
13 | this.Functions = new List(10);
14 | this.Kind = VariableType.Undefined;
15 | }
16 | public string Name { get; set; }
17 | public string Description { get; set; }
18 | public int ComponentIndex { get; set; }
19 | public int ClassId { get; set; }
20 | public ITypeData ClassType { get; set; }
21 | public bool IsStatic { get; set; }
22 | public VariableType Kind { get; set; }
23 | public ITypeDescription ClassTypeDescription { get; set; }
24 | public IList Functions { get; set; }
25 | }
26 | }
--------------------------------------------------------------------------------
/source/src/Modules/ParameterChecker/WarningInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Testflow.Data.Sequence;
7 | using Testflow.Modules;
8 |
9 | namespace Testflow.ParameterChecker
10 | {
11 | public class WarningInfo : IWarningInfo
12 | {
13 | ///
14 | /// 警告所在的序列组
15 | ///
16 | public ISequenceGroup SequenceGroup { get; set; }
17 |
18 | ///
19 | /// 警告所在的序列
20 | ///
21 | public ISequence Sequence { get; set; }
22 |
23 | ///
24 | /// 警告所在的序列Step
25 | ///
26 | public ISequenceStep SequenceStep { get; set; }
27 |
28 | ///
29 | /// 告警信息
30 | ///
31 | public string Infomation { get; set; }
32 |
33 | ///
34 | /// 告警码
35 | ///
36 | public int WarnCode { get; set; }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/LibraryCategory.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data
2 | {
3 | ///
4 | /// 库类型
5 | ///
6 | public enum LibraryCategory
7 | {
8 | ///
9 | /// 杂项
10 | ///
11 | Miscellaneous = 0,
12 |
13 | ///
14 | /// 平台库
15 | ///
16 | Platform = 1,
17 |
18 | ///
19 | /// 算法库
20 | ///
21 | Algorithms = 2,
22 |
23 | ///
24 | /// 功能库
25 | ///
26 | Function = 3,
27 |
28 | ///
29 | /// 硬件库
30 | ///
31 | Hardware = 4,
32 |
33 | ///
34 | /// 流程控制库
35 | ///
36 | FlowControl = 5,
37 |
38 | ///
39 | /// 断言判断库
40 | ///
41 | Assertion = 6,
42 |
43 | ///
44 | /// 工具库
45 | ///
46 | Tools = 7
47 | }
48 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/ModuleErrorCode.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Usr;
2 |
3 | namespace Testflow.SequenceManager
4 | {
5 | public static class ModuleErrorCode
6 | {
7 | public const int SerializeFailed = 1 | CommonErrorCode.SequenceManageErrorMask;
8 |
9 | public const int DeSerializeFailed = 2 | CommonErrorCode.SequenceManageErrorMask;
10 |
11 | public const int InvalidFileType = 3 | CommonErrorCode.SequenceManageErrorMask;
12 |
13 | public const int UnmatchedParameter = 4 | CommonErrorCode.SequenceManageErrorMask;
14 |
15 | public const int InvalidModelVersion = 5 | CommonErrorCode.SequenceManageErrorMask;
16 |
17 | public const int UnmatchedFileHash = 6 | CommonErrorCode.SequenceManageErrorMask;
18 |
19 | public const int TypeDataError = 7 | CommonErrorCode.SequenceManageErrorMask;
20 |
21 | public const int VariableError = 8 | CommonErrorCode.SequenceManageErrorMask;
22 |
23 | public const int ExpressionError = 9 | CommonErrorCode.SequenceManageErrorMask;
24 | }
25 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/Serializer/SequenceJsonConvertor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Newtonsoft.Json;
3 | using Testflow.SequenceManager.SequenceElements;
4 |
5 | namespace Testflow.SequenceManager.Serializer
6 | {
7 | internal class SequenceJsonConvertor : JsonConverter
8 | {
9 | public override bool CanRead => false;
10 |
11 | public override bool CanWrite => false;
12 |
13 | public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
14 | {
15 | throw new NotImplementedException();
16 | }
17 |
18 | public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
19 | {
20 | throw new NotImplementedException();
21 | }
22 |
23 | public override bool CanConvert(Type objectType)
24 | {
25 | return ReferenceEquals(objectType, typeof (SequenceGroup)) ||
26 | ReferenceEquals(objectType, typeof (TestProject));
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/StepCreators/SequenceStepCreator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using Testflow.Data.Sequence;
4 |
5 | namespace Testflow.SequenceManager.StepCreators
6 | {
7 | internal abstract class SequenceStepCreator
8 | {
9 | public static ISequenceStep CreateSequenceStep(SequenceStepType stepType)
10 | {
11 | string creatorName = $"Testflow.SequenceManager.StepCreators.{stepType}Creator";
12 | Type creatorType = Type.GetType(creatorName);
13 | ConstructorInfo constructor = creatorType.GetConstructor(BindingFlags.Instance | BindingFlags.Public, null, new Type[0], null);
14 | SequenceStepCreator creator = (SequenceStepCreator)constructor.Invoke(new object[0]);
15 | return creator.CreateSequenceStep();
16 | }
17 |
18 | public static void StepDataCheck(ISequenceStep step)
19 | {
20 | throw new NotImplementedException();
21 | }
22 |
23 | protected abstract ISequenceStep CreateSequenceStep();
24 | }
25 | }
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/Common/TestflowElementAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Usr.Common
4 | {
5 | ///
6 | /// 在Testflow中被使用的元素注解
7 | ///
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property)]
9 | public class TestflowElementAttribute : Attribute
10 | {
11 | ///
12 | /// 元素是否为Testflow的可用项
13 | ///
14 | public bool IsTestflowElement { get; }
15 |
16 | ///
17 | /// 标记某个类/方法/属性会作为Testflow的使用项目
18 | ///
19 | public TestflowElementAttribute()
20 | {
21 | this.IsTestflowElement = true;
22 | }
23 |
24 | ///
25 | /// 是否标记某个类/方法/属性会作为Testflow的使用项目
26 | ///
27 | /// 是否标记目标为Testflow的可用项目
28 | public TestflowElementAttribute(bool isTestflowElement)
29 | {
30 | this.IsTestflowElement = isTestflowElement;
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/StepCreators/ConditionBlockCreator.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using Testflow.Data;
3 | using Testflow.Data.Description;
4 | using Testflow.Data.Sequence;
5 | using Testflow.Modules;
6 | using Testflow.SequenceManager.SequenceElements;
7 |
8 | namespace Testflow.SequenceManager.StepCreators
9 | {
10 | internal class ConditionBlockCreator : SequenceStepCreator
11 | {
12 | protected override ISequenceStep CreateSequenceStep()
13 | {
14 | SequenceStep step = new SequenceStep()
15 | {
16 | StepType = SequenceStepType.ConditionBlock,
17 | SubSteps = new SequenceStepCollection(),
18 | Name = "ConditionBlock"
19 | };
20 | SequenceStep conditionStatement = new SequenceStep()
21 | {
22 | StepType = SequenceStepType.ConditionStatement,
23 | SubSteps = new SequenceStepCollection()
24 | };
25 | step.SubSteps.Add(conditionStatement);
26 | return step;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/IDebuggerHandle.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Usr;
3 | using Testflow.Data.Sequence;
4 | using Testflow.DesignTime;
5 |
6 | namespace Testflow.Runtime
7 | {
8 | ///
9 | /// 单个测试序列的调试会话
10 | ///
11 | public interface IDebuggerHandle
12 | {
13 |
14 | #region 调试流程控制
15 |
16 | ///
17 | /// 如果存在子Step,则进入子Step序列,否则执行到下个同级Step
18 | ///
19 | void StepInto();
20 |
21 | ///
22 | /// 执行到下个同级Step
23 | ///
24 | void StepOver();
25 |
26 | ///
27 | /// 继续执行,直到下一个断点
28 | ///
29 | void Continue(int session);
30 |
31 | ///
32 | /// 跳过当前序列的所有断点
33 | ///
34 | void RunToEnd();
35 |
36 | ///
37 | /// 当前Step执行结束后暂停
38 | ///
39 | ///
40 | void Pause(int session);
41 |
42 | #endregion
43 |
44 |
45 | }
46 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Common/CoreConstants.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.CoreCommon.Common
2 | {
3 | public static class CoreConstants
4 | {
5 | public const string LocalHostAddr = "127.0.0.1";
6 | public const int DefaultSequenceCapacaity = 10;
7 | public const int DefaultRuntimeSize = 5;
8 | public const string I18nName = "engineCore";
9 | public const int DefaultEventsQueueSize = 512;
10 | public const int MaxEventsQueueSize = 12800;
11 |
12 | public const int UnverifiedSequenceIndex = -3;
13 |
14 | public const int TestProjectIndex = -1;
15 |
16 | public const int TestProjectSessionId = -1;
17 | public const int EventQueueTimeOut = 500;
18 |
19 | public const int OperationTimeout = 1000;
20 |
21 | public const string UpLinkMQName = @".\Private$\TestflowUpLinkQueue";
22 | public const string DownLinkMQName = @".\Private$\TestflowDownLinkQueue";
23 |
24 | public const string ErrorVarValue = "InvalidValue";
25 |
26 | public const int EmptyStepIndex = 0;
27 | }
28 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Description/IClassInterfaceDescription.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Testflow.Data.Description
4 | {
5 | ///
6 | /// 类类型描述信息
7 | ///
8 | public interface IClassInterfaceDescription : IDescriptionData
9 | {
10 | ///
11 | /// 组件接口描述在全局的索引号
12 | ///
13 | int ComponentIndex { get; set; }
14 |
15 | ///
16 | /// 类在当前组件描述中的唯一ID
17 | ///
18 | int ClassId { get; set; }
19 |
20 | ///
21 | /// 类的类型信息
22 | ///
23 | ITypeData ClassType { get; set; }
24 |
25 | ///
26 | /// 是否为静态类
27 | ///
28 | bool IsStatic { get; set; }
29 |
30 | ///
31 | /// 当前Class的种类
32 | ///
33 | VariableType Kind { get; set; }
34 |
35 | ///
36 | /// 该类中包含的所有方法信息
37 | ///
38 | IList Functions { get; set; }
39 | }
40 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/Data/IFailedInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Runtime.Data
4 | {
5 | ///
6 | /// 失败信息类
7 | ///
8 | public interface IFailedInfo
9 | {
10 | ///
11 | /// 失败类型
12 | ///
13 | FailedType Type { get; set; }
14 |
15 | ///
16 | /// 错误描述信息
17 | ///
18 | string Message { get; set; }
19 |
20 | ///
21 | /// 错误源,FailedType为UnHandledException和RuntimeError有效
22 | ///
23 | string Source { get; set; }
24 |
25 | ///
26 | /// 错误堆栈,FailedType为UnHandledException和RuntimeError有效
27 | ///
28 | string StackTrace { get; set; }
29 |
30 | ///
31 | /// 异常类型,FailedType为UnHandledException和RuntimeError有效
32 | ///
33 | string ExceptionType { get; set; }
34 |
35 | ///
36 | /// 异常码,如果异常没有该值则配置为0
37 | ///
38 | int ErrorCode { get; set; }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequenceParameterInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml.Serialization;
3 |
4 | namespace Testflow.Data.Sequence
5 | {
6 | ///
7 | /// 序列参数配置相关信息
8 | ///
9 | public interface ISequenceParameterInfo : ISequenceElement
10 | {
11 | ///
12 | /// 序列参数的格式版本
13 | ///
14 | string Version { get; set; }
15 |
16 | ///
17 | /// 对应测试序列组的哈希值
18 | ///
19 | string Hash { get; set; }
20 |
21 | ///
22 | /// 序列参数创建时间
23 | ///
24 | DateTime CreateTime { get; set; }
25 |
26 | ///
27 | /// 序列参数最新的更新时间
28 | ///
29 | DateTime ModifiedTime { get; set; }
30 |
31 | ///
32 | /// 序列参数文件路径
33 | ///
34 | [XmlIgnore]
35 | string Path { get; set; }
36 |
37 | ///
38 | /// 测试序列组是否被修改的标识位
39 | ///
40 | bool Modified { get; set; }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/source/test/Modules/EngineCoreTestLib/CoreTestClass.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading;
6 | using System.Threading.Tasks;
7 |
8 | namespace EngineCoreTestLib
9 | {
10 | public class CoreTestClass
11 | {
12 | private int _waitTime;
13 |
14 | public static void StaticWait(int time)
15 | {
16 | Thread.Sleep(time);
17 | }
18 |
19 | public CoreTestClass(int waitTime)
20 | {
21 | _waitTime = waitTime;
22 | }
23 |
24 | public int WaitTime(int extraWaitTime)
25 | {
26 | int totalWaitTime = extraWaitTime + _waitTime;
27 | Thread.Sleep(totalWaitTime);
28 | return totalWaitTime;
29 | }
30 |
31 | public void RaiseError()
32 | {
33 | throw new ApplicationException("This is just an exception test.");
34 | }
35 |
36 | public void GetWaitTime(out int waitTimeValue)
37 | {
38 | waitTimeValue = _waitTime;
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/IRetryCounter.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 | using Testflow.Usr;
3 |
4 | namespace Testflow.Data.Sequence
5 | {
6 | ///
7 | /// 重试计数器
8 | ///
9 | public interface IRetryCounter : ICloneableClass, ISequenceElement
10 | {
11 | ///
12 | /// 重试计数变量名称
13 | ///
14 | string Name { get; set; }
15 |
16 | ///
17 | /// 计数器的最大重试次数
18 | ///
19 | int MaxRetryTimes { get; set; }
20 |
21 | ///
22 | /// 成功次数:达到指定成功次数时认定为成功
23 | ///
24 | int PassTimes { get; set; }
25 |
26 | ///
27 | /// Retry功能是否使能
28 | ///
29 | bool RetryEnabled { get; set; }
30 |
31 | ///
32 | /// 记录当前的重试次数的变量
33 | ///
34 | string CounterVariable { get; set; }
35 |
36 | ///
37 | /// 记录当前的执行成功次数的变量
38 | ///
39 | string PassCountVariable { get; set; }
40 | }
41 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/EventData/TestProjectResults.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Usr;
3 | using Testflow.Data.Sequence;
4 | using Testflow.MasterCore.Common;
5 | using Testflow.Runtime;
6 | using Testflow.Runtime.Data;
7 |
8 | namespace Testflow.MasterCore.EventData
9 | {
10 | internal class TestProjectResults : List
11 | {
12 | public TestProjectResults(ISequenceFlowContainer sequenceData) : base(Constants.DefaultRuntimeSize)
13 | {
14 | if (sequenceData is ITestProject)
15 | {
16 | ITestProject testProject = (ITestProject)sequenceData;
17 | this.Add(new TestResultCollection(testProject));
18 | for (int i = 0; i < testProject.SequenceGroups.Count; i++)
19 | {
20 | this.Add(new TestResultCollection(testProject.SequenceGroups[i], i));
21 | }
22 | }
23 | else
24 | {
25 | this.Add(new TestResultCollection((ISequenceGroup)sequenceData, 0));
26 | }
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Description/ITypeDescription.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Testflow.Data.Description
4 | {
5 | ///
6 | /// 类型描述信息
7 | ///
8 | public interface ITypeDescription
9 | {
10 | ///
11 | /// 类型所在配置集名称
12 | ///
13 | string AssemblyName { get; set; }
14 |
15 | ///
16 | /// 命名空间
17 | ///
18 | string Namespace { get; set; }
19 |
20 | ///
21 | /// 类型名称
22 | ///
23 | string Name { get; set; }
24 |
25 | ///
26 | /// 描述信息
27 | ///
28 | string Description { get; set; }
29 |
30 | ///
31 | /// 类的种类
32 | ///
33 | VariableType Kind { get; set; }
34 |
35 | ///
36 | /// 功能类别
37 | ///
38 | string Category { get; set; }
39 |
40 | ///
41 | /// 枚举值,只在类型为枚举时生效
42 | ///
43 | string[] Enumerations { get; set; }
44 | }
45 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Expression/IExpressionData.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Data.Sequence;
3 | using Testflow.Usr;
4 |
5 | namespace Testflow.Data.Expression
6 | {
7 | ///
8 | /// 表达式数据
9 | ///
10 | public interface IExpressionData : ICloneableClass
11 | {
12 | ///
13 | /// 表达式的名称
14 | ///
15 | string Name { get; set; }
16 |
17 | ///
18 | /// 表达式的上级节点
19 | ///
20 | ISequence Parent { get; set; }
21 |
22 | ///
23 | /// 表达式中的源
24 | ///
25 | IExpressionElement Source { get; set; }
26 |
27 | ///
28 | /// 表达式中的目标
29 | ///
30 | IList Arguments { get; set; }
31 |
32 | ///
33 | /// 表达式操作的名称
34 | ///
35 | string Operation { get; set; }
36 |
37 | ///
38 | /// 使用所属序列对象初始化
39 | ///
40 | void Initialize(ISequenceFlowContainer parent);
41 | }
42 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/SyncManage/SynchronousManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.CoreCommon.Messages;
3 | using Testflow.MasterCore.Common;
4 | using Testflow.MasterCore.Message;
5 |
6 | namespace Testflow.MasterCore.SyncManage
7 | {
8 | ///
9 | /// 资源同步管理模块
10 | ///
11 | internal class SynchronousManager : IMessageHandler, IDisposable
12 | {
13 | private readonly ModuleGlobalInfo _globalInfo;
14 | public SynchronousManager(ModuleGlobalInfo globalInfo)
15 | {
16 | this._globalInfo = globalInfo;
17 | }
18 |
19 | public bool HandleMessage(MessageBase message)
20 | {
21 | // TODO
22 | return true;
23 | }
24 |
25 | public void AddToQueue(MessageBase message)
26 | {
27 | // TODO
28 | }
29 |
30 | public void Start()
31 | {
32 | // TODO
33 | }
34 |
35 | public void Stop()
36 | {
37 | // TODO
38 | }
39 |
40 | public void Dispose()
41 | {
42 | // TODO
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Common/BlockHandle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | namespace Testflow.CoreCommon.Common
5 | {
6 | public class BlockHandle : IDisposable
7 | {
8 | private SemaphoreSlim _waitEvent;
9 | private int _waitState;
10 |
11 | public BlockHandle()
12 | {
13 | _waitEvent = new SemaphoreSlim(0, 1);
14 | this._waitState = int.MaxValue;
15 | this.Timeout = System.Threading.Timeout.Infinite;
16 | }
17 |
18 | public int Timeout { get; set; }
19 |
20 | public bool Wait(int waitState)
21 | {
22 | Thread.VolatileWrite(ref _waitState, waitState);
23 | return _waitEvent.Wait(Timeout);
24 | }
25 |
26 | public void Free(int waitState)
27 | {
28 | if (waitState == _waitState)
29 | {
30 | Interlocked.Exchange(ref _waitState, int.MaxValue);
31 | _waitEvent.Release();
32 | }
33 | }
34 |
35 | public void Dispose()
36 | {
37 | _waitEvent?.Dispose();
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Runner/Actuators/AssertActuator.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 | using Testflow.Runtime.Data;
3 | using Testflow.SlaveCore.Common;
4 |
5 | namespace Testflow.SlaveCore.Runner.Actuators
6 | {
7 | internal class AssertActuator : ActuatorBase
8 | {
9 | public string VariableName { get; }
10 |
11 | public string RuntimeVariableName { get; }
12 |
13 | public string Expected { get; }
14 |
15 | public string RealValue { get; }
16 |
17 | public AssertActuator(ISequenceStep stepData, SlaveContext context, int sequenceIndex) : base(stepData, context, sequenceIndex)
18 | {
19 |
20 | }
21 |
22 | protected override void GenerateInvokeInfo()
23 | {
24 | throw new System.NotImplementedException();
25 | }
26 |
27 | protected override void InitializeParamsValues()
28 | {
29 | throw new System.NotImplementedException();
30 | }
31 |
32 | public override StepResult InvokeStep(bool forceInvoke)
33 | {
34 | throw new System.NotImplementedException();
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/Data/PerformanceStatus.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Testflow.Runtime.Data
4 | {
5 | ///
6 | /// 性能统计信息
7 | ///
8 | public class PerformanceStatus
9 | {
10 | ///
11 | /// 运行时哈希
12 | ///
13 | public string RuntimeHash { get; set; }
14 |
15 | ///
16 | /// 会话ID
17 | ///
18 | public int Session { get; set; }
19 |
20 | ///
21 | /// 当前会话的性能数据索引
22 | ///
23 | public long Index { get; set; }
24 |
25 | ///
26 | /// 时间戳
27 | ///
28 | public DateTime TimeStamp { get; set; }
29 |
30 | ///
31 | /// 内存占用
32 | ///
33 | public long MemoryUsed { get; set; }
34 |
35 | ///
36 | /// 内存占用
37 | ///
38 | public long MemoryAllocated { get; set; }
39 |
40 | ///
41 | /// CPU使用事件,单位为ms
42 | ///
43 | public double ProcessorTime { get; set; }
44 | }
45 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Common/MessageType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.CoreCommon.Common
2 | {
3 | ///
4 | /// 消息类型
5 | ///
6 | public enum MessageType
7 | {
8 | ///
9 | /// 状态消息。运行容器发送,状态维护器接收
10 | ///
11 | Status = 0,
12 |
13 | ///
14 | /// 控制指令。引擎控制、调试管理器和同步模块发送,运行容器接收
15 | ///
16 | Ctrl = 1,
17 |
18 | ///
19 | /// 调试消息。运行容器发送,调试管理器接收
20 | ///
21 | Debug = 2,
22 |
23 | ///
24 | /// 测试生成状态消息。运行容器发送、状态维护器接收
25 | ///
26 | TestGen = 3,
27 |
28 | ///
29 | /// 远端测试生成消息。运行容器生成器发送,运行容器接收
30 | ///
31 | RmtGen = 4,
32 |
33 | ///
34 | /// 资源同步请求。运行容器收发、资源同步器发收
35 | ///
36 | Sync = 5,
37 |
38 | ///
39 | /// 运行时异常消息
40 | ///
41 | RuntimeError = 6,
42 |
43 | ///
44 | /// 回调返回消息
45 | ///
46 | CallBack = 7
47 | }
48 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/DesignTime/IDesigntimeContext.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Usr;
3 | using Testflow.Data.Description;
4 | using Testflow.Data.Sequence;
5 | using Testflow.Runtime;
6 |
7 | namespace Testflow.DesignTime
8 | {
9 | ///
10 | /// 单个测试序列组的设计时上下文
11 | ///
12 | public interface IDesigntimeContext : IEntityComponent
13 | {
14 | ///
15 | /// 当前设计时名称
16 | ///
17 | string Name { get; }
18 |
19 | ///
20 | /// 该会话在设计时使用的所有组件和程序集的映射
21 | ///
22 | IDictionary Components { get; }
23 |
24 | ///
25 | /// 设计时内操作的测试序列组,如果操作的是TestGroup,该值为null
26 | ///
27 | ISequenceGroup SequenceGroup { get; }
28 |
29 | ///
30 | /// 设计时内操作的TestGroup
31 | ///
32 | ITestProject TestProject { get; set; }
33 |
34 | // ///
35 | // /// 当前序列组的所有断点信息
36 | // ///
37 | // IDictionary BreakPoints { get; }
38 | }
39 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/Data/StepResult.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Runtime.Data
2 | {
3 | ///
4 | /// step执行结果
5 | ///
6 | public enum StepResult
7 | {
8 | ///
9 | /// 结果未记录
10 | ///
11 | NotAvailable = -1,
12 |
13 | ///
14 | /// 跳过步骤
15 | ///
16 | Skip = 1,
17 |
18 | ///
19 | /// Step执行成功
20 | ///
21 | Pass = 2,
22 |
23 | ///
24 | /// Step重试执行失败,该失败状态不会影响最终的成功失败统计
25 | ///
26 | RetryFailed = 3,
27 |
28 | ///
29 | /// Step执行失败
30 | ///
31 | Failed = 4,
32 |
33 | ///
34 | /// 被终止
35 | ///
36 | Abort = 5,
37 |
38 | ///
39 | /// 超时
40 | ///
41 | Timeout = 6,
42 |
43 | ///
44 | /// 序列结束
45 | ///
46 | Over = 7,
47 |
48 | ///
49 | /// 出现错误
50 | ///
51 | Error = 8
52 | }
53 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Runtime/FailedType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Runtime
2 | {
3 | ///
4 | /// 失败类型
5 | ///
6 | public enum FailedType
7 | {
8 | ///
9 | /// 测试生成失败
10 | ///
11 | TestGenFailed = -1,
12 |
13 | ///
14 | /// 断言失败
15 | ///
16 | AssertionFailed = 0,
17 |
18 | ///
19 | /// 强制失败
20 | ///
21 | ForceFailed = 1,
22 |
23 | ///
24 | /// 目标异常
25 | ///
26 | TargetError = 2,
27 |
28 | ///
29 | /// 用户取消
30 | ///
31 | Abort = 3,
32 |
33 | ///
34 | /// SetUp模块失败
35 | ///
36 | SetUpFailed = 4,
37 |
38 | ///
39 | /// 重试失败
40 | ///
41 | RetryFailed = 5,
42 |
43 | ///
44 | /// 运行时异常
45 | ///
46 | RuntimeError = 6,
47 |
48 | ///
49 | /// 超时
50 | ///
51 | TimeOut = 7
52 | }
53 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/IVariable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml.Serialization;
3 | using Testflow.Usr;
4 | using Testflow.Data.Description;
5 |
6 | namespace Testflow.Data.Sequence
7 | {
8 | ///
9 | /// 变量数据
10 | ///
11 | public interface IVariable : ISequenceFlowContainer
12 | {
13 | ///
14 | /// 变量的Type对象
15 | ///
16 | ITypeData Type { get; set; }
17 |
18 | ///
19 | /// 变量的类型
20 | ///
21 | VariableType VariableType { get; set; }
22 |
23 | ///
24 | /// 在日志中的记录级别
25 | ///
26 | RecordLevel LogRecordLevel { get; set; }
27 |
28 | ///
29 | /// 在报表中的记录级别
30 | ///
31 | RecordLevel ReportRecordLevel { get; set; }
32 |
33 | ///
34 | /// 在操作面板中的记录级别
35 | ///
36 | RecordLevel OIRecordLevel { get; set; }
37 |
38 | ///
39 | /// 变量的值,如果没有则为null
40 | ///
41 | [XmlIgnore]
42 | string Value { get; set; }
43 | }
44 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Data/EventInfos/ExceptionEventInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Usr;
3 | using Testflow.CoreCommon.Messages;
4 |
5 | namespace Testflow.CoreCommon.Data.EventInfos
6 | {
7 | public class ExceptionEventInfo : EventInfoBase
8 | {
9 | public string Message { get; }
10 | public string ExceptionType { get; }
11 | public string StackTrace { get; }
12 | public string Source { get; }
13 |
14 | public ExceptionEventInfo(Exception ex) : base(CommonConst.PlatformSession, EventType.Exception, DateTime.Now)
15 | {
16 | this.Message = ex.Message;
17 | this.ExceptionType = $"{ex.GetType().Namespace}.{ex.GetType().Name}";
18 | this.StackTrace = ex.StackTrace;
19 | this.Source = ex.Source;
20 | }
21 |
22 | public ExceptionEventInfo(RuntimeErrorMessage message) : base(message.Id, EventType.Exception, message.Time)
23 | {
24 | this.Message = message.Message;
25 | this.ExceptionType = message.Name;
26 | this.StackTrace = message.StackTrace;
27 | this.Source = message.Source;
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/deploy/expressionconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | []
6 | {0}[{1}]
7 | 10
8 | 1
9 |
10 |
11 |
12 |
20 |
21 |
--------------------------------------------------------------------------------
/source/src/Modules/SequenceManager/StepCreators/TryFinallyBlockCreator.cs:
--------------------------------------------------------------------------------
1 | using Testflow.Data.Sequence;
2 | using Testflow.SequenceManager.SequenceElements;
3 |
4 | namespace Testflow.SequenceManager.StepCreators
5 | {
6 | internal class TryFinallyBlockCreator : SequenceStepCreator
7 | {
8 | protected override ISequenceStep CreateSequenceStep()
9 | {
10 | SequenceStep step = new SequenceStep
11 | {
12 | StepType = SequenceStepType.TryFinallyBlock,
13 | SubSteps = new SequenceStepCollection()
14 | };
15 | SequenceStep tryBlock = new SequenceStep
16 | {
17 | Name = "Try",
18 | Parent = step,
19 | SubSteps = new SequenceStepCollection()
20 | };
21 | step.SubSteps.Add(tryBlock);
22 |
23 | SequenceStep finallyBlock = new SequenceStep
24 | {
25 | Name = "Finally",
26 | Parent = step,
27 | SubSteps = new SequenceStepCollection()
28 | };
29 | step.SubSteps.Add(finallyBlock);
30 | return step;
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/TestMaintain/ITestEntityMaintainer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.CoreCommon.Common;
3 | using Testflow.CoreCommon.Data;
4 | using Testflow.CoreCommon.Messages;
5 | using Testflow.Data.Sequence;
6 | using Testflow.MasterCore.Message;
7 | using Testflow.MasterCore.TestMaintain.Container;
8 |
9 | namespace Testflow.MasterCore.TestMaintain
10 | {
11 | ///
12 | /// 测试运行时维护模块。实现测试容器的创建、管理、销毁
13 | ///
14 | internal interface ITestEntityMaintainer : IMessageHandler
15 | {
16 | void ConnectHost(HostInfo runnerHosts);
17 |
18 | void DisconnectHost(int sessionId);
19 |
20 | void StartHost(ISequenceFlowContainer sequenceData);
21 |
22 | void FreeHosts();
23 |
24 | void FreeHost(int id);
25 |
26 | RuntimeContainer Generate(ITestProject testProject, RuntimePlatform platform, params object[] param);
27 |
28 | RuntimeContainer Generate(ISequenceGroup sequenceGroup, RuntimePlatform platform, params object[] param);
29 |
30 | void SendRmtGenMessage(int session, string sequenceData);
31 |
32 | Dictionary TestContainers { get; }
33 | }
34 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Common/TestflowDataException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Serialization;
3 |
4 | namespace Testflow.Usr
5 | {
6 | ///
7 | /// Testflow的数据异常
8 | ///
9 | [Serializable]
10 | public class TestflowDataException : TestflowException
11 | {
12 | ///
13 | /// 创建TestflowDataException的实例
14 | ///
15 | /// 异常码
16 | /// 错误信息
17 | public TestflowDataException(int errorCode, string message) : base(errorCode, message)
18 | {
19 | }
20 |
21 | ///
22 | /// 创建TestflowDataException的实例
23 | ///
24 | /// 错误码
25 | /// 异常信息
26 | /// 内部异常
27 | public TestflowDataException(int errorCode, string message, Exception innerException) : base(errorCode, message, innerException)
28 | {
29 | }
30 |
31 | public TestflowDataException(SerializationInfo info, StreamingContext context) : base(info, context)
32 | {
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Common/TestflowRuntimeException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Serialization;
3 |
4 | namespace Testflow.Usr
5 | {
6 | ///
7 | /// Testflow运行时异常
8 | ///
9 | [Serializable]
10 | public class TestflowRuntimeException : TestflowException
11 | {
12 | ///
13 | /// 创建TestflowRuntimeException的实例
14 | ///
15 | /// 错误码
16 | /// 错误信息
17 | public TestflowRuntimeException(int errorCode, string message) : base(errorCode, message)
18 | {
19 | }
20 |
21 | ///
22 | /// 创建TestflowRuntimeException的实例
23 | ///
24 | /// 错误码
25 | /// 错误信息
26 | /// 内部异常
27 | public TestflowRuntimeException(int errorCode, string message, Exception innerException) : base(errorCode, message, innerException)
28 | {
29 | }
30 |
31 | public TestflowRuntimeException(SerializationInfo info, StreamingContext context) : base(info, context)
32 | {
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Common/TestflowInternalException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Serialization;
3 |
4 | namespace Testflow.Usr
5 | {
6 | ///
7 | /// Testflow内部异常
8 | ///
9 | [Serializable]
10 | public class TestflowInternalException : TestflowException
11 | {
12 | ///
13 | /// 创建TestflowInternalException的实例
14 | ///
15 | /// 错误码
16 | /// 错误信息
17 | public TestflowInternalException(int errorCode, string message) : base(errorCode, message)
18 | {
19 | }
20 |
21 | ///
22 | /// 创建TestflowInternalException的实例
23 | ///
24 | /// 错误码
25 | /// 错误信息
26 | /// 内部异常
27 | public TestflowInternalException(int errorCode, string message, Exception innerException) : base(errorCode, message, innerException)
28 | {
29 | }
30 |
31 | public TestflowInternalException(SerializationInfo info, StreamingContext context) : base(info, context)
32 | {
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/source/packages/System.Threading.Tasks.Extensions.4.5.1/LICENSE.TXT:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) .NET Foundation and Contributors
4 |
5 | All rights reserved.
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 |
--------------------------------------------------------------------------------
/source/packages/System.Runtime.CompilerServices.Unsafe.4.5.0/LICENSE.TXT:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) .NET Foundation and Contributors
4 |
5 | All rights reserved.
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 |
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/AppDomainTestLauncher.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.SlaveCore.Common;
3 | using Testflow.Utility.I18nUtil;
4 |
5 | namespace Testflow.SlaveCore
6 | {
7 | public class AppDomainTestLauncher : MarshalByRefObject, IDisposable
8 | {
9 | private SlaveContext _slaveContext;
10 | private SlaveController _slaveController;
11 |
12 | public AppDomainTestLauncher(string configDataStr)
13 | {
14 | I18NOption i18NOption = new I18NOption(typeof(TestLauncher).Assembly, "i18n_SlaveCore_zh", "i18n_SlaveCore_en")
15 | {
16 | Name = Constants.I18nName
17 | };
18 | I18N.InitInstance(i18NOption);
19 | _slaveContext = new SlaveContext(configDataStr);
20 | }
21 |
22 | public override object InitializeLifetimeService()
23 | {
24 | // 定义该对象的声明周期为无限生存期
25 | return null;
26 | }
27 |
28 | public void Start()
29 | {
30 | _slaveController = new SlaveController(_slaveContext);
31 | _slaveController.StartSlaveTask();
32 | }
33 |
34 | public void Dispose()
35 | {
36 | _slaveController.Dispose();
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/source/src/Services/RuntimeService/Common/Constants.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Testflow.RuntimeService
8 | {
9 | internal static class Constants
10 | {
11 | #region 事件名称
12 | public const string TestGenerationStart = "TestGenerationStart";
13 | public const string TestGenerationEnd = "TestGenerationEnd";
14 | public const string SessionGenerationStart = "SessionGenerationStart";
15 | public const string SessionGenerationReport = "SessionGenerationReport";
16 | public const string SessionGenerationEnd = "SessionGenerationEnd";
17 | public const string TestInstanceStart = "TestInstanceStart";
18 | public const string SessionStart = "SessionStart";
19 | public const string SequenceStarted = "SequenceStarted";
20 | public const string StatusReceived = "StatusReceived";
21 | public const string SequenceOver = "SequenceOver";
22 | public const string SessionOver = "SessionOver";
23 | public const string TestInstanceOver = "TestInstanceOver";
24 | public const string BreakPointHitted = "BreakPointHitted";
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/deploy/slavelog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/source/src/Modules/ComInterfaceManager/Data/ComInterfaceDescription.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Testflow.Data;
4 | using Testflow.Data.Description;
5 |
6 | namespace Testflow.ComInterfaceManager.Data
7 | {
8 | [Serializable]
9 | public class ComInterfaceDescription : IComInterfaceDescription
10 | {
11 | public ComInterfaceDescription()
12 | {
13 | this.Classes = new List(20);
14 | this.VariableTypes = new List(20);
15 | this.TypeDescriptions = new List(20);
16 | this.Enumerations = new Dictionary(20);
17 | }
18 |
19 | public string Name { get; set; }
20 | public string Description { get; set; }
21 | public int ComponentId { get; set; }
22 | public string Signature { get; internal set; }
23 | public IAssemblyInfo Assembly { get; set; }
24 | public IList Classes { get; }
25 | public IList VariableTypes { get; set; }
26 | public IList TypeDescriptions { get; set; }
27 | public string Category { get; set; }
28 | public IDictionary Enumerations { get; set; }
29 | }
30 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Expression/ExpressionOperatorInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml.Serialization;
3 |
4 | namespace Testflow.Data.Expression
5 | {
6 | ///
7 | /// 表达式操作符配置项
8 | ///
9 | public class ExpressionOperatorInfo
10 | {
11 | ///
12 | /// 操作符名称
13 | ///
14 | [XmlAttribute]
15 | public string Name { get; set; }
16 |
17 | ///
18 | /// 操作符描述信息
19 | ///
20 | [XmlAttribute]
21 | public string Description { get; set; }
22 |
23 | ///
24 | /// 操作符样式
25 | ///
26 | [XmlElement(Order = 1)]
27 | public string Symbol { get; set; }
28 |
29 | ///
30 | /// 操作符格式化字符串,0对应Source,1对应Target
31 | ///
32 | [XmlElement(Order = 2)]
33 | public string FormatString { get; set; }
34 |
35 | ///
36 | /// 运算的优先级,数值越大优先级越高
37 | ///
38 | [XmlElement(Order = 3)]
39 | public int Priority { get; set; }
40 |
41 | ///
42 | /// 参数的个数
43 | ///
44 | [XmlElement(Order = 4)]
45 | public int ArgumentsCount { get; set; }
46 | }
47 | }
--------------------------------------------------------------------------------
/source/src/Dev/UserLibInterface/LibTypeNames.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Usr
2 | {
3 | ///
4 | ///
5 | ///
6 | public static class LibTypeNames
7 | {
8 | ///
9 | /// 断言库类型名
10 | ///
11 | public const string AssertLib = "Assert";
12 |
13 | ///
14 | /// 函数库类型名
15 | ///
16 | public const string FunctionLib = "Function";
17 |
18 | ///
19 | /// 算法库类型名
20 | ///
21 | public const string AlgorithmLib = "Algorithm";
22 |
23 | ///
24 | /// 硬件库类型名
25 | ///
26 | public const string HardwareLib = "Hardware";
27 |
28 | ///
29 | /// 工具库类型名
30 | ///
31 | public const string ToolBoxLib = "ToolBox";
32 |
33 | ///
34 | /// 平台库类型名
35 | ///
36 | public const string PlatformLib = "Platform";
37 |
38 | ///
39 | /// 杂项库类型名
40 | ///
41 | public const string MiscLib = "Miscellaneous";
42 |
43 | ///
44 | /// 流程控制库类型名
45 | ///
46 | public const string FlowCtrlLib = "FlowContrl";
47 | }
48 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequenceGroupParameter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Testflow.Data.Sequence
5 | {
6 | ///
7 | /// 测试序列组参数配置
8 | ///
9 | public interface ISequenceGroupParameter : ISequenceDataContainer
10 | {
11 | ///
12 | /// 参数类的名称
13 | ///
14 | string Name { get; set; }
15 |
16 | ///
17 | /// 参数类的描述信息
18 | ///
19 | string Description { get; set; }
20 |
21 | ///
22 | /// 序列参数信息
23 | ///
24 | ISequenceParameterInfo Info { get; set; }
25 |
26 | ///
27 | /// 序列组内的变量值
28 | ///
29 | IList VariableValues { get; set; }
30 |
31 | ///
32 | /// Setup模块对应的参数配置
33 | ///
34 | ISequenceParameter SetUpParameters { get; set; }
35 |
36 | ///
37 | /// 所有序列对应的参数
38 | ///
39 | IList SequenceParameters { get; set; }
40 |
41 | ///
42 | /// Setup模块对应的参数配置
43 | ///
44 | ISequenceParameter TearDownParameters { get; set; }
45 |
46 | }
47 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/SequenceStepType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data.Sequence
2 | {
3 | ///
4 | /// Step的类型
5 | ///
6 | public enum SequenceStepType
7 | {
8 | ///
9 | /// 执行的步骤
10 | ///
11 | Execution = 0,
12 |
13 | ///
14 | /// 条件分支
15 | ///
16 | ConditionBlock = 1,
17 |
18 | ///
19 | /// 条件表达语句
20 | ///
21 | ConditionStatement = 2,
22 |
23 | ///
24 | /// Try-Finally块
25 | ///
26 | TryFinallyBlock = 3,
27 |
28 | ///
29 | /// 条件循环块
30 | ///
31 | ConditionLoop = 4,
32 |
33 | ///
34 | /// 序列调用步骤
35 | ///
36 | SequenceCall = 5,
37 |
38 | ///
39 | /// 跳转
40 | ///
41 | Goto = 6,
42 |
43 | ///
44 | /// 多线程块
45 | ///
46 | MultiThreadBlock = 7,
47 |
48 | ///
49 | /// 定时调用块
50 | ///
51 | TimerBlock = 8,
52 |
53 | ///
54 | /// 批处理块
55 | ///
56 | BatchBlock = 9
57 | }
58 | }
--------------------------------------------------------------------------------
/source/src/Modules/ConfigurationManager/Constants.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.ConfigurationManager
2 | {
3 | public static class Constants
4 | {
5 | public const string I18nName = "Config";
6 |
7 | #region 配置文件信息
8 |
9 | public const string ConfigFileDir = "deploy";
10 | public const string ConfigFileName = "config.xml";
11 |
12 | public const string ConfigFile = "ConfigFile";
13 |
14 | public const string ConfigName = "TestflowConfiguration";
15 |
16 | #endregion
17 |
18 |
19 | #region 模块配置父节点名称
20 |
21 | public const string GlobalConfig = "GlobalConfig";
22 | public const string RuntimeConfig = "Runtime";
23 | public const string EngineConfig = "EngineCore";
24 | public const string DataMaintain = "DataMaintain";
25 | public const string ResultManage = "ResultManager";
26 | public const string SequenceManage = "SequenceInfo";
27 | public const string ParamCheck = "ParameterCheck";
28 | public const string InterfaceLoad = "InterfaceLoad";
29 |
30 | #endregion
31 |
32 | #region 路径相关常量
33 |
34 | public const string WindirVar = "windir";
35 | public const string DotNetRootDirFormat = @"{0}Microsoft.NET\assembly\";
36 |
37 |
38 | #endregion
39 |
40 |
41 | }
42 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Common/TestflowAssertException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Remoting.Proxies;
3 | using System.Runtime.Serialization;
4 | using Testflow.Usr.I18nUtil;
5 |
6 | namespace Testflow.Usr
7 | {
8 | ///
9 | /// Testflow的断言异常
10 | ///
11 | [Serializable]
12 | public class TestflowAssertException : TestflowException
13 | {
14 | ///
15 | /// 创建TestflowAssertException的实例
16 | ///
17 | /// 错误码
18 | /// 异常信息
19 | public TestflowAssertException(string message) : base(CommonErrorCode.AssertionFailed, message)
20 | {
21 | }
22 |
23 | ///
24 | /// 创建TestflowAssertException的实例
25 | ///
26 | ///
27 | ///
28 | public TestflowAssertException(string expected, string real): base(CommonErrorCode.AssertionFailed,
29 | I18N.GetInstance(CommonConst.I18nName).GetFStr("AssertFailedInfo", expected, real))
30 | {
31 |
32 | }
33 |
34 | public TestflowAssertException(SerializationInfo info, StreamingContext context) : base(info, context)
35 | {
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/deploy/platformlog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/FunctionType.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.Data
2 | {
3 | ///
4 | /// 方法类型
5 | ///
6 | public enum FunctionType
7 | {
8 | ///
9 | /// 构造方法
10 | ///
11 | Constructor = 0,
12 |
13 | ///
14 | /// Struct类型的构造器
15 | ///
16 | StructConstructor = 1,
17 |
18 | ///
19 | /// 实例函数
20 | ///
21 | InstanceFunction = 2,
22 |
23 | ///
24 | /// 静态方法
25 | ///
26 | StaticFunction = 3,
27 |
28 | ///
29 | /// 实例属性配置方法
30 | ///
31 | InstancePropertySetter = 4,
32 |
33 | ///
34 | /// 静态属性配置方法
35 | ///
36 | StaticPropertySetter = 5,
37 |
38 | ///
39 | /// 实例属性配置方法
40 | ///
41 | InstanceFieldSetter = 6,
42 |
43 | ///
44 | /// 静态属性配置方法
45 | ///
46 | StaticFieldSetter = 7,
47 |
48 | ///
49 | /// 断言函数
50 | ///
51 | Assertion = 8,
52 |
53 | ///
54 | /// 回调函数
55 | ///
56 | CallBack = 9
57 | }
58 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/MasterCore/EventData/DebugInformation.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Testflow.Usr;
3 | using Testflow.CoreCommon.Common;
4 | using Testflow.CoreCommon.Data.EventInfos;
5 | using Testflow.Data.Sequence;
6 | using Testflow.Runtime;
7 |
8 | namespace Testflow.MasterCore.EventData
9 | {
10 | internal class DebugInformation : IDebugInformation
11 | {
12 | public ICallStack BreakPoint { get; }
13 | public IDictionary WatchDatas { get; }
14 |
15 | public DebugInformation(DebugEventInfo eventInfo, ISequenceFlowContainer parentSequenceData)
16 | {
17 | this.BreakPoint = eventInfo.BreakPoint;
18 | if (null != eventInfo.WatchData)
19 | {
20 | this.WatchDatas = new Dictionary(eventInfo.WatchData.Count);
21 | for (int i = 0; i < eventInfo.WatchData.Count; i++)
22 | {
23 | IVariable variable = CoreUtils.GetVariable(parentSequenceData, eventInfo.WatchData.Names[i]);
24 | WatchDatas.Add(variable, eventInfo.WatchData.Values[i]);
25 | }
26 | }
27 | else
28 | {
29 | this.WatchDatas = new Dictionary(0);
30 | }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Common/Constants.cs:
--------------------------------------------------------------------------------
1 | namespace Testflow.SlaveCore.Common
2 | {
3 | internal static class Constants
4 | {
5 | public const int DefaultRuntimeSize = 10;
6 | public const int UnverifiedSequenceIndex = -1;
7 |
8 | public const string I18nName = "SlaveCore";
9 |
10 | public const string DefaultNumericFormat = "0.######";
11 |
12 | public const string StructTypeName = "Struct";
13 |
14 | public const string PropertyDelim = ".";
15 |
16 | public const int ThreadAbortJoinTime = 10000;
17 |
18 | public const int AbortWaitTime = 200;
19 |
20 | public const int ExecutionTrackerSize = 500;
21 |
22 | public const string TaskThreadNameFormt = "TaskThread:Session'{0}'Sequence'{1}'";
23 |
24 | public const string TaskRootThreadNameFormat = "TaskThread:Session'{0}'Root";
25 |
26 | public const string StatusMonitorThread = "MonitorThread:Session'{0}'";
27 |
28 | public const int WakeTimerInterval = 500;
29 |
30 | public const int KeyStatusSendInterval = 100;
31 |
32 | public const string EmptySetupName = "SetUp";
33 | public const string EmptyTeardownName = "TearDown";
34 |
35 | public const int MaxWatchDataLength = 65536;
36 |
37 | public const string IllegalValue = "N/A";
38 | }
39 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Description/IFuncInterfaceDescription.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Testflow.Data.Description
4 | {
5 | ///
6 | /// 方法描述接口
7 | ///
8 | public interface IFuncInterfaceDescription : IDescriptionData
9 | {
10 | ///
11 | /// 属于那种类型
12 | ///
13 | FunctionType FuncType { get; set; }
14 |
15 | ///
16 | /// 组件的索引在全局的索引号
17 | ///
18 | int ComponentIndex { get; set; }
19 |
20 | ///
21 | /// 对应的Type对象
22 | ///
23 | ITypeData ClassType { get; set; }
24 |
25 | ///
26 | /// 是否是泛型方法
27 | ///
28 | bool IsGeneric { get; set; }
29 |
30 | ///
31 | /// 方法返回值信息
32 | ///
33 | IArgumentDescription Return { get; set; }
34 |
35 | ///
36 | /// 入参列表信息
37 | ///
38 | IList Arguments { get; set; }
39 |
40 | ///
41 | /// 方法被显示的签名字符串
42 | ///
43 | string Signature { get; set; }
44 |
45 | ///
46 | /// 功能类别
47 | ///
48 | string Category { get; set; }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Runner/Convertors/ValueConvertorBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Testflow.Data;
4 |
5 | namespace Testflow.SlaveCore.Runner.Convertors
6 | {
7 | internal abstract class ValueConvertorBase
8 | {
9 | protected Dictionary> ConvertFuncs { get; }
10 |
11 | protected ValueConvertorBase()
12 | {
13 | ConvertFuncs = new Dictionary>(20);
14 | InitializeConvertFuncs();
15 | }
16 |
17 | protected abstract void InitializeConvertFuncs();
18 |
19 | public abstract object GetDefaultValue();
20 |
21 | public object CastValue(ITypeData targetType, object sourceValue)
22 | {
23 | return ConvertFuncs[targetType.Name].Invoke(sourceValue);
24 | }
25 |
26 | public object CastValue(Type targetType, object sourceValue)
27 | {
28 | return ConvertFuncs[targetType.Name].Invoke(sourceValue);
29 | }
30 |
31 | public bool IsValidCastTarget(ITypeData targetType)
32 | {
33 | return ConvertFuncs.ContainsKey(targetType.Name);
34 | }
35 |
36 | public bool IsValidCastTarget(Type targetType)
37 | {
38 | return ConvertFuncs.ContainsKey(targetType.Name);
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Sequence/ISequenceGroupInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 | using System.Xml.Serialization;
4 | using Testflow.Usr;
5 |
6 | namespace Testflow.Data.Sequence
7 | {
8 | ///
9 | /// 保存测试序列组相关信息的接口
10 | ///
11 | public interface ISequenceGroupInfo : ICloneableClass, ISequenceElement
12 | {
13 | ///
14 | /// 测试序列组的格式版本
15 | ///
16 | string Version { get; set; }
17 |
18 | ///
19 | /// 测试序列组的哈希值,用以唯一确定一个测试序列组,一旦创建不会再更改
20 | ///
21 | string Hash { get; set; }
22 |
23 | ///
24 | /// 测试序列组的创建时间
25 | ///
26 | DateTime CreationTime { get; set; }
27 |
28 | ///
29 | /// 测试序列组的最新更新时间
30 | ///
31 | DateTime ModifiedTime { get; set; }
32 |
33 | ///
34 | /// 测试序列组文件的路径
35 | ///
36 | [XmlIgnore]
37 | string SequenceGroupFile { get; set; }
38 |
39 | ///
40 | /// 测试序列组参数配置文件的路径
41 | ///
42 | string SequenceParamFile { get; set; }
43 |
44 | ///
45 | /// 测试序列组是否被修改的标识位
46 | ///
47 | [XmlIgnore]
48 | bool Modified { get; set; }
49 | }
50 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/FlowControl/TestflowLoopBreakException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.Usr;
3 |
4 | namespace Testflow.FlowControl
5 | {
6 | ///
7 | /// 跳出当前循环异常
8 | ///
9 | public class TestflowLoopBreakException : TestflowException
10 | {
11 | ///
12 | /// 是否停止循环:true,停止循环后续执行;false,停止当前循环,进入下个循环
13 | ///
14 | public bool BreakLoop { get; }
15 |
16 | private int _count;
17 | ///
18 | /// 循环计数,每跳出一层循环计数减1。计数为0时停止
19 | ///
20 | public int Count => _count;
21 |
22 | ///
23 | /// 创建当前异常的实例
24 | ///
25 | /// 是否停止循环:true,停止循环后续执行;false,停止当前循环,进入下个循环
26 | /// 内部异常
27 | /// 跳出循环次数,默认为1
28 | public TestflowLoopBreakException(bool breakLoop, Exception innerException, int breakTime = 1) :
29 | base(CommonErrorCode.FlowControl, "Flow Control", innerException)
30 | {
31 | this.BreakLoop = breakLoop;
32 | this._count = breakTime;
33 | }
34 |
35 | ///
36 | /// 减少一次Loop的计数
37 | ///
38 | public void CalcDown()
39 | {
40 | this._count--;
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Data/SequenceStatusInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Testflow.CoreCommon.Data;
4 | using Testflow.Data.Sequence;
5 | using Testflow.Runtime;
6 | using Testflow.Runtime.Data;
7 |
8 | namespace Testflow.SlaveCore.Data
9 | {
10 | internal class SequenceStatusInfo
11 | {
12 | public int Sequence { get; }
13 | public CallStack Stack { get; }
14 | public RuntimeState SequenceState { get; }
15 | public StepResult Result { get; }
16 | public StatusReportType ReportType { get; }
17 | public FailedInfo FailedInfo { get; }
18 | public DateTime ExecutionTime { get; set; }
19 | public long ExecutionTicks { get; set; }
20 | public int CoroutineId { get; set; }
21 | public DateTime Time { get; }
22 | public Dictionary WatchDatas { get; set; }
23 |
24 | public SequenceStatusInfo(int sequence, CallStack stack, StatusReportType type, RuntimeState sequenceState, StepResult result, FailedInfo failedInfo = null)
25 | {
26 | this.SequenceState = sequenceState;
27 | this.Sequence = sequence;
28 | this.Stack = stack;
29 | this.ReportType = type;
30 | this.FailedInfo = failedInfo;
31 | this.Time = DateTime.Now;
32 | this.Result = result;
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/source/src/Dev/Common/Data/Expression/ExpressionCalculatorInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Xml.Serialization;
4 |
5 | namespace Testflow.Data.Expression
6 | {
7 | ///
8 | /// 表达式计算类信息
9 | ///
10 | [Serializable]
11 | public class ExpressionCalculatorInfo
12 | {
13 | ///
14 | /// 计算类名称
15 | ///
16 | [XmlAttribute]
17 | public string Name { get; set; }
18 |
19 | ///
20 | /// 操作符描述信息
21 | ///
22 | [XmlAttribute]
23 | public string Description { get; set; }
24 |
25 | ///
26 | /// 操作符名称
27 | ///
28 | [XmlElement]
29 | public string OperatorName { get; set; }
30 |
31 | ///
32 | /// 表达式计算类的类型信息
33 | ///
34 | [XmlElement]
35 | public ExpressionTypeData CalculatorClass { get; set; }
36 |
37 | ///
38 | /// 源数据类型
39 | ///
40 | [XmlElement]
41 | public ExpressionTypeData SourceType { get; set; }
42 |
43 | ///
44 | /// 参数数据类型
45 | ///
46 | [XmlArrayItem("ArgumentType")]
47 | [XmlArray("ArgumentTypes")]
48 | public List ArgumentsType { get; set; }
49 | }
50 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/CoreCommon/Messages/TestGenMessage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Serialization;
3 | using Testflow.CoreCommon.Common;
4 | using Testflow.Runtime;
5 |
6 | namespace Testflow.CoreCommon.Messages
7 | {
8 | ///
9 | /// 测试生成报告消息
10 | ///
11 | [Serializable]
12 | public class TestGenMessage : MessageBase
13 | {
14 | // TODO 暂时停止到Sequence级别的报告
15 | // public int SequenecIndex { get; set; }
16 |
17 | public GenerationStatus State { get; set; }
18 |
19 | public TestGenMessage(string name, int id, int sequenceIndex, GenerationStatus state) : base(name, id, MessageType.TestGen)
20 | {
21 | // this.SequenecIndex = sequenceIndex;
22 | this.State = state;
23 | }
24 |
25 | public TestGenMessage(SerializationInfo info, StreamingContext context) : base(info, context)
26 | {
27 | // this.SequenecIndex = (int) info.GetValue("SequenceIndex", typeof(int));
28 | this.State = (GenerationStatus) info.GetValue("State", typeof(GenerationStatus));
29 | }
30 |
31 | public override void GetObjectData(SerializationInfo info, StreamingContext context)
32 | {
33 | base.GetObjectData(info, context);
34 | // info.AddValue("SequenecIndex", SequenecIndex);
35 | info.AddValue("State", State);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/source/src/Modules/Core/SlaveCore/Data/ExecutionTrack.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Testflow.CoreCommon.Data;
3 | using Testflow.Runtime.Data;
4 | using Testflow.SlaveCore.Runner.Model;
5 |
6 | namespace Testflow.SlaveCore.Data
7 | {
8 | internal class ExecutionTrack : IDisposable
9 | {
10 | private OverLapBuffer _stepExecutionInfos;
11 | public ExecutionTrack(int capacity)
12 | {
13 | _stepExecutionInfos = new OverLapBuffer(capacity);
14 | }
15 |
16 | public void Enqueue(StepTaskEntityBase stepEntity)
17 | {
18 | _stepExecutionInfos.Enqueue(new StepExecutionInfo(stepEntity, StepResult.NotAvailable));
19 | }
20 |
21 | public StepExecutionInfo GetLastStep(int offset)
22 | {
23 | return _stepExecutionInfos.GetLastElement(offset);
24 | }
25 |
26 | public StepExecutionInfo GetLastNotAvailableStep()
27 | {
28 | StepExecutionInfo stepInfo;
29 | int offset = 1;
30 | do
31 | {
32 | stepInfo = _stepExecutionInfos.GetLastElement(offset);
33 | } while (null != stepInfo && stepInfo.StepResult != StepResult.NotAvailable);
34 | return stepInfo;
35 | }
36 |
37 | public void Dispose()
38 | {
39 | _stepExecutionInfos.Dispose();
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/source/src/Dev/Logger/logconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------