ITestResultAdaptor.cs 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. using System;
  2. using System.Collections.Generic;
  3. using NUnit.Framework.Interfaces;
  4. namespace UnityEditor.TestTools.TestRunner.Api
  5. {
  6. public interface ITestResultAdaptor
  7. {
  8. ITestAdaptor Test { get; }
  9. string Name { get; }
  10. /// <summary>Gets the full name of the test result</summary>
  11. string FullName { get; }
  12. string ResultState { get; }
  13. TestStatus TestStatus { get; }
  14. /// <summary>Gets the elapsed time for running the test in seconds</summary>
  15. double Duration { get; }
  16. /// <summary>Gets or sets the time the test started running.</summary>
  17. DateTime StartTime { get; }
  18. /// <summary>Gets or sets the time the test finished running.</summary>
  19. DateTime EndTime { get; }
  20. /// <summary>
  21. /// Gets the message associated with a test
  22. /// failure or with not running the test
  23. /// </summary>
  24. string Message { get; }
  25. /// <summary>
  26. /// Gets any stacktrace associated with an
  27. /// error or failure. Not available in
  28. /// the Compact Framework 1.0.
  29. /// </summary>
  30. string StackTrace { get; }
  31. /// <summary>
  32. /// Gets the number of asserts executed
  33. /// when running the test and all its children.
  34. /// </summary>
  35. int AssertCount { get; }
  36. /// <summary>
  37. /// Gets the number of test cases that failed
  38. /// when running the test and all its children.
  39. /// </summary>
  40. int FailCount { get; }
  41. /// <summary>
  42. /// Gets the number of test cases that passed
  43. /// when running the test and all its children.
  44. /// </summary>
  45. int PassCount { get; }
  46. /// <summary>
  47. /// Gets the number of test cases that were skipped
  48. /// when running the test and all its children.
  49. /// </summary>
  50. int SkipCount { get; }
  51. /// <summary>
  52. /// Gets the number of test cases that were inconclusive
  53. /// when running the test and all its children.
  54. /// </summary>
  55. int InconclusiveCount { get; }
  56. /// <summary>
  57. /// Indicates whether this result has any child results.
  58. /// Accessing HasChildren should not force creation of the
  59. /// Children collection in classes implementing this interface.
  60. /// </summary>
  61. bool HasChildren { get; }
  62. /// <summary>Gets the the collection of child results.</summary>
  63. IEnumerable<ITestResultAdaptor> Children { get; }
  64. /// <summary>Gets any text output written to this result.</summary>
  65. string Output { get; }
  66. TNode ToXml();
  67. }
  68. }