Beispiel #1
0
        public void BridgeLogMessage()
        {
            var launchReporter = new LaunchReporter(_service);

            Bridge.Context.LaunchReporter = launchReporter;

            launchReporter.Start(new StartLaunchRequest
            {
                Name      = "ReportPortal Shared",
                StartTime = DateTime.UtcNow,
                Mode      = LaunchMode.Debug,
                Tags      = new System.Collections.Generic.List <string>()
            });


            var suiteNode = launchReporter.StartChildTestReporter(new StartTestItemRequest
            {
                Name      = $"Suite",
                StartTime = DateTime.UtcNow,
                Type      = TestItemType.Suite
            });

            var testNode = suiteNode.StartChildTestReporter(new StartTestItemRequest
            {
                Name      = $"Test",
                StartTime = DateTime.UtcNow,
                Type      = TestItemType.Step
            });

            for (int i = 0; i < 20; i++)
            {
                Log.Message(new AddLogItemRequest
                {
                    Level = LogLevel.Info,
                    Time  = DateTime.UtcNow.AddMilliseconds(i),
                    Text  = $"Log {i}"
                });
            }

            testNode.Finish(new Client.Requests.FinishTestItemRequest
            {
                EndTime = DateTime.UtcNow,
                Status  = Client.Models.Status.Passed
            });

            suiteNode.Finish(new Client.Requests.FinishTestItemRequest
            {
                EndTime = DateTime.UtcNow,
                Status  = Client.Models.Status.Passed
            });

            launchReporter.Finish(new Client.Requests.FinishLaunchRequest
            {
                EndTime = DateTime.UtcNow
            });

            launchReporter.FinishTask.Wait();
        }
Beispiel #2
0
        public void ShouldThrowExceptionWhenStartingAlreadyStartedTestItem()
        {
            var service = new MockServiceBuilder().Build();

            var launch = new LaunchReporter(service.Object, null, null, new Mock <IExtensionManager>().Object);

            launch.Start(new StartLaunchRequest());
            var test = launch.StartChildTestReporter(new StartTestItemRequest());

            test.Invoking(t => t.Start(new StartTestItemRequest())).Should().ThrowExactly <InsufficientExecutionStackException>();
        }
Beispiel #3
0
        public void MixingTestsAndLogs()
        {
            var service = new MockServiceBuilder().Build();

            var launchReporter = new LaunchReporter(service.Object, null, null, new ExtensionManager());

            launchReporter.Start(new StartLaunchRequest {
                StartTime = DateTime.UtcNow
            });

            for (int i = 0; i < 10; i++)
            {
                var suite = launchReporter.StartChildTestReporter(new StartTestItemRequest {
                    StartTime = DateTime.UtcNow
                });

                suite.Log(new CreateLogItemRequest {
                    Time = DateTime.UtcNow
                });

                for (int j = 0; j < 20; j++)
                {
                    var test = suite.StartChildTestReporter(new StartTestItemRequest {
                        StartTime = DateTime.UtcNow
                    });

                    test.Log(new CreateLogItemRequest {
                        Time = DateTime.UtcNow
                    });

                    test.Finish(new FinishTestItemRequest {
                        EndTime = DateTime.UtcNow
                    });
                }

                suite.Log(new CreateLogItemRequest {
                    Time = DateTime.UtcNow
                });

                suite.Finish(new FinishTestItemRequest {
                    EndTime = DateTime.UtcNow
                });
            }

            launchReporter.Finish(new FinishLaunchRequest {
                EndTime = DateTime.UtcNow
            });

            launchReporter.Sync();
        }
Beispiel #4
0
        public void FinishTestItemWhenChildTestItemIsNotScheduledToFinish()
        {
            var service = new MockServiceBuilder().Build();

            var launch = new LaunchReporter(service.Object, null, null, new Mock <IExtensionManager>().Object);

            launch.Start(new StartLaunchRequest {
            });
            var test      = launch.StartChildTestReporter(new StartTestItemRequest());
            var innerTest = test.StartChildTestReporter(new StartTestItemRequest());

            var exp = Assert.Throws <InsufficientExecutionStackException>(() => test.Finish(new FinishTestItemRequest()));

            Assert.Contains("are not scheduled to finish yet", exp.Message);
        }
Beispiel #5
0
        public void LaunchReporter()
        {
            var configuration = new Configuration.ConfigurationBuilder().Build();

            var nopService     = new NopService();
            var launchReporter = new LaunchReporter(nopService, configuration, null, new ExtensionManager());

            var launchDateTime = DateTime.UtcNow;

            launchReporter.Start(new StartLaunchRequest
            {
                Name      = "ReportPortal Benchmark",
                StartTime = launchDateTime,
                Mode      = LaunchMode.Debug
            });

            for (int i = 0; i < SuitesCount; i++)
            {
                var suiteNode = launchReporter.StartChildTestReporter(new StartTestItemRequest
                {
                    Name      = $"Suite {i}",
                    StartTime = launchDateTime.AddMilliseconds(-1),
                    Type      = TestItemType.Suite
                });

                suiteNode.Finish(new FinishTestItemRequest
                {
                    EndTime = launchDateTime,
                    Status  = Status.Passed
                });
            }

            launchReporter.Finish(new FinishLaunchRequest
            {
                EndTime = launchDateTime
            });

            launchReporter.Sync();
        }
        public void LaunchReporter()
        {
            var nopService     = new NopService(new Uri("https://rp.epam.com/api/v1/"), "", "");
            var launchReporter = new LaunchReporter(nopService);

            var launchDateTime = DateTime.UtcNow;

            launchReporter.Start(new Client.Requests.StartLaunchRequest
            {
                Name      = "ReportPortal Benchmark",
                StartTime = launchDateTime,
                Mode      = Client.Models.LaunchMode.Debug,
                Tags      = new System.Collections.Generic.List <string>()
            });

            for (int i = 0; i < SuitesCount; i++)
            {
                var suiteNode = launchReporter.StartChildTestReporter(new Client.Requests.StartTestItemRequest
                {
                    Name      = $"Suite {i}",
                    StartTime = launchDateTime.AddMilliseconds(-1),
                    Type      = Client.Models.TestItemType.Suite
                });

                suiteNode.Finish(new Client.Requests.FinishTestItemRequest
                {
                    EndTime = launchDateTime,
                    Status  = Client.Models.Status.Passed
                });
            }

            launchReporter.Finish(new Client.Requests.FinishLaunchRequest
            {
                EndTime = launchDateTime
            });

            launchReporter.FinishTask.Wait();
        }
        private void SetOrCreateReporter(ITestSuite currentContext)
        {
            if (_context.GetSuiteReporter(currentContext.Name) == null)
            {
                _context.AddSuite(currentContext.Name, _launchReporter.StartChildTestReporter(new StartTestItemRequest
                {
                    StartTime = DateTime.UtcNow,
                    Type      = TestItemType.Suite,
                    Name      = currentContext.Name
                }));
            }
            _currentReporter = _context.GetSuiteReporter(currentContext.Name);

            if (currentContext.CurrentTestContainer != null)
            {
                var currentTest = currentContext.CurrentTestContainer;

                if (_context.GetTestReporter(currentTest.Name) == null)
                {
                    //new test. finish previous test(s) as ranorex has only single run
                    foreach (var test in _context.GetTests())
                    {
                        FinishTestItem(test);
                    }
                    _currentTestState = null;
                    _context.AddTest(currentTest.Name, _currentReporter.StartChildTestReporter(new StartTestItemRequest
                    {
                        StartTime = DateTime.UtcNow,
                        Type      = TestItemType.Test,
                        Name      = currentTest.Name
                    }));
                }

                _currentReporter = _context.GetTestReporter(currentTest.Name);
            }
        }
Beispiel #8
0
        public async Task UseRerunLaunchId()
        {
            var launchDateTime = DateTime.UtcNow;
            var launchName     = "UseRerunLaunchId";

            var launch = await _service.Launch.StartAsync(new StartLaunchRequest
            {
                Name      = launchName,
                StartTime = launchDateTime,
                Mode      = LaunchMode.Debug
            });

            var config = new ConfigurationBuilder().Build();

            config.Properties["Launch:RerunOf"] = launch.Uuid;

            var tasks = new List <Task <LaunchReporter> >();

            for (int i = 0; i < 3; i++)
            {
                tasks.Add(Task.Run(() =>
                {
                    var r_launch = new LaunchReporter(_service, config, null, null);

                    r_launch.Start(new StartLaunchRequest
                    {
                        Name      = "UseRerunLaunchId",
                        StartTime = launchDateTime,
                        Mode      = LaunchMode.Debug
                    });

                    for (int j = 0; j < 30; j++)
                    {
                        var r_suiteReporter = r_launch.StartChildTestReporter(new StartTestItemRequest
                        {
                            Name      = $"Suite {j}",
                            StartTime = launchDateTime,
                            Type      = TestItemType.Suite
                        });

                        for (int jj = 0; jj < 3; jj++)
                        {
                            var rr_suiteReporter = r_suiteReporter.StartChildTestReporter(new StartTestItemRequest
                            {
                                Name      = $"Suite {jj}",
                                StartTime = launchDateTime,
                                Type      = TestItemType.Suite
                            });

                            for (int k = 0; k < 0; k++)
                            {
                                var r_test = rr_suiteReporter.StartChildTestReporter(new StartTestItemRequest
                                {
                                    Name      = $"Test {k}",
                                    StartTime = launchDateTime,
                                    Type      = TestItemType.Step
                                });

                                for (int l = 0; l < 0; l++)
                                {
                                    r_test.Log(new CreateLogItemRequest
                                    {
                                        Level = LogLevel.Info,
                                        Text  = $"Log message #{l}",
                                        Time  = launchDateTime
                                    });
                                }

                                r_test.Finish(new FinishTestItemRequest
                                {
                                    EndTime = launchDateTime,
                                    Status  = Status.Passed
                                });
                            }

                            rr_suiteReporter.Finish(new FinishTestItemRequest
                            {
                                EndTime = launchDateTime,
                                Status  = Status.Passed
                            });
                        }

                        r_suiteReporter.Finish(new FinishTestItemRequest
                        {
                            EndTime = launchDateTime,
                            Status  = Status.Passed
                        });
                    }

                    r_launch.Finish(new FinishLaunchRequest
                    {
                        EndTime = launchDateTime
                    });

                    r_launch.Sync();

                    return(r_launch);
                }));
            }

            Task.WaitAll(tasks.ToArray());

            var reportedLaunch = await _service.Launch.GetAsync(launch.Uuid);

            Assert.Equal(launchName, reportedLaunch.Name);
            Assert.Equal(launchDateTime.ToString(), reportedLaunch.StartTime.ToString());

            await _service.Launch.FinishAsync(launch.Uuid, new FinishLaunchRequest
            {
                EndTime = DateTime.UtcNow
            });

            //var gotLaunch = await _service.Launch.GetAsync(launchReporter.LaunchInfo.Uuid);

            //await _service.Launch.DeleteAsync(gotLaunch.Id);
        }
Beispiel #9
0
        public async Task UseRerun()
        {
            var launchDateTime = DateTime.UtcNow;
            var launchName     = "UseRerun";

            var launch = await _service.Launch.StartAsync(new StartLaunchRequest
            {
                Name      = launchName,
                StartTime = launchDateTime,
                Mode      = LaunchMode.Debug
            });

            await _service.Launch.FinishAsync(launch.Uuid, new FinishLaunchRequest
            {
                EndTime = DateTime.UtcNow
            });

            var config = new ConfigurationBuilder().Build();

            config.Properties["Launch:Rerun"] = true;


            var r_launch = new LaunchReporter(_service, config, null, new ExtensionManager());

            r_launch.Start(new StartLaunchRequest
            {
                Name      = "UseRerun",
                StartTime = launchDateTime,
                Mode      = LaunchMode.Debug
            });

            for (int j = 0; j < 1; j++)
            {
                var r_suiteReporter = r_launch.StartChildTestReporter(new StartTestItemRequest
                {
                    Name      = $"Suite {j}",
                    StartTime = launchDateTime,
                    Type      = TestItemType.Suite
                });

                for (int jj = 0; jj < 1; jj++)
                {
                    var rr_suiteReporter = r_suiteReporter.StartChildTestReporter(new StartTestItemRequest
                    {
                        Name      = $"Suite {jj}",
                        StartTime = launchDateTime,
                        Type      = TestItemType.Suite
                    });

                    for (int k = 0; k < 10; k++)
                    {
                        var r_test = rr_suiteReporter.StartChildTestReporter(new StartTestItemRequest
                        {
                            Name      = $"Test {k}",
                            StartTime = launchDateTime,
                            Type      = TestItemType.Step
                        });

                        for (int l = 0; l < 0; l++)
                        {
                            r_test.Log(new CreateLogItemRequest
                            {
                                Level = LogLevel.Info,
                                Text  = $"Log message #{l}",
                                Time  = launchDateTime
                            });
                        }

                        r_test.Finish(new FinishTestItemRequest
                        {
                            EndTime = launchDateTime,
                            Status  = Status.Passed
                        });
                    }

                    rr_suiteReporter.Finish(new FinishTestItemRequest
                    {
                        EndTime = launchDateTime,
                        Status  = Status.Passed
                    });
                }

                r_suiteReporter.Finish(new FinishTestItemRequest
                {
                    EndTime = launchDateTime,
                    Status  = Status.Passed
                });
            }

            r_launch.Finish(new FinishLaunchRequest
            {
                EndTime = launchDateTime
            });

            r_launch.Sync();

            var reportedLaunch = await _service.Launch.GetAsync(r_launch.Info.Uuid);

            Assert.Equal(launchName, reportedLaunch.Name);
            Assert.Equal(launchDateTime.ToString(), reportedLaunch.StartTime.ToString());

            var gotLaunch = await _service.Launch.GetAsync(r_launch.Info.Uuid);

            await _service.Launch.DeleteAsync(gotLaunch.Id);
        }
Beispiel #10
0
        static void Main(string[] args)
        {
            var port = Convert.ToInt32(Environment.GetEnvironmentVariable("plugin_connection_port"));

            var rpUri     = new Uri(Config.GetValue <string>("Uri"));
            var rpProject = Config.GetValue <string>("Project");
            var rpUuid    = Config.GetValue <string>("Uuid");

            var service        = new Service(rpUri, rpProject, rpUuid);
            var launchReporter = new LaunchReporter(service, Config, requestExecuterFactory: null);

            using (var gaugeConnection = new GaugeConnection(new TcpClientWrapper(port)))
            {
                while (gaugeConnection.Connected)
                {
                    var message = Message.Parser.ParseFrom(gaugeConnection.ReadBytes().ToArray());

                    if (message.MessageType == Message.Types.MessageType.SuiteExecutionResult)
                    {
                        var suiteExecutionResult = message.SuiteExecutionResult.SuiteResult;

                        var launchStartDateTime = DateTime.UtcNow.AddMilliseconds(-suiteExecutionResult.ExecutionTime);
                        launchReporter.Start(new Client.Requests.StartLaunchRequest
                        {
                            Name        = Config.GetValue("Launch:Name", suiteExecutionResult.ProjectName),
                            Description = Config.GetValue("Launch:Description", string.Empty),
                            Tags        = Config.GetValues("Launch:Tags", new List <string>()).ToList(),
                            StartTime   = launchStartDateTime
                        });

                        foreach (var specResult in suiteExecutionResult.SpecResults)
                        {
                            var specStartTime = launchStartDateTime;
                            var specReporter  = launchReporter.StartChildTestReporter(new Client.Requests.StartTestItemRequest
                            {
                                Type        = Client.Models.TestItemType.Suite,
                                Name        = specResult.ProtoSpec.SpecHeading,
                                Description = string.Join("", specResult.ProtoSpec.Items.Where(i => i.ItemType == ProtoItem.Types.ItemType.Comment).Select(c => c.Comment.Text)),
                                StartTime   = specStartTime,
                                Tags        = specResult.ProtoSpec.Tags.Select(t => t.ToString()).ToList()
                            });

                            foreach (var scenarioResult in specResult.ProtoSpec.Items.Where(i => i.ItemType == ProtoItem.Types.ItemType.Scenario || i.ItemType == ProtoItem.Types.ItemType.TableDrivenScenario))
                            {
                                ProtoScenario scenario;

                                switch (scenarioResult.ItemType)
                                {
                                case ProtoItem.Types.ItemType.Scenario:
                                    scenario = scenarioResult.Scenario;
                                    break;

                                case ProtoItem.Types.ItemType.TableDrivenScenario:
                                    scenario = scenarioResult.TableDrivenScenario.Scenario;
                                    break;

                                default:
                                    scenario = scenarioResult.Scenario;
                                    break;
                                }

                                var scenarioStartTime = specStartTime;
                                var scenarioReporter  = specReporter.StartChildTestReporter(new Client.Requests.StartTestItemRequest
                                {
                                    Type        = Client.Models.TestItemType.Step,
                                    StartTime   = scenarioStartTime,
                                    Name        = scenario.ScenarioHeading,
                                    Description = string.Join("", scenario.ScenarioItems.Where(i => i.ItemType == ProtoItem.Types.ItemType.Comment).Select(c => c.Comment.Text)),
                                    Tags        = scenario.Tags.Select(t => t.ToString()).ToList()
                                });

                                // internal log ("rp_log_enabled" property)
                                if (Config.GetValue("log:enabled", false))
                                {
                                    scenarioReporter.Log(new Client.Requests.AddLogItemRequest
                                    {
                                        Text   = "Spec Result Proto",
                                        Level  = Client.Models.LogLevel.Trace,
                                        Time   = DateTime.UtcNow,
                                        Attach = new Client.Models.Attach("Spec", "application/json", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(specResult)))
                                    });
                                    scenarioReporter.Log(new Client.Requests.AddLogItemRequest
                                    {
                                        Text   = "Scenario Result Proto",
                                        Level  = Client.Models.LogLevel.Trace,
                                        Time   = DateTime.UtcNow,
                                        Attach = new Client.Models.Attach("Scenario", "application/json", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(scenarioResult)))
                                    });
                                }

                                var lastStepStartTime = scenarioStartTime;
                                if (scenario.ScenarioItems != null)
                                {
                                    foreach (var stepResult in scenario.ScenarioItems.Where(i => i.ItemType == ProtoItem.Types.ItemType.Step))
                                    {
                                        var text         = "!!!MARKDOWN_MODE!!!" + stepResult.Step.ActualText;
                                        var stepLogLevel = stepResult.Step.StepExecutionResult.ExecutionResult.Failed ? Client.Models.LogLevel.Error : Client.Models.LogLevel.Info;

                                        // if step argument is table
                                        var tableParameter = stepResult.Step.Fragments.FirstOrDefault(f => f.Parameter?.Table != null)?.Parameter.Table;
                                        if (tableParameter != null)
                                        {
                                            text += Environment.NewLine + Environment.NewLine + "| " + string.Join(" | ", tableParameter.Headers.Cells.ToArray()) + " |";
                                            text += Environment.NewLine + "| " + string.Join(" | ", tableParameter.Headers.Cells.Select(c => "---")) + " |";

                                            foreach (var tableRow in tableParameter.Rows)
                                            {
                                                text += Environment.NewLine + "| " + string.Join(" | ", tableRow.Cells.ToArray()) + " |";
                                            }
                                        }

                                        // if dynamic arguments
                                        var dynamicParameteres = stepResult.Step.Fragments.Where(f => f.FragmentType == Fragment.Types.FragmentType.Parameter && f.Parameter.ParameterType == Parameter.Types.ParameterType.Dynamic).Select(f => f.Parameter);
                                        if (dynamicParameteres.Count() != 0)
                                        {
                                            text += Environment.NewLine;

                                            foreach (var dynamicParameter in dynamicParameteres)
                                            {
                                                text += $"{Environment.NewLine}{dynamicParameter.Name}: {dynamicParameter.Value}";
                                            }
                                        }

                                        if (stepResult.Step.StepExecutionResult.ExecutionResult.Failed)
                                        {
                                            text += $"{Environment.NewLine}{Environment.NewLine}{stepResult.Step.StepExecutionResult.ExecutionResult.ErrorMessage}{Environment.NewLine}{stepResult.Step.StepExecutionResult.ExecutionResult.StackTrace}";
                                        }

                                        scenarioReporter.Log(new Client.Requests.AddLogItemRequest
                                        {
                                            Level = stepLogLevel,
                                            Time  = lastStepStartTime,
                                            Text  = text
                                        });

                                        if (stepResult.Step.StepExecutionResult.ExecutionResult.ScreenShot?.Length != 0)
                                        {
                                            scenarioReporter.Log(new Client.Requests.AddLogItemRequest
                                            {
                                                Level  = Client.Models.LogLevel.Debug,
                                                Time   = lastStepStartTime,
                                                Text   = "Screenshot",
                                                Attach = new Client.Models.Attach("Screenshot", "image/png", stepResult.Step.StepExecutionResult.ExecutionResult.ScreenShot.ToByteArray())
                                            });
                                        }

                                        lastStepStartTime = lastStepStartTime.AddMilliseconds(stepResult.Step.StepExecutionResult.ExecutionResult.ExecutionTime);
                                    }
                                }

                                scenarioReporter.Finish(new Client.Requests.FinishTestItemRequest
                                {
                                    EndTime = scenarioStartTime.AddMilliseconds(scenario.ExecutionTime),
                                    Status  = _statusMap[scenario.ExecutionStatus]
                                });
                            }

                            var specFinishStatus = specResult.Failed ? Client.Models.Status.Failed : Client.Models.Status.Passed;
                            specReporter.Finish(new Client.Requests.FinishTestItemRequest
                            {
                                Status  = specFinishStatus,
                                EndTime = specStartTime.AddMilliseconds(specResult.ExecutionTime)
                            });
                        }

                        launchReporter.Finish(new Client.Requests.FinishLaunchRequest
                        {
                            EndTime = DateTime.UtcNow
                        });
                    }

                    if (message.MessageType == Message.Types.MessageType.KillProcessRequest)
                    {
                        Console.Write("Finishing to send results to Report Portal... ");
                        var sw = Stopwatch.StartNew();
                        launchReporter.Sync();

                        Console.WriteLine($"Elapsed: {sw.Elapsed}");

                        return;
                    }
                }
            }
        }
        public LaunchReporter Build(int suitesPerLaunch, int testsPerSuite, int logsPerTest)
        {
            var launchReporter = new LaunchReporter(Service);

            var launchDateTime = DateTime.UtcNow;

            launchReporter.Start(new Client.Requests.StartLaunchRequest
            {
                Name      = "ReportPortal Shared",
                StartTime = launchDateTime,
                Mode      = Client.Models.LaunchMode.Debug,
                Tags      = new System.Collections.Generic.List <string>()
            });

            for (int i = 0; i < suitesPerLaunch; i++)
            {
                var suiteNode = launchReporter.StartChildTestReporter(new Client.Requests.StartTestItemRequest
                {
                    Name      = $"Suite {i}",
                    StartTime = launchDateTime.AddMilliseconds(-1),
                    Type      = Client.Models.TestItemType.Suite
                });

                for (int j = 0; j < testsPerSuite; j++)
                {
                    var testNode = suiteNode.StartChildTestReporter(new Client.Requests.StartTestItemRequest
                    {
                        Name      = $"Test {j}",
                        StartTime = launchDateTime,
                        Type      = Client.Models.TestItemType.Step
                    });

                    for (int l = 0; l < logsPerTest; l++)
                    {
                        testNode.Log(new Client.Requests.AddLogItemRequest
                        {
                            Level = Client.Models.LogLevel.Info,
                            Text  = $"Log message #{l}",
                            Time  = launchDateTime
                        });
                    }

                    testNode.Finish(new Client.Requests.FinishTestItemRequest
                    {
                        EndTime = launchDateTime,
                        Status  = Client.Models.Status.Passed
                    });
                }

                suiteNode.Finish(new Client.Requests.FinishTestItemRequest
                {
                    EndTime = launchDateTime,
                    Status  = Client.Models.Status.Passed
                });
            }

            launchReporter.Finish(new Client.Requests.FinishLaunchRequest
            {
                EndTime = launchDateTime
            });

            return(launchReporter);
        }
Beispiel #12
0
        public LaunchReporter Build(int suitesPerLaunch, int testsPerSuite, int logsPerTest)
        {
            var launchReporter = new LaunchReporter(Service, null, RequestExecuterFactory?.Create(), ExtensionManager);

            var launchDateTime = DateTime.UtcNow;

            launchReporter.Start(new StartLaunchRequest
            {
                Name      = "ReportPortal Shared",
                StartTime = launchDateTime,
                Mode      = LaunchMode.Debug
            });

            for (int i = 0; i < suitesPerLaunch; i++)
            {
                var suiteNode = launchReporter.StartChildTestReporter(new StartTestItemRequest
                {
                    Name      = $"Suite {i}",
                    StartTime = launchDateTime.AddMilliseconds(-1),
                    Type      = TestItemType.Suite
                });

                for (int j = 0; j < testsPerSuite; j++)
                {
                    var testNode = suiteNode.StartChildTestReporter(new StartTestItemRequest
                    {
                        Name      = $"Test {j}",
                        StartTime = launchDateTime,
                        Type      = TestItemType.Step
                    });

                    for (int l = 0; l < logsPerTest; l++)
                    {
                        testNode.Log(new CreateLogItemRequest
                        {
                            Level = LogLevel.Info,
                            Text  = $"Log message #{l}",
                            Time  = launchDateTime
                        });
                    }

                    testNode.Finish(new FinishTestItemRequest
                    {
                        EndTime = launchDateTime,
                        Status  = Status.Passed
                    });
                }

                suiteNode.Finish(new FinishTestItemRequest
                {
                    EndTime = launchDateTime,
                    Status  = Status.Passed
                });
            }

            launchReporter.Finish(new FinishLaunchRequest
            {
                EndTime = launchDateTime
            });

            return(launchReporter);
        }