No Description
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.

RemoteTestResultData.cs 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using System.Linq;
  3. using NUnit.Framework.Interfaces;
  4. namespace UnityEngine.TestRunner.TestLaunchers
  5. {
  6. [Serializable]
  7. internal class RemoteTestResultData
  8. {
  9. public string testId;
  10. public string name;
  11. public string fullName;
  12. public string resultState;
  13. public TestStatus testStatus;
  14. public double duration;
  15. public DateTime startTime;
  16. public DateTime endTime;
  17. public string message;
  18. public string stackTrace;
  19. public int assertCount;
  20. public int failCount;
  21. public int passCount;
  22. public int skipCount;
  23. public int inconclusiveCount;
  24. public bool hasChildren;
  25. public string output;
  26. public string xml;
  27. public string[] childrenIds;
  28. internal RemoteTestResultData(ITestResult result, bool isTopLevel)
  29. {
  30. testId = result.Test.Id;
  31. name = result.Name;
  32. fullName = result.FullName;
  33. resultState = result.ResultState.ToString();
  34. testStatus = result.ResultState.Status;
  35. duration = result.Duration;
  36. startTime = result.StartTime;
  37. endTime = result.EndTime;
  38. message = result.Message;
  39. stackTrace = result.StackTrace;
  40. assertCount = result.AssertCount;
  41. failCount = result.FailCount;
  42. passCount = result.PassCount;
  43. skipCount = result.SkipCount;
  44. inconclusiveCount = result.InconclusiveCount;
  45. hasChildren = result.HasChildren;
  46. output = result.Output;
  47. if (isTopLevel)
  48. {
  49. xml = result.ToXml(true).OuterXml;
  50. }
  51. childrenIds = result.Children.Select(child => child.Test.Id).ToArray();
  52. }
  53. }
  54. }