コード例 #1
0
ファイル: DebugUITests.cs プロジェクト: Spharah/Warewolf-ESB
        public void DebugOutput_WhenRunWithOutputs_ContainsWorkflowInput()
        {
            try
            {
                //------------Setup for test--------------------------
                //Open the correct workflow
                ExplorerUIMap.DoubleClickWorkflow("TravsTestFlow", "Trav");

                //------------Assert Results-------------------------

                // Check for valid input in the input boxes ;)

                RibbonUIMap.ClickDebug();

                DebugUIMap.ClickExecute();
                OutputUIMap.WaitForExecution(3000);
                UITestControl lastStep         = OutputUIMap.GetStep(1);
                string        workflowStepName = OutputUIMap.GetStepName(lastStep);
                Assert.AreEqual("TravsTestFlow", workflowStepName);
                Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(lastStep, new[] { "Inputs :", "[[a]]", "=" }));
            }
            catch (Exception e)
            {
                Assert.Fail("It appears there is a debug issue. [ " + e.Message + " ]");
            }
        }
コード例 #2
0
ファイル: DebugUITests.cs プロジェクト: Spharah/Warewolf-ESB
        public void DebugOutput_WhenRun10Times_NormalExecution_CloseTagsReturned10Times()
        {
            try
            {
                //------------Setup for test--------------------------
                //Open the correct workflow
                ExplorerUIMap.DoubleClickWorkflow("TravsTestFlow", "Trav");

                //------------Assert Results-------------------------

                // Check for valid input in the input boxes ;)
                for (int i = 0; i < 9; i++)
                {
                    RibbonUIMap.ClickDebug();

                    DebugUIMap.ClickExecute();
                    OutputUIMap.WaitForExecution(3000);
                    UITestControl lastStep         = OutputUIMap.GetLastStep();
                    string        workflowStepName = OutputUIMap.GetStepName(lastStep);
                    Assert.AreEqual("TravsTestFlow", workflowStepName);
                }
            }
            catch (Exception e)
            {
                Assert.Fail("It appears there is a debug issue. [ " + e.Message + " ]");
            }
        }
コード例 #3
0
ファイル: DebugUITests.cs プロジェクト: Spharah/Warewolf-ESB
        public void Debug_GatherSystemInfo_UsingASameVariableInTwoActivities_DebugIsCorrect()
        {
            // Remove the PersistSettings.dat ;)
            var appData     = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).Replace("Roaming", "");
            var settingPath = Path.Combine(appData, @"Local\Warewolf\DebugData\PersistSettings.dat");

            if (File.Exists(settingPath))
            {
                File.Delete(settingPath);
            }

            ExplorerUIMap.DoubleClickWorkflow("11330_Integration tests", "SPINT 7");

            RibbonUIMap.DebugShortcutKeyPress();
            OutputUIMap.WaitForExecution(3000);

            var step3 = OutputUIMap.GetStep(2);

            Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(step3, new[] { "[[date]]", "=", "Date & Time" }));
            Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(step3, new[] { "[[cpu]]", "=", "CPU Available" }));

            var step4 = OutputUIMap.GetStep(3);

            Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(step4, new[] { "[[date]]", "=", "Date & Time" }));
            Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(step4, new[] { "[[cpu]]", "=", "CPU Available" }));

            Assert.IsFalse(OutputUIMap.AssertDebugOutputContains(step4, new[] { "% CPU Available" }));
        }
コード例 #4
0
ファイル: DebugUITests.cs プロジェクト: Spharah/Warewolf-ESB
        public void Debug_WhenUsingQuickDebugCommand_ExpectSavedInputsUsedInExecution()
        {
            // Remove the PersistSettings.dat ;)
            var appData     = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).Replace("Roaming", "");
            var settingPath = Path.Combine(appData, @"Local\Warewolf\DebugData\PersistSettings.dat");

            if (File.Exists(settingPath))
            {
                File.Delete(settingPath);
            }

            //------------Setup for test--------------------------
            //Open the correct workflow
            ExplorerUIMap.DoubleClickWorkflow("Bug9394", "TestCategory");

            // prime the values ;)
            RibbonUIMap.ClickDebug();

            DebugUIMap.EnterTextIntoRow(0, "1");
            DebugUIMap.EnterTextIntoRow(1, "2");

            DebugUIMap.ClickExecute();
            OutputUIMap.WaitForExecution();
            RibbonUIMap.ClickDebug();
            DebugUIMap.CloseDebugWindow_ByCancel();
            //---------------Execute------------------------------
            SendKeys.SendWait(KeyboardCommands.QuickDebug);
            //------------Assert Results-------------------------
            OutputUIMap.WaitForExecution();
            UITestControl lastStep         = OutputUIMap.GetLastStep();
            string        workflowStepName = OutputUIMap.GetStepName(lastStep);

            Assert.AreEqual("Bug9394", workflowStepName);
        }
コード例 #5
0
        public void DebugBuriedErrors_Expected_OnlyErrorStepIsInError()
        {
            //Open the correct workflow
            ExplorerUIMap.EnterExplorerSearchText("Bug8372");
            ExplorerUIMap.DoubleClickOpenProject("localhost", "TestCategory", "Bug8372");

            // Run debug
            RibbonUIMap.ClickRibbonMenuItem("Debug");
            PopupDialogUIMap.WaitForDialog();
            DebugUIMap.ClickExecute();
            OutputUIMap.WaitForExecution();

            var result = OutputUIMap.IsAnyStepsInError();

            // Get nested steps
            Assert.IsTrue(result, "Cannot see nested error steps in the debug output.");
        }
コード例 #6
0
        public void RemoteServerUITests_DebugARemoteWorkflowWhenLocalWorkflowWithSameNameIsOpen_WorkflowIsExecuted()
        {
            const string TextToSearchWith = "Find Records";

            var localTab = ExplorerUIMap.DoubleClickWorkflow(TextToSearchWith, "TESTS");

            Assert.IsNotNull(localTab);

            var remoteTab = ExplorerUIMap.DoubleClickWorkflow(TextToSearchWith, "TESTS", RemoteServerName);

            Assert.IsNotNull(remoteTab);

            RibbonUIMap.DebugShortcutKeyPress();
            OutputUIMap.WaitForExecution();

            var canidateTab = TabManagerUIMap.GetActiveTab();

            // verify the active tab is the remote tab
            Assert.AreEqual(remoteTab, canidateTab);
            Assert.IsTrue(OutputUIMap.IsExecutionRemote());
        }
コード例 #7
0
        public void RemoteServerUITests_DragAndDropWorkflowFromRemoteServerOnALocalHostCreatedWorkflow_WorkFlowIsDroppedAndCanExecute()
        {
            const string remoteWorkflowName = "MyLocalWF";

            //Ensure that we're in localhost
            ExplorerUIMap.ClickServerInServerDDL(LocalHostServerName);

            //Create new workflow and drag a remote workflow onto it
            using (DsfActivityUiMap activityUiMap = new DsfActivityUiMap())
            {
                activityUiMap.DragWorkflowOntoDesigner(remoteWorkflowName, "TestCategory", RemoteServerName);

                //Should be able to get clean debug output
                RibbonUIMap.DebugShortcutKeyPress();
                OutputUIMap.WaitForExecution();

                //Assert that the workflow really is on the design surface and debug output is clean
                Assert.IsFalse(OutputUIMap.IsAnyStepsInError(), "The remote workflow threw errors when executed locally");
                Assert.IsNotNull(activityUiMap.Activity);
            }
        }
コード例 #8
0
        public void DebugOutput_ClickStep_ActivityIsHighlighted()
        {
            //Create testing workflow
            RibbonUIMap.CreateNewWorkflow();
            var theTab = TabManagerUIMap.GetActiveTab();

            //Drag on multiassign
            UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start");
            var           thePoint       = new Point(theStartButton.BoundingRectangle.X + 30, theStartButton.BoundingRectangle.Y + 90);

            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, thePoint);

            WorkflowDesignerUIMap.AssignControl_ClickLeftTextboxInRow(theTab, "Assign", 0);

            //Set up multi assign
            SendKeys.SendWait("[[AssignThis]]{TAB}Some Data");

            //run and wait until debug output comes through
            RibbonUIMap.ClickRibbonMenuItem("Debug");
            PopupDialogUIMap.WaitForDialog();
            DebugUIMap.ClickExecute();
            OutputUIMap.WaitForExecution();

            //Click step
            var step = OutputUIMap.GetOutputWindow();

            Playback.Wait(1500);
            Mouse.Click(step[2]);
            Playback.Wait(100);
            Mouse.Click(step[1]);
            Playback.Wait(100);
            Mouse.Click(step[2]);
            Playback.Wait(100);

            //Assert the design surface activity is highlighted
            var assign = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Assign");

            Assert.IsTrue(WorkflowDesignerUIMap.IsControlSelected(assign),
                          "Selecting a step in the debug output does not select the activity on the design surface");
        }
コード例 #9
0
ファイル: DebugUITests.cs プロジェクト: Spharah/Warewolf-ESB
        public void DebugOutput_WhenUsingAColumnInput_ExecutesDataSplitCorrectly()
        {
            try
            {
                //------------Setup for test--------------------------

                ExplorerUIMap.DoubleClickWorkflow("12086", "Sprint12");

                //------------Assert Results-------------------------



                RibbonUIMap.ClickDebug();

                DebugUIMap.ClickExecute();
                OutputUIMap.WaitForExecution(3000);
                UITestControl lastStep = OutputUIMap.GetLastStep();
                Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(lastStep, new[] { "Outputs :", "[[moop]]", "=", "a" }));
            }
            catch (Exception e)
            {
                Assert.Fail("It appears there is a debug issue. [ " + e.Message + " ]");
            }
        }
コード例 #10
0
ファイル: DebugUITests.cs プロジェクト: Spharah/Warewolf-ESB
        public void DebugInput_WhenRun10Times_ExpectInputsPersistAndXMLRemainsLinked_InputsAndXMLRemainPersisted()
        {
            // Remove the PersistSettings.dat ;)
            var appData     = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).Replace("Roaming", "");
            var settingPath = Path.Combine(appData, @"Local\Warewolf\DebugData\PersistSettings.dat");

            if (File.Exists(settingPath))
            {
                File.Delete(settingPath);
            }

            //------------Setup for test--------------------------
            //Open the correct workflow
            ExplorerUIMap.DoubleClickWorkflow("Bug9394", "TestCategory");
            // prime the values ;)
            RibbonUIMap.ClickDebug();
            DebugUIMap.EnterTextIntoRow(0, "1");
            DebugUIMap.EnterTextIntoRow(1, "2");

            DebugUIMap.ClickExecute();
            OutputUIMap.WaitForExecution();

            //------------Assert Results-------------------------

            // Check for valid input in the input boxes ;)
            for (int i = 0; i < 9; i++)
            {
                RibbonUIMap.ClickDebug();
                DebugUIMap.WaitForDebugWindow(7000);

                Assert.AreEqual("1", DebugUIMap.GetTextFromRow(0), "After executing " + i + " times the debug input dialog did not persist");
                Assert.AreEqual("2", DebugUIMap.GetTextFromRow(1), "After executing " + i + " times the debug input dialog did not persist");


                DebugUIMap.ClickExecute();
                OutputUIMap.WaitForExecution();
            }

            //Now check the XML tab works ;)

            RibbonUIMap.ClickDebug();
            DebugUIMap.ClickXMLTab();

            // flip back and forth to check persistence ;)
            DebugUIMap.ClickInputDataTab();
            DebugUIMap.ClickXMLTab();

            SendKeys.SendWait(KeyboardCommands.TabCommand);
            Playback.Wait(200);
            SendKeys.SendWait(KeyboardCommands.SelectAllCommand);
            Playback.Wait(200);
            Clipboard.Clear();
            SendKeys.SendWait(KeyboardCommands.CopyCommand);
            var actualXML = Clipboard.GetData(DataFormats.Text);

            actualXML = actualXML.ToString().Replace(Environment.NewLine, "").Replace(" ", "");

            //close the window ;)
            DebugUIMap.CloseDebugWindow_ByCancel();

            const string expectedXML = @"<DataList><countries><CountryID>1</CountryID><Description>2</Description></countries></DataList>";

            Assert.AreEqual(expectedXML, actualXML, "Got [ " + actualXML + " ]");
        }