예제 #1
0
        public Process ExecuteMsTest(MessageArgsMsTest messageArgs)
        {
            messageArgs.CreateTestList();
            string  additionalArgs = String.Concat("/p:TestListPath=\"", messageArgs.TestListPath, "/p:ResultsFilePath=", "\"", messageArgs.ResultsFilePath, "\"");
            Process currentProcess = ExecuteMsbuildProject(messageArgs.ProjectPath, messageArgs.IpAddressSettings, additionalArgs);

            return(currentProcess);
        }
예제 #2
0
        public string GenerateMsTestMessage(string projectPath, string testListContent, string resultsFilePath, string testListName, IpAddressSettings ipAddressSettings, string workingDir)
        {
            MessageArgsMsTest messageArgs = new MessageArgsMsTest(Command.MSTL, projectPath, ipAddressSettings, workingDir, testListContent, testListName, resultsFilePath);

            string result = GenerateCurrentCommandParametersXml(messageArgs);

            return(result);
        }
예제 #3
0
        public Process ExecuteMsTestSpecificList(MessageArgsMsTest messageArgs)
        {
            messageArgs.CreateTestList();
            string  uniqueTestResultName = ATACore.Utilities.TimeStampGenerator.GenerateTrxFilePath(messageArgs.WorkingDir);
            string  additionalArgs       = String.Concat("/p:TestListPath=\"", messageArgs.TestListPath, "\" /p:ResultsFilePath=", "\"", messageArgs.ResultsFilePath, "\"", " /p:TestListName=", "\"", messageArgs.ListName, "\"");
            Process currentProcess       = ExecuteMsbuildProject(messageArgs.ProjectPath, messageArgs.IpAddressSettings, additionalArgs);

            return(currentProcess);
        }
예제 #4
0
        public Process QueueCommandToExecute(string xml)
        {
            Command       command = GetCommandToBeExecutedFromMessage(xml);
            XmlSerializer deserializer;
            StringReader  textReader = new StringReader(xml);

            using (textReader)
            {
                switch (command)
                {
                //MST == Execute Ms Test
                case Command.MST:
                    deserializer = new XmlSerializer(typeof(MessageArgsMsTest));
                    MessageArgsMsTest msTestArgs = (MessageArgsMsTest)deserializer.Deserialize(textReader);
                    currentlyExecutedProcess = ATACore.CommandLine.CommandLineExecutor.ExecuteMsTest(msTestArgs);
                    break;

                case Command.MSTL:
                    deserializer = new XmlSerializer(typeof(MessageArgsMsTest));
                    MessageArgsMsTest msTestListArgs = (MessageArgsMsTest)deserializer.Deserialize(textReader);
                    currentlyExecutedProcess = ATACore.CommandLine.CommandLineExecutor.ExecuteMsTestSpecificList(msTestListArgs);
                    break;

                //TFSWN == Execute TFS Create new Workspace
                case Command.TFSWN:
                    deserializer = new XmlSerializer(typeof(MessageArgsWorkspaceCreation));
                    MessageArgsWorkspaceCreation tfsWorkspaceCreationArgs = (MessageArgsWorkspaceCreation)deserializer.Deserialize(textReader);
                    currentlyExecutedProcess = ATACore.CommandLine.CommandLineExecutor.ExecuteTfsCreateNewWorkspace(tfsWorkspaceCreationArgs);
                    break;

                //TFSDW == Deletes TFS Workspace
                case Command.TFSWD:
                    deserializer = new XmlSerializer(typeof(MessageArgsWorkspaceDeletion));
                    MessageArgsWorkspaceDeletion tfsWorkspaceDeletionArgs = (MessageArgsWorkspaceDeletion)deserializer.Deserialize(textReader);
                    currentlyExecutedProcess = ATACore.CommandLine.CommandLineExecutor.ExecuteTfsDeleteWorkspace(tfsWorkspaceDeletionArgs);
                    break;

                //TFGL == TFS Get Latest
                case Command.TFGL:
                    deserializer = new XmlSerializer(typeof(MessageArgsTfsGettingLatest));
                    MessageArgsTfsGettingLatest tfsGettingLatestArgs = (MessageArgsTfsGettingLatest)deserializer.Deserialize(textReader);
                    currentlyExecutedProcess = ATACore.CommandLine.CommandLineExecutor.ExecuteTfsGetLatest(tfsGettingLatestArgs);
                    break;

                case Command.BUILD:
                    deserializer = new XmlSerializer(typeof(MessageArgsBuild));
                    MessageArgsBuild buildArgs = (MessageArgsBuild)deserializer.Deserialize(textReader);
                    currentlyExecutedProcess = ATACore.CommandLine.CommandLineExecutor.ExecuteBuild(buildArgs);
                    break;

                case Command.DEL:
                    deserializer = new XmlSerializer(typeof(MessageArgsDelete));
                    MessageArgsDelete delArgs = (MessageArgsDelete)deserializer.Deserialize(textReader);
                    //ATACore.Utilities.FilesDeleter.DeleteAllFilesAndFolders(delArgs.LocalPath);
                    break;

                default:
                    break;
                }
            }

            return(currentlyExecutedProcess);
        }