SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
2.9 KiB

4 years ago
  1. # ITestAdaptor
  2. `ITestAdaptor` is a representation of a node in the test tree implemented as a wrapper around the [NUnit](http://www.nunit.org/) [ITest](https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Interfaces/ITest.cs) interface.
  3. ## Properties
  4. | Syntax | Description |
  5. | ---------- | ------------------------------------------------------------ |
  6. | `string Id` | The ID of the test tree node. The ID can change if you add new tests to the suite. Use `UniqueName`, if you want to have a more permanent point of reference. |
  7. | `string Name` | The name of the test. E.g., `MyTest`. |
  8. | `string FullName` | The full name of the test. E.g., `MyNamespace.MyTestClass.MyTest`. |
  9. | `int TestCaseCount` | The total number of test cases in the node and all sub-nodes. |
  10. | `bool HasChildren` | Whether the node has any children. |
  11. | `bool IsSuite` | Whether the node is a test suite/fixture. |
  12. | `IEnumerable<ITestAdaptor> Children` | The child nodes. |
  13. | `ITestAdaptor Parent` | The parent node, if any. |
  14. | `int TestCaseTimeout` | The test case timeout in milliseconds. Note that this value is only available on TestFinished. |
  15. | `ITypeInfo TypeInfo` | The type of test class as an `NUnit` [ITypeInfo](https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Interfaces/ITypeInfo.cs). If the node is not a test class, then the value is `null`. |
  16. | `IMethodInfo Method` | The [Nunit IMethodInfo](https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Interfaces/IMethodInfo.cs) of the test method. If the node is not a test method, then the value is `null`. |
  17. | `string[] Categories` | An array of the categories applied to the test or fixture. |
  18. | `bool IsTestAssembly` | Whether the node represents a test assembly. |
  19. | `RunState RunState` | The run state of the test node. Either `NotRunnable`, `Runnable`, `Explicit`, `Skipped`, or `Ignored`. |
  20. | `string Description` | The description of the test. |
  21. | `string SkipReason` | The skip reason. E.g., if ignoring the test. |
  22. | `string ParentId` | The ID of the parent node. |
  23. | `string ParentFullName` | The full name of the parent node. |
  24. | `string UniqueName` | A unique generated name for the test node. E.g., `Tests.dll/MyNamespace/MyTestClass/[Tests][MyNamespace.MyTestClass.MyTest]`. |
  25. | `string ParentUniqueName` | A unique name of the parent node. E.g., `Tests.dll/MyNamespace/[Tests][MyNamespace.MyTestClass][suite]`. |
  26. | `int ChildIndex` | The child index of the node in its parent. |
  27. | `TestMode TestMode` | The mode of the test. Either **Edit Mode** or **Play Mode**. |
  28. > **Note**: Some properties are not available when receiving the test tree as a part of a test result coming from a standalone Player, such as `TypeInfo` and `Method`.