public TestManager() { _report = new ReportingTools("QA Simulator"); ExcelWriter excelWriter = new ExcelWriter(_report.getFileLocation()); DateTime start = _report.getNow(); originStart = start; List <Action> tests = new List <Action>(); tests.Add(Test_CreateNewClient); tests.Add(Test_AddNewVisitPlan); tests.Add(Test_SetProvider); tests.Add(Test_CompleteScheduledVisit); foreach (Action test in tests) { _report.createReportItem(""); start = _report.getNow(); _report.createReportItem(test.Method.Name); try { createSUT(); test(); _report.createReportItem($"{test.Method.Name}", start); } catch (Exception e) { ScreenCapturer.CaptureAndSave($@"S:\Dev_IMS\Development\Jordan\uiAutomation\systemMapping\%NOW%_{test.Method.Name}", CaptureMode.Screen); _report.createReportItem($"Test failure {test.Method.Name}", start, $"Target: {e.TargetSite} Source: {e.Source} Message: {e.Message}"); excelWriter.WriteToFile(_report.getReport()); ShutDownSystemUnderTest close = new ShutDownSystemUnderTest(_application); return; } } _report.createReportItem(""); _report.createReportItem("Test Set Complete", originStart); excelWriter.WriteToFile(_report.getReport()); }