Esempio n. 1
0
        public static void ClassInit(TestContext context)
        {
            BusinessFlow mBF = new BusinessFlow();

            AutoLogProxy.Init("Unit Tests");
            mBF            = new BusinessFlow();
            mBF.Activities = new ObservableList <Activity>();
            mBF.Name       = "BF1";

            a1.ActivityName      = "Activity1";
            a1.Active            = true;
            a1.TargetApplication = "WebApp";
            mBF.Activities.Add(a1);
            mBFList.Add(mBF);

            mRepoActions = a1.Acts;

            mSearchConfig1 = new SearchConfig()
            {
                MatchCase = false, MatchAllWord = false
            };
            mSearchConfig2 = new SearchConfig()
            {
                MatchCase = true, MatchAllWord = false
            };
            mSearchConfig3 = new SearchConfig()
            {
                MatchCase = false, MatchAllWord = true
            };
            mSearchConfig4 = new SearchConfig()
            {
                MatchCase = true, MatchAllWord = true
            };
        }
Esempio n. 2
0
        private static async void HandleAutoRunMode()
        {
            string phase = "Running in Automatic Execution Mode";

            Reporter.ToLog(eLogLevel.INFO, phase);

            AutoLogProxy.LogAppOpened();
            AppSplashWindow.LoadingInfo(phase);

            var result = await App.RunsetExecutor.RunRunSetFromCommandLine();

            Reporter.ToLog(eLogLevel.INFO, "Closing Ginger automatically...");
            App.MainWindow.CloseWithoutAsking();
            //TODO: find a way not to open Main window at all
            Reporter.ToLog(eLogLevel.INFO, "Ginger UI Closed.");

            //setting the exit code based on execution status
            if (result == 0)
            {
                Reporter.ToLog(eLogLevel.DEBUG, ">> Run Set executed and passed, exit code: 0");
                Environment.ExitCode = 0;//success
            }
            else
            {
                Reporter.ToLog(eLogLevel.DEBUG, ">> No indication found for successful execution, exit code: 1");
                Environment.ExitCode = 1;//failure
            }

            AutoLogProxy.LogAppClosed();
            Environment.Exit(Environment.ExitCode);
        }
Esempio n. 3
0
        private void AppCleanUp()
        {
            ClosingWindow CW = new ClosingWindow();

            CW.Show();
            GingerCore.General.DoEvents();

            App.AutomateTabGingerRunner.CloseAgents();
            if (WorkSpace.Instance.SolutionRepository != null)
            {
                App.CloseAllRunningAgents();
                WorkSpace.Instance.PlugInsManager.CloseAllRunningPluginProcesses();
            }
            GingerCore.General.CleanDirectory(GingerCore.Actions.Act.ScreenshotTempFolder, true);

            if (!WorkSpace.RunningInExecutionMode)
            {
                WorkSpace.UserProfile.GingerStatus = eGingerStatus.Closed;
                WorkSpace.UserProfile.SaveUserProfile();
                CleanAutoSaveFolders();
                App.AppSolutionAutoSave.SolutionAutoSaveEnd();
                try
                {
                    //TODO: no need to to log if running from comamnd line
                    AutoLogProxy.LogAppClosed();
                }
                catch
                {
                    Reporter.ToLog(eLogLevel.ERROR, "Failed to write ExecutionLog.LogAppClosed() into the autlog folder.");
                }
            }
            CW.Close();
        }
Esempio n. 4
0
        private void AppCleanUp()
        {
            ClosingWindow CW = new ClosingWindow();

            CW.Show();
            GingerCore.General.DoEvents();
            App.AutomateTabGingerRunner.CloseAgents();
            GingerCore.General.CleanDirectory(GingerCore.Actions.Act.ScreenshotTempFolder, true);

            if (!App.RunningFromConfigFile)
            {
                App.UserProfile.GingerStatus = eGingerStatus.Closed;
                App.UserProfile.SaveUserProfile();
                App.AppSolutionAutoSave.SolutionAutoSaveEnd();
                try
                {
                    //TODO: no need to to log if running from comamnd line
                    AutoLogProxy.LogAppClosed();
                }
                catch
                {
                    Reporter.ToLog(eAppReporterLogLevel.ERROR, "Failed to write ExecutionLog.LogAppClosed() into the autlog folder.");
                }
            }
            CW.Close();
        }
        public static void ClassInit(TestContext context)
        {
            RepositoryItemHelper.RepositoryItemFactory = new RepositoryItemFactory();
            // Create a simple BF with simple Actions
            mBF            = new BusinessFlow();
            mBF.Activities = new ObservableList <Activity>();
            mBF.Name       = "BF Test Flow Control";
            mBF.Active     = true;
            Platform p = new Platform();

            p.PlatformType = ePlatformType.Web;
            mBF.TargetApplications.Add(new TargetApplication()
            {
                AppName = "App1"
            });

            mGR = new GingerRunner();
            Agent a = new Agent();

            a.DriverType = Agent.eDriverType.WindowsAutomation; // just a dummy driver not really for use

            mGR.SolutionAgents = new ObservableList <IAgent>();
            mGR.SolutionAgents.Add(a);

            mGR.ApplicationAgents.Add(new ApplicationAgent()
            {
                AppName = "App1", Agent = a
            });
            AutoLogProxy.Init("UT Build");
            mGR.BusinessFlows.Add(mBF);
        }
Esempio n. 6
0
        private static async void HandleAutoRunMode()
        {
            string phase = "Running in Automatic Execution Mode";

            Reporter.ToLog(eLogLevel.INFO, phase);

            AutoLogProxy.LogAppOpened();
            SetLoadingInfo(phase);

            var result = await WorkSpace.Instance.RunsetExecutor.RunRunSetFromCommandLine();

            Reporter.ToLog(eLogLevel.INFO, "Closing Ginger automatically...");


            //setting the exit code based on execution status
            if (result == 0)
            {
                Reporter.ToLog(eLogLevel.DEBUG, ">> Run Set executed and passed, exit code: 0");
                Environment.ExitCode = 0;//success
            }
            else
            {
                Reporter.ToLog(eLogLevel.DEBUG, ">> No indication found for successful execution, exit code: 1");
                Environment.ExitCode = 1;//failure
            }

            AutoLogProxy.LogAppClosed();
            Environment.Exit(Environment.ExitCode);
        }
Esempio n. 7
0
        public static void ClassInit(TestContext context)
        {
            AutoLogProxy.Init("NonDriverActionTests");
            RepositoryItemHelper.RepositoryItemFactory = new RepositoryItemFactory();

            mBF            = new BusinessFlow();
            mBF.Activities = new ObservableList <Activity>();
            mBF.Name       = "BF Non-Driver Action Test";
            mBF.Active     = true;

            Activity activity = new Activity();

            mBF.Activities.Add(activity);
            mBF.CurrentActivity = activity;

            mGR = new GingerRunner();
            mGR.CurrentSolution     = new Ginger.SolutionGeneral.Solution();
            mGR.CurrentBusinessFlow = mBF;
            mGR.BusinessFlows.Add(mBF);

            Reporter.ToLog(eLogLevel.DEBUG, "Creating the GingerCoreNET WorkSpace");
            WorkSpaceEventHandler WSEH = new WorkSpaceEventHandler();

            WorkSpace.Init(WSEH);
            WorkSpace.Instance.SolutionRepository = GingerSolutionRepository.CreateGingerSolutionRepository();
        }
Esempio n. 8
0
        public static void ClassInit(TestContext context)
        {
            AutoLogProxy.Init("NonUITests");
            mBF            = new BusinessFlow();
            mBF.Activities = new ObservableList <Activity>();
            mBF.Name       = "Output Simulation";
            mBF.Active     = true;


            Platform p = new Platform();

            p.PlatformType = ePlatformType.WebServices;
            mBF.Platforms  = new ObservableList <Platform>();
            mBF.Platforms.Add(p);


            wsAgent            = new Agent();
            wsAgent.DriverType = Agent.eDriverType.WebServices;
            wsAgent.Driver     = mDriver;
            ApplicationAgent mAG = new ApplicationAgent();

            mAG.Agent = wsAgent;

            mGR = new GingerRunner();
            mGR.SolutionAgents = new ObservableList <Agent>();
            mGR.SolutionAgents.Add(wsAgent);

            mGR.BusinessFlows.Add(mBF);
        }
Esempio n. 9
0
 private void btnSpecificErrorHandler_Click(object sender, RoutedEventArgs e)
 {
     AutoLogProxy.UserOperationStart("cmbErrorHandlerMapping_SelectionChanged");
     ErrorHandlerMappingPage errorHandlerMappingPage = new ErrorHandlerMappingPage(mActivity, mActivityParentBusinessFlow);
     errorHandlerMappingPage.ShowAsWindow();
     AutoLogProxy.UserOperationEnd();
 }
Esempio n. 10
0
        public static void ClassInit(TestContext context)
        {
            AutoLogProxy.Init("Unit Tests");

            // Create new solution
            mBusinessFlow            = new BusinessFlow();
            mBusinessFlow.Activities = new ObservableList <Activity>();
            mBusinessFlow.Name       = "MyDriver BF";
            mBusinessFlow.Active     = true;
            Platform p = new Platform();

            p.PlatformType          = ePlatformType.NA;
            mBusinessFlow.Platforms = new ObservableList <Platform>();
            mBusinessFlow.Platforms.Add(p);
            mBusinessFlow.TargetApplications.Add(new TargetApplication()
            {
                AppName = mAppName
            });

            mGingerRunner = new GingerRunner();
            mGingerRunner.CurrentSolution = new Ginger.SolutionGeneral.Solution();

            Agent agent = new Agent();

            agent.AgentType = Agent.eAgentType.Service;

            mGingerRunner.SolutionAgents = new ObservableList <Agent>();
            mGingerRunner.SolutionAgents.Add(agent);

            mGingerRunner.ApplicationAgents.Add(new ApplicationAgent()
            {
                AppName = mAppName, Agent = agent
            });
            mGingerRunner.SolutionApplications = new ObservableList <ApplicationPlatform>();
            mGingerRunner.SolutionApplications.Add(new ApplicationPlatform()
            {
                AppName = mAppName, Platform = ePlatformType.NA
            });
            mGingerRunner.BusinessFlows.Add(mBusinessFlow);


            // Add the plugin to solution
            WorkSpace.Init(new WorkSpaceEventHandler());
            WorkSpace.Instance.SolutionRepository = Ginger.App.CreateGingerSolutionRepository();

            string solutionfolder = TestResources.getGingerUnitTesterTempFolder("sol1");

            if (Directory.Exists(solutionfolder))
            {
                Directory.Delete(solutionfolder, true);
            }
            WorkSpace.Instance.SolutionRepository.CreateRepository(solutionfolder);
            WorkSpace.Instance.SolutionRepository.Open(solutionfolder);

            string pluginFolder = TestResources.GetTestResourcesFolder(@"Plugins\PluginDriverExample4");

            WorkSpace.Instance.PlugInsManager.AddPluginPackage(pluginFolder);
        }
Esempio n. 11
0
        private void AnalyzerButton_Click(object sender, RoutedEventArgs e)
        {
            AutoLogProxy.UserOperationStart("MainWindow.AnalyzerButton_Click");
            AnalyzerPage AP = new AnalyzerPage();

            AP.Init(App.UserProfile.Solution);
            AP.ShowAsWindow();
            AutoLogProxy.UserOperationEnd();
        }
Esempio n. 12
0
        public override void Execute(ReportInfo RI)
        {
            string reportsResultFolder           = string.Empty;
            HTMLReportsConfiguration currentConf = App.UserProfile.Solution.HTMLReportsConfigurationSetList.Where(x => (x.IsSelected == true)).FirstOrDefault();

            if (App.RunsetExecutor.RunSetConfig.RunsetExecLoggerPopulated)
            {
                string runSetFolder = string.Empty;
                if (App.RunsetExecutor.RunSetConfig.LastRunsetLoggerFolder != null)
                {
                    runSetFolder = App.RunsetExecutor.RunSetConfig.LastRunsetLoggerFolder;
                    AutoLogProxy.UserOperationStart("Online Report");
                }
                else
                {
                    runSetFolder = ExecutionLogger.GetRunSetLastExecutionLogFolderOffline();
                    AutoLogProxy.UserOperationStart("Offline Report");
                }
                if (!string.IsNullOrEmpty(selectedHTMLReportTemplateID.ToString()))
                {
                    if ((isHTMLReportFolderNameUsed) && (HTMLReportFolderName != null) && (HTMLReportFolderName != string.Empty))
                    {
                        ObservableList <HTMLReportConfiguration> HTMLReportConfigurations = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <HTMLReportConfiguration>();
                        reportsResultFolder = Ginger.Reports.GingerExecutionReport.ExtensionMethods.CreateGingerExecutionReport(new ReportInfo(runSetFolder),
                                                                                                                                false,
                                                                                                                                HTMLReportConfigurations.Where(x => (x.ID == selectedHTMLReportTemplateID)).FirstOrDefault(),
                                                                                                                                HTMLReportFolderName + "\\" + System.IO.Path.GetFileName(runSetFolder),
                                                                                                                                isHTMLReportPermanentFolderNameUsed, currentConf.HTMLReportConfigurationMaximalFolderSize);
                    }
                    else
                    {
                        ObservableList <HTMLReportConfiguration> HTMLReportConfigurations = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <HTMLReportConfiguration>();
                        reportsResultFolder = Ginger.Reports.GingerExecutionReport.ExtensionMethods.CreateGingerExecutionReport(new ReportInfo(runSetFolder),
                                                                                                                                false,
                                                                                                                                HTMLReportConfigurations.Where(x => (x.ID == selectedHTMLReportTemplateID)).FirstOrDefault(),
                                                                                                                                null,
                                                                                                                                isHTMLReportPermanentFolderNameUsed);
                    }
                }
                else
                {
                    reportsResultFolder = Ginger.Reports.GingerExecutionReport.ExtensionMethods.CreateGingerExecutionReport(new ReportInfo(runSetFolder),
                                                                                                                            false,
                                                                                                                            null,
                                                                                                                            null,
                                                                                                                            isHTMLReportPermanentFolderNameUsed);
                }
            }
            else
            {
                Errors = "In order to get HTML report, please, perform executions before";
                Reporter.CloseGingerHelper();
                Status = Ginger.Run.RunSetActions.RunSetActionBase.eRunSetActionStatus.Failed;
                return;
            }
        }
Esempio n. 13
0
        private void ResolveSourceControlConflicts(eResolveConflictsSide side)
        {
            AutoLogProxy.UserOperationStart("ResolveConflictsBtn_Click");

            Reporter.ToGingerHelper(eGingerHelperMsgKey.ResolveSourceControlConflicts);
            SourceControlIntegration.ResolveConflicts(App.UserProfile.Solution.SourceControl, App.UserProfile.Solution.Folder, side);
            Reporter.CloseGingerHelper();

            AutoLogProxy.UserOperationEnd();
        }
Esempio n. 14
0
        private void ResolveSourceControlConflicts(eResolveConflictsSide side)
        {
            AutoLogProxy.UserOperationStart("ResolveConflictsBtn_Click");

            Reporter.ToStatus(eStatusMsgKey.ResolveSourceControlConflicts);
            SourceControlIntegration.ResolveConflicts(WorkSpace.UserProfile.Solution.SourceControl, WorkSpace.UserProfile.Solution.Folder, side);
            Reporter.HideStatusMessage();

            AutoLogProxy.UserOperationEnd();
        }
Esempio n. 15
0
        private void btnAbout_Click(object sender, RoutedEventArgs e)
        {
            AutoLogProxy.UserOperationStart("btnAbout_Click");

            AboutPage AP = new AboutPage();

            AP.ShowAsWindow();

            AutoLogProxy.UserOperationEnd();
        }
Esempio n. 16
0
        private void btnSourceControlCheckIn_Click(object sender, RoutedEventArgs e)
        {
            if (Reporter.ToUser(eUserMsgKeys.LoseChangesWarn) == MessageBoxResult.No)
            {
                return;
            }

            AutoLogProxy.UserOperationStart("btnSourceControlCheckIn_Click");

            App.CheckIn(App.UserProfile.Solution.Folder);

            AutoLogProxy.UserOperationEnd();
        }
        private void StartAppAgent()
        {
            AutoLogProxy.UserOperationStart("StartAgentButton_Click");
            Reporter.ToGingerHelper(eGingerHelperMsgKey.StartAgent, null, mAgent.Name, "AppName"); //Yuval: change app name to be taken from current app
            if (mAgent.Status != Agent.eStatus.Running)
            {
                mAgent.StartDriver();
                mWindowExplorerDriver = (IWindowExplorer)mAgent.Driver;
            }

            Reporter.CloseGingerHelper();
            AutoLogProxy.UserOperationEnd();
        }
Esempio n. 18
0
        private void btnSourceControlCheckIn_Click(object sender, RoutedEventArgs e)
        {
            if (Reporter.ToUser(eUserMsgKey.LoseChangesWarn) == Amdocs.Ginger.Common.eUserMsgSelection.No)
            {
                return;
            }

            AutoLogProxy.UserOperationStart("btnSourceControlCheckIn_Click");

            App.CheckIn(WorkSpace.UserProfile.Solution.Folder);

            AutoLogProxy.UserOperationEnd();
        }
Esempio n. 19
0
        public static void ClassInit(TestContext context)
        {
            AutoLogProxy.Init("Unit Tests");
            mBF            = new BusinessFlow();
            mBF.Activities = new ObservableList <Activity>();
            mBF.Name       = "BF Test Fire Fox";
            mBF.Active     = true;
            Platform p = new Platform();

            p.PlatformType = ePlatformType.Web;
            mBF.Platforms  = new ObservableList <Platform>();
            mBF.Platforms.Add(p);
            mBF.TargetApplications.Add(new TargetApplication()
            {
                AppName = "SCM"
            });

            VariableString v1 = new VariableString()
            {
                Name = "v1", InitialStringValue = "1"
            };

            mBF.AddVariable(v1);

            mGR = new GingerRunner();
            mGR.CurrentSolution = new Ginger.Environments.Solution();

            Agent a = new Agent();

            //a.DriverType = Agent.eDriverType.SeleniumFireFox;//have knowen firefox issues with selenium 3
            a.DriverType = Agent.eDriverType.SeleniumChrome;

            mGR.SolutionAgents = new ObservableList <Agent>();
            mGR.SolutionAgents.Add(a);
            // p2.Agent = a;

            mGR.ApplicationAgents.Add(new ApplicationAgent()
            {
                AppName = "SCM", Agent = a
            });
            mGR.SolutionApplications = new ObservableList <ApplicationPlatform>();
            mGR.SolutionApplications.Add(new ApplicationPlatform()
            {
                AppName = "SCM", Platform = ePlatformType.Web, Description = "New application"
            });
            mGR.BusinessFlows.Add(mBF);
        }
Esempio n. 20
0
        public static void ClassInit(TestContext context)
        {
            AutoLogProxy.Init("Unit Tests");
            RepositoryItemHelper.RepositoryItemFactory = new RepositoryItemFactory();

            mBF            = new BusinessFlow();
            mBF.Activities = new ObservableList <Activity>();
            mBF.Name       = "BF Test Chrome";
            mBF.Active     = true;
            Platform p = new Platform();

            p.PlatformType = ePlatformType.Web;
            mBF.TargetApplications.Add(new TargetApplication()
            {
                AppName = "WebApp"
            });

            VariableString v1 = new VariableString()
            {
                Name = "v1", InitialStringValue = "1"
            };

            mBF.AddVariable(v1);

            mGR = new GingerRunner();
            mGR.CurrentSolution = new Ginger.SolutionGeneral.Solution();

            Agent a = new Agent();

            a.DriverType = Agent.eDriverType.SeleniumChrome;

            mGR.SolutionAgents = new ObservableList <Agent>();
            mGR.SolutionAgents.Add(a);

            mGR.ApplicationAgents.Add(new ApplicationAgent()
            {
                AppName = "WebApp", Agent = a
            });
            mGR.SolutionApplications = new ObservableList <ApplicationPlatform>();
            mGR.SolutionApplications.Add(new ApplicationPlatform()
            {
                AppName = "WebApp", Platform = ePlatformType.Web, Description = "New application"
            });
            mGR.BusinessFlows.Add(mBF);
        }
Esempio n. 21
0
        private static void SolutionCleanup()
        {
            if (WorkSpace.Instance.SolutionRepository != null)
            {
                WorkSpace.Instance.PlugInsManager.CloseAllRunningPluginProcesses();
            }

            if (!WorkSpace.RunningInExecutionMode)
            {
                AppSolutionAutoSave.SolutionAutoSaveEnd();
            }

            WorkSpace.UserProfile.Solution = null;
            App.AutomateTabGingerRunner.ClearAgents();
            App.BusinessFlow = null;
            AutoLogProxy.SetAccount("");
            WorkSpace.Instance.SolutionRepository = null;
            WorkSpace.Instance.SourceControl      = null;
        }
Esempio n. 22
0
        public void Test_CalculateBFStatus_FailedActivity_ThenStopped()
        {
            AutoLogProxy.Init("UT Build");
            Activity a1 = new Activity();

            a1.Active = true;
            a1.Status = eRunStatus.Failed;
            mBF.Activities.Add(a1);

            Activity a2 = new Activity();

            a2.Active = true;
            a2.Status = eRunStatus.Stopped;
            mBF.Activities.Add(a2);

            mGR.CalculateBusinessFlowFinalStatus(mBF);

            Assert.AreEqual(mBF.RunStatus, eRunStatus.Stopped);
        }
        private void StartAppAgent(Agent agent)
        {
            AutoLogProxy.UserOperationStart("StartAgentButton_Click");
            Reporter.ToGingerHelper(eGingerHelperMsgKey.StartAgent, null, agent.Name, "AppName"); //Yuval: change app name to be taken from current app
            if (agent.Status == Agent.eStatus.Running)
            {
                agent.Close();
            }

            agent.StartDriver();
            if (agent.IsShowWindowExplorerOnStart && agent.Status == Agent.eStatus.Running)
            {
                WindowExplorerPage WEP = new WindowExplorerPage(new ApplicationAgent());
                WEP.ShowAsWindow();
            }

            Reporter.CloseGingerHelper();
            AutoLogProxy.UserOperationEnd();
        }
Esempio n. 24
0
        private static void SolutionCleanup()
        {
            if (WorkSpace.Instance.SolutionRepository != null)
            {
                WorkSpace.Instance.PlugInsManager.CloseAllRunningPluginProcesses();
            }

            if (!WorkSpace.Instance.RunningInExecutionMode)
            {
                AppSolutionAutoSave.SolutionAutoSaveEnd();
            }

            WorkSpace.Instance.Solution = null;

            CloseAllRunningAgents();
            App.OnAutomateBusinessFlowEvent(AutomateEventArgs.eEventType.ClearAutomate, null);
            AutoLogProxy.SetAccount("");
            WorkSpace.Instance.SolutionRepository = null;
            WorkSpace.Instance.SourceControl      = null;
        }
Esempio n. 25
0
        public static void ClassInit(TestContext context)
        {
            AutoLogProxy.Init("NonUITests");
            mBF            = new BusinessFlow();
            mBF.Activities = new ObservableList <Activity>();
            mBF.Name       = "BF WebServices Web API";
            mBF.Active     = true;


            Platform p = new Platform();

            p.PlatformType = ePlatformType.WebServices;
            mBF.Platforms  = new ObservableList <Platform>();
            mBF.Platforms.Add(p);


            mDriver = new WebServicesDriver(mBF);
            mDriver.SaveRequestXML        = true;
            mDriver.SavedXMLDirectoryPath = "~\\Documents";


            wsAgent.DriverType = Agent.eDriverType.WebServices;
            wsAgent.Driver     = mDriver;
            ApplicationAgent mAG = new ApplicationAgent();

            mAG.Agent = wsAgent;

            mGR = new GingerRunner();
            mGR.SolutionAgents = new ObservableList <Agent>();
            mGR.SolutionAgents.Add(wsAgent);

            mGR.BusinessFlows.Add(mBF);

            Reporter.ToLog(eLogLevel.INFO, "Creating the GingerCoreNET WorkSpace");
            WorkSpaceEventHandler WSEH = new WorkSpaceEventHandler();

            WorkSpace.Init(WSEH);
        }
Esempio n. 26
0
        private void StartAppAgent(ApplicationAgent AG)
        {
            AutoLogProxy.UserOperationStart("StartAgentButton_Click");
            Reporter.ToGingerHelper(eGingerHelperMsgKey.StartAgent, null, AG.AgentName, AG.AppName);
            if (AG.Agent.Status == Agent.eStatus.Running)
            {
                AG.Agent.Close();
            }

            AG.Agent.ProjEnvironment = App.AutomateTabEnvironment;
            AG.Agent.BusinessFlow    = App.BusinessFlow;;
            AG.Agent.SolutionFolder  = App.UserProfile.Solution.Folder;
            AG.Agent.DSList          = App.LocalRepository.GetSolutionDataSources();
            AG.Agent.StartDriver();
            //For ASCF, launch explorer automatically when launching Agent
            if (AG.Agent.IsShowWindowExplorerOnStart && AG.Agent.Status == Agent.eStatus.Running)
            {
                WindowExplorerPage WEP = new WindowExplorerPage(AG);
                WEP.ShowAsWindow();
            }

            Reporter.CloseGingerHelper();
            AutoLogProxy.UserOperationEnd();
        }
Esempio n. 27
0
        private void btnSourceControlGetLatest_Click(object sender, RoutedEventArgs e)
        {
            if (Reporter.ToUser(eUserMsgKey.LoseChangesWarn) == Amdocs.Ginger.Common.eUserMsgSelection.No)
            {
                return;
            }

            AutoLogProxy.UserOperationStart("btnSourceControlGetLatest_Click");

            Reporter.ToStatus(eStatusMsgKey.GetLatestFromSourceControl);
            if (string.IsNullOrEmpty(WorkSpace.UserProfile.Solution.Folder))
            {
                Reporter.ToUser(eUserMsgKey.SourceControlUpdateFailed, "Invalid Path provided");
            }
            else
            {
                SourceControlIntegration.GetLatest(WorkSpace.UserProfile.Solution.Folder, WorkSpace.UserProfile.Solution.SourceControl);
            }

            App.UpdateApplicationsAgentsMapping(false);
            Reporter.HideStatusMessage();

            AutoLogProxy.UserOperationEnd();
        }
Esempio n. 28
0
        private void StartAppAgent(ApplicationAgent AG)
        {
            AutoLogProxy.UserOperationStart("StartAgentButton_Click");
            Reporter.ToStatus(eStatusMsgKey.StartAgent, null, AG.AgentName, AG.AppName);
            if (((Agent)AG.Agent).Status == Agent.eStatus.Running)
            {
                ((Agent)AG.Agent).Close();
            }

            ((Agent)AG.Agent).ProjEnvironment = mContext.Environment;
            ((Agent)AG.Agent).BusinessFlow    = mContext.BusinessFlow;
            ((Agent)AG.Agent).SolutionFolder  = WorkSpace.Instance.Solution.Folder;
            ((Agent)AG.Agent).DSList          = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <DataSourceBase>();
            ((Agent)AG.Agent).StartDriver();
            //For ASCF, launch explorer automatically when launching Agent
            if (((Agent)AG.Agent).IsShowWindowExplorerOnStart && ((Agent)AG.Agent).Status == Agent.eStatus.Running)
            {
                WindowExplorerPage WEP = new WindowExplorerPage(AG, mContext);
                WEP.ShowAsWindow();
            }

            Reporter.HideStatusMessage();
            AutoLogProxy.UserOperationEnd();
        }
Esempio n. 29
0
        private void btnSourceControlGetLatest_Click(object sender, RoutedEventArgs e)
        {
            if (Reporter.ToUser(eUserMsgKeys.LoseChangesWarn) == MessageBoxResult.No)
            {
                return;
            }

            AutoLogProxy.UserOperationStart("btnSourceControlGetLatest_Click");

            Reporter.ToGingerHelper(eGingerHelperMsgKey.GetLatestFromSourceControl);
            if (string.IsNullOrEmpty(App.UserProfile.Solution.Folder))
            {
                Reporter.ToUser(eUserMsgKeys.SourceControlUpdateFailed, "Invalid Path provided");
            }
            else
            {
                SourceControlIntegration.GetLatest(App.UserProfile.Solution.Folder, App.UserProfile.Solution.SourceControl);
            }

            App.UpdateApplicationsAgentsMapping(false);
            Reporter.CloseGingerHelper();

            AutoLogProxy.UserOperationEnd();
        }
Esempio n. 30
0
 public static void ClassInit(TestContext context)
 {
     AutoLogProxy.Init("Unit Tests");
 }