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(); }