コード例 #1
0
 public ErrorTestBase(UnrealTestContext InContext)
     : base(InContext)
 {
     ErrorType  = ErrorTypes.Check;
     ErrorDelay = 5;
     Server     = false;
 }
コード例 #2
0
        public override void CreateReport(TestResult Result, UnrealTestContext Contex, UnrealBuildSource Build, IEnumerable <UnrealRoleArtifacts> Artifacts, string ArtifactPath)
        {
            UnrealRoleArtifacts ClientArtifacts = Artifacts.Where(A => A.SessionRole.RoleType == UnrealTargetRole.Client).FirstOrDefault();

            var SnapshotSummary = new UnrealSnapshotSummary <UnrealHealthSnapshot>(ClientArtifacts.AppInstance.StdOut);

            Log.Info("Elemental Performance Report");
            Log.Info(SnapshotSummary.ToString());

            base.CreateReport(Result, Contex, Build, Artifacts, ArtifactPath);
        }
コード例 #3
0
        /// <summary>
        /// Called after a test finishes to create an overall summary based on looking at the artifacts
        /// </summary>
        /// <param name="Result"></param>
        /// <param name="Context"></param>
        /// <param name="Build"></param>
        /// <param name="Artifacts"></param>
        /// <param name="InArtifactPath"></param>
        public override void CreateReport(TestResult Result, UnrealTestContext Context, UnrealBuildSource Build, IEnumerable <UnrealRoleArtifacts> Artifacts, string InArtifactPath)
        {
            // only check for artifacts if the test passed
            if (Result != TestResult.Passed)
            {
                return;
            }

            if (!DidDetectLaunch)
            {
                SetUnrealTestResult(TestResult.Failed);
                Log.Error("Failed to detect completion of launch");
                return;
            }

            bool MissingFiles = false;

            foreach (var RoleArtifact in Artifacts)
            {
                DirectoryInfo RoleDir = new DirectoryInfo(RoleArtifact.ArtifactPath);

                IEnumerable <FileInfo> ArtifactFiles = RoleDir.EnumerateFiles("*.*", SearchOption.AllDirectories);

                // user may not have cleared paths between runs, so throw away anything that's older than 2m
                ArtifactFiles = ArtifactFiles.Where(F => (DateTime.Now - F.LastWriteTime).TotalMinutes < 2);

                if (ArtifactFiles.Any() == false)
                {
                    MissingFiles = true;
                    Log.Error("No artifact files found for {0}. Were they not retrieved from the device?", RoleArtifact.SessionRole);
                }

                IEnumerable <FileInfo> LogFiles = ArtifactFiles.Where(F => F.Extension.Equals(".log", StringComparison.OrdinalIgnoreCase));

                if (LogFiles.Any() == false)
                {
                    MissingFiles = true;
                    Log.Error("No log files found for {0}. Were they not retrieved from the device?", RoleArtifact.SessionRole);
                }
            }

            if (MissingFiles)
            {
                SetUnrealTestResult(TestResult.Failed);
                Log.Error("One or more roles did not generated any artifacts");
            }

            Log.Info("Found valid artifacts for test");
        }
コード例 #4
0
 public ErrorTestGPF(UnrealTestContext InContext)
     : base(InContext)
 {
     ErrorType = ErrorTypes.GPF;
 }
コード例 #5
0
 public ErrorTestFatal(UnrealTestContext InContext)
     : base(InContext)
 {
     ErrorType = ErrorTypes.Fatal;
 }
コード例 #6
0
 public ErrorTestCheck(UnrealTestContext InContext)
     : base(InContext)
 {
     ErrorType = ErrorTypes.Check;
 }
コード例 #7
0
 public ErrorTestEnsure(UnrealTestContext InContext)
     : base(InContext)
 {
     ErrorType = ErrorTypes.Ensure;
 }
 public BasicDedicatedServerTest(UnrealTestContext InContext) : base(InContext)
 {
 }
コード例 #9
0
 public EpicGameTestNode(UnrealTestContext InContext) : base(InContext)
 {
 }
 public ListenServerQuickMatchTest(UnrealTestContext InContext) : base(InContext)
 {
 }
コード例 #11
0
ファイル: RunEditorTests.cs プロジェクト: LLChennn/UE4.21
 public EditorTestNode(UnrealTestContext InContext) : base(InContext)
 {
 }
コード例 #12
0
 public DefaultTest(UnrealTestContext InContext) : base(InContext)
 {
 }
コード例 #13
0
 public HorizonUIPluginDemoTest(UnrealTestContext InContext) : base(InContext)
 {
 }
コード例 #14
0
 public DaeGauntletTest(UnrealTestContext InContext) : base(InContext)
 {
 }
コード例 #15
0
 public BootTest(UnrealTestContext InContext) : base(InContext)
 {
 }
コード例 #16
0
 public ListenServerTest(UnrealTestContext InContext) : base(InContext)
 {
 }