public MessageArgsMsTest(Command command, string projectPath, IpAddressSettings ipAddressSettings, string workingDir, string testListContent, string testListName, string resultsFilePath)
     : base(command, projectPath, ipAddressSettings, workingDir)
 {
     this.TestListContent = testListContent;
     this.ResultsFilePath = resultsFilePath;
     this.ListName = testListName;
 }
 public MessageArgsWorkspaceDeletion(Command command, string projectPath, IpAddressSettings ipAddressSettings, string tfsServerUrl, string workspaceName, string userName)
     : base(command, projectPath, ipAddressSettings)
 {
     this.TfsServerUrl  = tfsServerUrl;
     this.WorkspaceName = workspaceName;
     this.UserName      = userName;
 }
 public MessageArgsWorkspaceDeletion(Command command, string projectPath, IpAddressSettings ipAddressSettings, string tfsServerUrl, string workspaceName, string userName)
     : base(command, projectPath, ipAddressSettings)
 {
     this.TfsServerUrl = tfsServerUrl;
     this.WorkspaceName = workspaceName;
     this.UserName = userName;
 }
Пример #4
0
 public MessageArgsMsTest(Command command, string projectPath, IpAddressSettings ipAddressSettings, string workingDir, string testListContent, string testListName, string resultsFilePath)
     : base(command, projectPath, ipAddressSettings, workingDir)
 {
     this.TestListContent = testListContent;
     this.ResultsFilePath = resultsFilePath;
     this.ListName        = testListName;
 }
 public MessageArgsParseResult(string resultsFilePath, string userName, IpAddressSettings ipAddressSettings)
 {
     Command = Command.PARSE;
     IpAddressSettings = ipAddressSettings;
     ResultsFilePath = resultsFilePath;
     UserName = userName;
 }
 public MessageArgsParseResult(string resultsFilePath, string userName, IpAddressSettings ipAddressSettings)
 {
     Command           = Command.PARSE;
     IpAddressSettings = ipAddressSettings;
     ResultsFilePath   = resultsFilePath;
     UserName          = userName;
 }
 public MessageArgsWorkspaceCreation(Command command, string projectPath, string tfsServerUrl, IpAddressSettings ipAddressSettings, string workspaceName, string tfsPath, string localPath)
     : base(command, projectPath, ipAddressSettings)
 {
     this.WorkspaceName = workspaceName;
     this.TfsPath = tfsPath;
     this.LocalPath = localPath;
     this.TfsServerUrl = tfsServerUrl;
 }
Пример #8
0
        private void BuildCurrentProject(string localPath, string name, IpAddressSettings msBuildLoggerIpSettings)
        {
            Process          currentlyExecutedProcess;
            MessageArgsBuild buildArgs = new MessageArgsBuild(localPath, name, msBuildLoggerIpSettings);

            currentlyExecutedProcess = ATACore.CommandLine.CommandLineExecutor.ExecuteBuild(buildArgs);
            currentlyExecutedProcess.WaitForExit(Int32.MaxValue);
        }
Пример #9
0
 public MainWindow()
 {
     InitializeComponent();
     SettingsAppearanceViewModel = new SettingsAppearanceViewModel();
     messagesToBeSend            = new ConcurrentQueue <MessageArgsLogger>();
     CurrentExecutionViews       = new List <CurrentExecutionViewModel>();
     LocalMsBuildLogIpSettings   = new IpAddressSettings("127.0.0.1:8889");
     LocalExecutionIpSettings    = new IpAddressSettings("127.0.0.1:8888");
 }
 public CurrentExecutionViewModel(TestsExecutionViewModel testsExecutionViewModel)
 {
     TestsExecutionViewModel  = testsExecutionViewModel;
     AlreadyCreatedWorkspaces = new List <string>();
     MessagesToBeDisplayed    = new ConcurrentQueue <string>();
     CommandsToBeExecuted     = new List <string>();
     CurrentSelectedMachine   = TestsExecutionViewModel.GetCurrentlySelectedExecutionMachine();
     CurrentAgentMachineExecutionIpSettings  = new IpAddressSettings(CurrentSelectedMachine.Ip, "8888");
     CurrentAgentMachineMsBuildLogIpSettings = new IpAddressSettings(CurrentSelectedMachine.Ip, "8889");
     GenerateMessagesToBeSentToAgent();
 }
Пример #11
0
 private static void InitializeSettings()
 {
     clientSettings          = new IpAddressSettings(ConfigurationManager.AppSettings["clientIp"], ConfigurationManager.AppSettings["clientPort"]);
     agentSettings           = new IpAddressSettings(ConfigurationManager.AppSettings["agentIp"], ConfigurationManager.AppSettings["agentPort"]);
     msBuildLogSettings      = new IpAddressSettings(ConfigurationManager.AppSettings["agentIp"], ConfigurationManager.AppSettings["msBuildAgentPort"]);
     Console.BackgroundColor = ConsoleColor.DarkGreen;
     commandsToBeExecuted    = new ConcurrentQueue <string>();
     messagesToBeSend        = new ConcurrentQueue <MessageArgsLogger>();
     cts   = new CancellationTokenSource();
     token = cts.Token;
     currentlyExecutedProc = null;
     lockObject            = new Object();
     agentListener         = new TcpListener(agentSettings.GetIPAddress(), clientSettings.Port);
     agentListener.Start();
     BaseLogger.Log.Info(AgentSettingsInitializedMsg);
     Console.WriteLine(AgentSettingsInitializedMsg);
 }
Пример #12
0
 public BaseMessageArgs(Command command, string projectPath, IpAddressSettings ipAddressSettings, string workingDir)
     : this(command, projectPath, ipAddressSettings)
 {
     this.WorkingDir = workingDir;
 }
Пример #13
0
 private void DeleteWorkSpaceIfExists(string tfsProjectPath, string currentTfsUserName, string tfsUrl, IpAddressSettings msBuildLoggerIpSettings, string workspaceName)
 {
     if (!String.IsNullOrEmpty(workspaceName))
     {
         MessageArgsWorkspaceDeletion tfsWorkspaceDeletionArgs = new MessageArgsWorkspaceDeletion(Command.TFSWD, tfsProjectPath, msBuildLoggerIpSettings, tfsUrl, workspaceName, currentTfsUserName);
         Process currentlyExecutedProcess = ATACore.CommandLine.CommandLineExecutor.ExecuteTfsDeleteWorkspace(tfsWorkspaceDeletionArgs);
         currentlyExecutedProcess.WaitForExit(Int32.MaxValue);
     }
 }
Пример #14
0
 public BaseMessageArgs(Command command, string projectPath, IpAddressSettings ipAddressSettings)
 {
     this.Command           = command;
     this.ProjectPath       = projectPath;
     this.IpAddressSettings = ipAddressSettings;
 }
Пример #15
0
 public MessageArgsDelete(string localPath, IpAddressSettings ipAddressSettings)
 {
     Command = Command.DEL;
     IpAddressSettings = ipAddressSettings;
     LocalPath = localPath;
 }
Пример #16
0
        private void ProcessSelectedProjectInfos()
        {
            try
            {
                string tfsProjectPath     = @"D:\AutomationTestAssistant\TfsOperations.proj";
                string currentUserName    = ATACore.RegistryManager.GetUserName();
                string currentTfsUserName = ATACore.Managers.MemberManager.GetTfsUserNameByUserName(ATACore.Managers.ContextManager.Context, currentUserName);
                ATACore.Managers.ContextManager.Context.Dispose();
                List <Task> taskToBeExecuted = new List <Task>();
                taskToBeExecuted.Add(new Task(() => {}));
                foreach (var cTeam in MainWindow.AdminProjectSettingsViewModel.Teams)
                {
                    foreach (var cProject in cTeam.ObservableProjects)
                    {
                        if (!cProject.IsSelected)
                        {
                            continue;
                        }
                        string localPath = GetProjectLocalPath(currentUserName, cProject.TfsPath);
                        if (String.IsNullOrEmpty(localPath))
                        {
                            continue;
                        }
                        string workspaceName = ATACore.RegistryManager.GetWorkspaceName(currentUserName, localPath);
                        Task   t             = taskToBeExecuted[taskToBeExecuted.Count - 1].ContinueWith((antecedent) =>
                        {
                            if (!String.IsNullOrEmpty(workspaceName))
                            {
                                DeleteWorkSpaceIfExists(tfsProjectPath, currentTfsUserName, cProject.TfsUrl, MainWindow.LocalMsBuildLogIpSettings, workspaceName);
                                cProject.WorkspacesForDelete.Add(workspaceName);
                            }
                        });
                        taskToBeExecuted.Add(t);

                        //IF ALREADY EXISTS IS GOING TO UPDATE THE OLD VALUE SHOULD BE TESTED!
                        string            tfsUrl  = cProject.TfsUrl;
                        string            tfsPath = cProject.TfsPath;
                        IpAddressSettings cIS     = MainWindow.LocalMsBuildLogIpSettings;
                        if (!AlreadyCreatedWorkspaces.Contains(tfsPath))
                        {
                            ATACore.Utilities.FilesDeleter.DeleteAllFilesAndFolders(localPath);
                            string newWorkspaceName = Guid.NewGuid().ToString();
                            Task   t1 = taskToBeExecuted[taskToBeExecuted.Count - 1].ContinueWith((antecedent) => CreateNewWorkspace(tfsProjectPath, currentUserName, tfsUrl, tfsPath, localPath, cIS, newWorkspaceName));
                            taskToBeExecuted.Add(t1);
                            AlreadyCreatedWorkspaces.Add(tfsPath);
                        }
                        Task t2 = taskToBeExecuted[taskToBeExecuted.Count - 1].ContinueWith((antecedent) => GetLatest(tfsProjectPath, currentTfsUserName, localPath, cIS));
                        taskToBeExecuted.Add(t2);
                        PrepareAllCurrentProjectAddiotionalPaths(taskToBeExecuted, tfsProjectPath, currentUserName, currentTfsUserName, cProject, cIS);
                        string pName = cProject.Name;

                        Task t3 = taskToBeExecuted[taskToBeExecuted.Count - 1].ContinueWith((antecedent) => BuildCurrentProject(localPath, pName, cIS));
                        taskToBeExecuted.Add(t3);
                    }
                }
                Task finalTask = taskToBeExecuted[taskToBeExecuted.Count - 1].ContinueWith((antecedent) =>
                {
                    NavigateToNextPage ng = new NavigateToNextPage(Navigate);
                    mainGrid.Dispatcher.BeginInvoke(ng, DispatcherPriority.Send);
                });
                taskToBeExecuted.Add(finalTask);
                taskToBeExecuted[0].Start();
            }
            catch (Exception ex)
            {
                return;
            }
        }
Пример #17
0
 public BaseMessageArgs(Command command, string projectPath, IpAddressSettings ipAddressSettings, string workingDir)
     : this(command, projectPath, ipAddressSettings)
 {
     this.WorkingDir = workingDir;
 }
 public MessageArgsWorkspaceCreation(Command command, string projectPath, string tfsServerUrl, IpAddressSettings ipAddressSettings, string workspaceName, string tfsPath, string localPath)
     : base(command, projectPath, ipAddressSettings)
 {
     this.WorkspaceName = workspaceName;
     this.TfsPath       = tfsPath;
     this.LocalPath     = localPath;
     this.TfsServerUrl  = tfsServerUrl;
 }
Пример #19
0
 private void GetIpsInformation()
 {
     agentSettings      = new IpAddressSettings(tbAgentIp.Text);
     clientSettings     = new IpAddressSettings(tbClientIp.Text);
     msBuildLogSettings = new IpAddressSettings(tbMsBuildLogIp.Text);
 }
Пример #20
0
 public MessageArgsDelete(string localPath, IpAddressSettings ipAddressSettings)
 {
     Command           = Command.DEL;
     IpAddressSettings = ipAddressSettings;
     LocalPath         = localPath;
 }
 public MessageArgsTfsGettingLatest(Command command, string projectPath, IpAddressSettings ipAddressSettings, string pathToGet, string userName)
     : base(command, projectPath, ipAddressSettings)
 {
     this.PathToGet = pathToGet;
     this.UserName  = userName;
 }
Пример #22
0
 private void TestGetIpsInformation()
 {
     agentSettings      = new IpAddressSettings("127.0.0.1:8887");
     clientSettings     = new IpAddressSettings("127.0.0.1:8888");
     msBuildLogSettings = new IpAddressSettings("127.0.0.1:8889");
 }
Пример #23
0
        private void GetLatest(string tfsProjectPath, string currentTfsUserName, string localPath, IpAddressSettings msBuildLoggerIpSettings)
        {
            Process currentlyExecutedProcess;
            MessageArgsTfsGettingLatest tfsGetLatestArgs = new MessageArgsTfsGettingLatest(Command.TFGL, tfsProjectPath, msBuildLoggerIpSettings, localPath, currentTfsUserName);

            currentlyExecutedProcess = ATACore.CommandLine.CommandLineExecutor.ExecuteTfsGetLatest(tfsGetLatestArgs);
            currentlyExecutedProcess.WaitForExit(Int32.MaxValue);
        }
Пример #24
0
        private void PrepareAllCurrentProjectAddiotionalPaths(List <Task> taskToBeExecuted, string tfsProjectPath, string currentUserName, string currentTfsUserName, ProjectViewModel cProject, IpAddressSettings msBuildLoggerIpSettings)
        {
            foreach (var cAdditionalPath in cProject.ObservableAdditionalPaths)
            {
                string localPath     = GetProjectLocalPath(currentUserName, cAdditionalPath.TfsPath);
                string workspaceName = ATACore.RegistryManager.GetWorkspaceName(currentUserName, localPath);
                string tfsUrl        = cAdditionalPath.TfsUrl;
                string tfsPath       = cAdditionalPath.TfsPath;

                Task t1 = taskToBeExecuted[taskToBeExecuted.Count - 1].ContinueWith((antecedent) =>
                {
                    if (!String.IsNullOrEmpty(workspaceName))
                    {
                        DeleteWorkSpaceIfExists(tfsProjectPath, currentTfsUserName, tfsUrl, msBuildLoggerIpSettings, workspaceName);
                        cAdditionalPath.WorkspacesForDelete.Add(workspaceName);
                    }
                });

                taskToBeExecuted.Add(t1);

                if (!AlreadyCreatedWorkspaces.Contains(tfsPath))
                {
                    ATACore.Utilities.FilesDeleter.DeleteAllFilesAndFolders(localPath);
                    string newWorkspaceName = Guid.NewGuid().ToString();
                    Task   t2 = taskToBeExecuted[taskToBeExecuted.Count - 1].ContinueWith((antecedent) => CreateNewWorkspace(tfsProjectPath, currentUserName, tfsUrl, tfsPath, localPath, msBuildLoggerIpSettings, newWorkspaceName));
                    taskToBeExecuted.Add(t2);
                    AlreadyCreatedWorkspaces.Add(tfsPath);
                }
                Task t3 = taskToBeExecuted[taskToBeExecuted.Count - 1].ContinueWith((antecedent) => GetLatest(tfsProjectPath, currentTfsUserName, localPath, msBuildLoggerIpSettings));
                taskToBeExecuted.Add(t3);
            }
        }
 public MessageArgsTfsGettingLatest(Command command, string projectPath, IpAddressSettings ipAddressSettings, string pathToGet, string userName)
     : base(command, projectPath, ipAddressSettings)
 {
     this.PathToGet = pathToGet;
     this.UserName = userName;
 }
Пример #26
0
        private void CreateNewWorkspace(string tfsProjectPath, string currentUserName, string tfsUrl, string tfsPath, string localPath, IpAddressSettings msBuildLoggerIpSettings, string newWorkspaceName)
        {
            MessageArgsWorkspaceCreation tfsWorkspaceCreationArgs = new MessageArgsWorkspaceCreation(Command.TFSWN, tfsProjectPath, tfsUrl, msBuildLoggerIpSettings, newWorkspaceName, tfsPath, localPath);
            Process currentlyExecutedProcess = ATACore.CommandLine.CommandLineExecutor.ExecuteTfsCreateNewWorkspace(tfsWorkspaceCreationArgs);

            currentlyExecutedProcess.WaitForExit(Int32.MaxValue);
            ATACore.RegistryManager.WriterWorkspaceNameToRegistry(currentUserName, localPath, newWorkspaceName);
        }
Пример #27
0
 public MessageArgsBuild(string localPath, string name, IpAddressSettings ipAddressSettings)
 {
     ProjectPath = GetCurrentProjectFullPath(localPath, name);
     Command = Command.BUILD;
     IpAddressSettings = ipAddressSettings;
 }
Пример #28
0
 public MessageArgsBuild(string localPath, string name, IpAddressSettings ipAddressSettings)
 {
     ProjectPath       = GetCurrentProjectFullPath(localPath, name);
     Command           = Command.BUILD;
     IpAddressSettings = ipAddressSettings;
 }
Пример #29
0
 public BaseMessageArgs(Command command, string projectPath, IpAddressSettings ipAddressSettings)
 {
     this.Command = command;
     this.ProjectPath = projectPath;
     this.IpAddressSettings = ipAddressSettings;
 }