Esempio n. 1
0
 public void SetUp()
 {
     TestSettings.PrepareModuleTests();
     TestFactory.GetTestRunWithStatus(TestRunStatuses.Running);
     _workflow = WorkflowCollection.Workflows.First();
     _testRun  = TestRunQueue.TestRuns.First();
 }
Esempio n. 2
0
        // Guid AddWorkflow(string name, XContainer xDocument)
        Guid AddWorkflow(string name, XContainer xDocument, string pathToWorkflowFile)
        {
            var testLabName = xDocument.Descendants(LogicConstants.WorkflowLoader_TestWorkflow_TestLabNode).FirstOrDefault().Value;

            var testLab = string.IsNullOrEmpty(testLabName) ?
                          GetFirstTestLab() :
                          GetOrCreateTestLab(testLabName);

            // _workflow = new TestWorkflow(testLab) { Name = name };
            _workflow = new TestWorkflow(testLab)
            {
                Name = name, Path = pathToWorkflowFile
            };
            // 20150708
            // if there already is a workflow with the same name
            // merge the new one with the existing
            var replace = false || WorkflowCollection.Workflows.Any(wfl => wfl.Name == _workflow.Name && wfl.Path == _workflow.Path);

            if (replace)
            {
                WorkflowCollection.MergeWorkflow(_workflow);
            }
            else
            {
                WorkflowCollection.AddWorkflow(_workflow);
            }

            ServerObjectFactory.Resolve <TestWorkflowCollectionMethods>().SetDefaultWorkflow();
            return(_workflow.Id);
        }
Esempio n. 3
0
 public void SetUp()
 {
     TestSettings.PrepareModuleTests();
     TestFactory.GetTestRunWithStatus(TestRunStatuses.Running);
     _workflow = WorkflowCollection.Workflows.First();
     _testRun = TestRunQueue.TestRuns.First();
 }
Esempio n. 4
0
 public TestResultsModuleTestFixture()
 {
     TestSettings.PrepareModuleTests();
     _browser = TestFactory.GetBrowserForTestResultsModule();
     TestFactory.GetTestRunWithStatus(TestRunStatuses.Running);
     _workflow = WorkflowCollection.Workflows.First();
     _testRun  = TestRunQueue.TestRuns.First();
 }
Esempio n. 5
0
 public void SetUp()
 {
     TestSettings.PrepareModuleTests();
     _browser = TestFactory.GetBrowserForTestTasksModule();
     TestFactory.GetTestRunWithStatus(TestRunStatuses.Running);
     _workflow = WorkflowCollection.Workflows.First();
     _testRun  = TestRunQueue.TestRuns.First();
     TestFactory.GetAnotherTestRunWithStatus(TestRunStatuses.Pending, _workflow);
 }
Esempio n. 6
0
 public static void GetAnotherTestRunWithStatus(TestRunStatuses status, ITestWorkflow workflow)
 {
     var testRun = new TestRun {
         Name = "test run the second",
         Status = status
     };
     testRun.SetWorkflow(workflow);
     TestRunQueue.TestRuns.Add(testRun);
 }
Esempio n. 7
0
        public static void GetAnotherTestRunWithStatus(TestRunStatuses status, ITestWorkflow workflow)
        {
            var testRun = new TestRun {
                Name   = "test run the second",
                Status = status
            };

            testRun.SetWorkflow(workflow);
            TestRunQueue.TestRuns.Add(testRun);
        }
Esempio n. 8
0
 public static void MergeWorkflow(ITestWorkflow workflow)
 {
     // Workflows.Add(workflow);
     var existingWorkflow = Workflows.First(wfl => wfl.Name == workflow.Name && wfl.Path == workflow.Path);
     existingWorkflow.DefaultData = workflow.DefaultData;
     existingWorkflow.Description = workflow.Description;
     // existingWorkflow.Id = workflow.Id;
     // existingWorkflow.IsDefault = 
     existingWorkflow.ParametersPageName = workflow.ParametersPageName;
     // existingWorkflow.TestLabId
     
     TaskPool.Tasks.RemoveAll(task => task.WorkflowId == existingWorkflow.Id);
 }
Esempio n. 9
0
        public static void MergeWorkflow(ITestWorkflow workflow)
        {
            // Workflows.Add(workflow);
            var existingWorkflow = Workflows.First(wfl => wfl.Name == workflow.Name && wfl.Path == workflow.Path);

            existingWorkflow.DefaultData = workflow.DefaultData;
            existingWorkflow.Description = workflow.Description;
            // existingWorkflow.Id = workflow.Id;
            // existingWorkflow.IsDefault =
            existingWorkflow.ParametersPageName = workflow.ParametersPageName;
            // existingWorkflow.TestLabId

            TaskPool.Tasks.RemoveAll(task => task.WorkflowId == existingWorkflow.Id);
        }
Esempio n. 10
0
 public void SetWorkflow(ITestWorkflow testWorkflow)
 {
     _workflow = testWorkflow;
 }
Esempio n. 11
0
 public static void AddWorkflow(ITestWorkflow workflow)
 {
     Workflows.Add(workflow);
 }
Esempio n. 12
0
 public void SetWorkflow(ITestWorkflow testWorkflow)
 {
     _workflow = testWorkflow;
 }
Esempio n. 13
0
        // Guid AddWorkflow(string name, XContainer xDocument)
        Guid AddWorkflow(string name, XContainer xDocument, string pathToWorkflowFile)
        {
            var testLabName = xDocument.Descendants(LogicConstants.WorkflowLoader_TestWorkflow_TestLabNode).FirstOrDefault().Value;

            var testLab = string.IsNullOrEmpty(testLabName) ? 
                GetFirstTestLab() :
                GetOrCreateTestLab(testLabName);

            // _workflow = new TestWorkflow(testLab) { Name = name };
            _workflow = new TestWorkflow(testLab) { Name = name, Path = pathToWorkflowFile};
            // 20150708
            // if there already is a workflow with the same name
            // merge the new one with the existing
            var replace = false || WorkflowCollection.Workflows.Any(wfl => wfl.Name == _workflow.Name && wfl.Path == _workflow.Path);
            
            if (replace)
                WorkflowCollection.MergeWorkflow(_workflow);
            else
                WorkflowCollection.AddWorkflow(_workflow);
            
            ServerObjectFactory.Resolve<TestWorkflowCollectionMethods>().SetDefaultWorkflow();
            return _workflow.Id;
        }
Esempio n. 14
0
        // Guid AddWorkflow(string name, XContainer xDocument)
        Guid AddWorkflow(string name, XContainer xDocument, string pathToWorkflowFile)
        {
            var testLabName = xDocument.Descendants(LogicConstants.WorkflowLoader_TestWorkflow_TestLabNode).FirstOrDefault().Value;

            var testLab = string.IsNullOrEmpty(testLabName) ? 
                GetFirstTestLab() :
                GetOrCreateTestLab(testLabName);

            // _workflow = new TestWorkflow(testLab) { Name = name };
            _workflow = new TestWorkflow(testLab) { Name = name, Path = pathToWorkflowFile};
            WorkflowCollection.AddWorkflow(_workflow);
            ServerObjectFactory.Resolve<TestWorkflowCollectionMethods>().SetDefaultWorkflow();
            return _workflow.Id;
        }
Esempio n. 15
0
 public static void AddWorkflow(ITestWorkflow workflow)
 {
     Workflows.Add(workflow);
 }