Index: System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsAUT/StartAUT.UserCode.cs =================================================================== diff -u -r8c0fd817cdf78fb65cc9c72d6c2588d39b23e7ba -rde752729efcb86122a3a06b39aa89b63f4932d50 --- System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsAUT/StartAUT.UserCode.cs (.../StartAUT.UserCode.cs) (revision 8c0fd817cdf78fb65cc9c72d6c2588d39b23e7ba) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsAUT/StartAUT.UserCode.cs (.../StartAUT.UserCode.cs) (revision de752729efcb86122a3a06b39aa89b63f4932d50) @@ -39,5 +39,29 @@ AppPath = Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), AppPath); } + public void StartAUT_Run_application() + { + Report.Log(ReportLevel.Info, "Application", "Run application with file name from variable $AppPath in normal mode. Return value bound to $StartAutProcessIDVar."); + //bool succesfulStartUp = false; + for (int i = 1; i < 11; i++) { + Report.Info("Attempt #" + i.ToString() + " to start up the application."); + StartAutProcessIDVar = ValueConverter.ToString(Host.Local.RunApplication(AppPath, "", "", false)); + repo.RiskeerMainWindow.SelfInfo.WaitForExists(60000); + Delay.Duration(1000, false); + try { + repo.RiskeerMainWindow.ProjectExplorer.ProjectRootNode.SelfInfo.WaitForExists(5000); + Report.Info("Application started up properly!"); + i=20; + } catch (Exception e) { + Report.Warn("Application not started up properly!"); + Report.Warn("Reboot is required."); + Report.Info("Exception: " + e.ToString()); + Host.Current.KillApplication(repo.RiskeerMainWindow.Self); + Delay.Duration(1000, false); + Report.Info("Rebooting..."); + } + } + } + } } Index: System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsAUT/StartAUT.cs =================================================================== diff -u -r2d92490273675621a4102b5cf09e2a33ad7063ff -rde752729efcb86122a3a06b39aa89b63f4932d50 --- System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsAUT/StartAUT.cs (.../StartAUT.cs) (revision 2d92490273675621a4102b5cf09e2a33ad7063ff) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsAUT/StartAUT.cs (.../StartAUT.cs) (revision de752729efcb86122a3a06b39aa89b63f4932d50) @@ -111,14 +111,17 @@ ResolveAppPath(); Delay.Milliseconds(0); - Report.Log(ReportLevel.Info, "Application", "Run application with file name from variable $AppPath in normal mode. Return value bound to $StartAutProcessIDVar.", new RecordItemIndex(2)); - StartAutProcessIDVar = ValueConverter.ToString(Host.Local.RunApplication(AppPath, "", "", false)); + //Report.Log(ReportLevel.Info, "Application", "Run application with file name from variable $AppPath in normal mode. Return value bound to $StartAutProcessIDVar.", new RecordItemIndex(2)); + //StartAutProcessIDVar = ValueConverter.ToString(Host.Local.RunApplication(AppPath, "", "", false)); + //Delay.Milliseconds(0); + + StartAUT_Run_application(); Delay.Milliseconds(0); - Report.Log(ReportLevel.Info, "Wait", "Waiting 1m to exist. Associated repository item: 'RiskeerMainWindow'", repo.RiskeerMainWindow.SelfInfo, new ActionTimeout(60000), new RecordItemIndex(3)); - repo.RiskeerMainWindow.SelfInfo.WaitForExists(60000); + //Report.Log(ReportLevel.Info, "Wait", "Waiting 1m to exist. Associated repository item: 'RiskeerMainWindow'", repo.RiskeerMainWindow.SelfInfo, new ActionTimeout(60000), new RecordItemIndex(4)); + //repo.RiskeerMainWindow.SelfInfo.WaitForExists(60000); - Report.Log(ReportLevel.Info, "Delay", "Waiting for 1s.", new RecordItemIndex(4)); + Report.Log(ReportLevel.Info, "Delay", "Waiting for 1s.", new RecordItemIndex(5)); Delay.Duration(1000, false); } Index: System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsAUT/StartAUT.rxrec =================================================================== diff -u -r2d92490273675621a4102b5cf09e2a33ad7063ff -rde752729efcb86122a3a06b39aa89b63f4932d50 --- System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsAUT/StartAUT.rxrec (.../StartAUT.rxrec) (revision 2d92490273675621a4102b5cf09e2a33ad7063ff) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsAUT/StartAUT.rxrec (.../StartAUT.rxrec) (revision de752729efcb86122a3a06b39aa89b63f4932d50) @@ -58,7 +58,7 @@ @@ -78,8 +78,23 @@ - + + + + + + + +