Debug automated tests and flows
You can debug a business process test or flow comprised of one or more automated business components by running the components in Debug mode in the Test Plan module.
Note: Debugging components with API automation is not supported. You can debug components with keyword GUI automation and Scripted GUI automation.
This task is part of a higher-level task. For details, see Plan business process tests and flows.
Test and flow debugging overview
Debugging is usually performed after the automation engineer has ensured that the individual components can run successfully in the relevant testing tool (such as UFT One), and all the components have a Ready status.
Debugging ensures that the test runs properly, and locates errors that may have occurred during the building of the test. For example, you can check the logical order of business components in the test, the preconditions and post-conditions required by each component, and the suitability of component parameter values (especially where output values are used as input values in other components).
You can choose whether to run each of the business components in the test or flow in Debug mode or in Normal mode.
|When you run an automated component in Debug mode||
The component opens and immediately pauses, enabling you (or an automation engineer) to use the debug tools available in the testing tool to debug the component. When one component ends, the next one immediately opens.
When you debug a test or flow, ALM opens the testing tool. The test is then run on your local computer.
With the first keyword GUI or scripted component in the test, ALM opens the testing tool and loads the relevant add-ins from the application area that is associated with that component. It assumes that these are the required add-ins for all the components in the test.
When a debug run is complete, ALM opens the Debug Run Information dialog box that shows which of the business components passed or failed the test. These results are provided for debugging purposes only and are not stored in ALM.
You can also access the testing tool, such as UFT One, to run and debug individual business components. For details on running and debugging components in UFT One, see the UFT One help.
|When you run an automated component in Normal mode||The testing tool runs all the steps in the component consecutively, and then opens the next component. You cannot access debug options while a component runs in Normal mode.|
Debug tests and flows containing automated components
Debug a business process test or flow comprised of one or more automated business components by running the components in Debug mode in the Test Plan module.
To debug an automated test or flow:
Prerequisites: Make sure the following:
The flow or business process test that you intend to debug contains only automated components.
- The components you intend to debug have either scripted GUI or keyword GUI automation.
Default values are set for all parameters. For task details on setting values, see Set parameter values.
UFT One: To be able to debug or run flows and business process tests that contain automated keyword GUI business components, or view test results, make sure that one of the following is installed:
QuickTest Professional version 10.00 or 11.00
UFT One version 11.50 or later
UFT One: Close all browsers before running a test on a Web browser. UFT One must load the Web Add-in (as defined in the application area in UFT One) before a step in the test opens the browser.
UFT One: If the test contains UFT One components, the test should include a UFT One component at the beginning of the test before the browser opens.
Debug automated tests and flows.
In the Test Plan module, select the relevant test or flow in the Test Plan tree, and click the Test Script tab. Click Run or Debug Test .
UI Element Description
Sets all the keyword GUI and scripted GUI components to run in Debug mode.
Unable to run the following in Debug mode:
- API components
- UFT Developer Components
Sets all the components to run in Normal mode.
Sets specific components to run in Skip mode.
Lists the available business components.
Indicates the run mode to be used with running a test flow.
Clicking the relevant cell in the Run Mode column enables you to select one of the following:
Debug. Causes the test to pause before running the first step in the specified business component. The position of the breakpoint in the test is indicated by a red spot icon in the left margin of the Keyword View (or, for UFT One components, the Expert View in UFT One). This enables you to use all the debug options of the testing tool to check the performance of one or more specific steps in the component. You can then continue the run.
For details on UFT One debugging options, see the UFT One help.
Normal. Runs the selected business component from start to finish without pausing.
- Skip. Skips the selected business component.
While running a test or flow in debug mode, you can monitor the debug run.
- From your task bar, you can toggle between the Test Plan module, the testing tool (such as UFT One), and the application you are testing.
- In the Test Plan module, the status of the test and the name of the component currently being run are shown below the toolbar in the Test Script tab, for example,
Running(OrderStart). You can click the Stop Run button to stop the run at any time.
- In the relevant testing tool, the status of the test being run, for example Running, or Ready, is shown in the status bar at the bottom of the window.
- UFT One Keyword GUI or GUI Scripted: All the debugging functions from the Debug menu, for example, Step Over or Step Into, are enabled for use. For details on applicable debug options, see the Micro Focus Unified Functional Testing User Guide.
- UFT One Keyword GUI or GUI Scripted: If you selected a business component to run in Debug mode, the test pauses after opening the component in UFT One. Use the UFT One debug options to control the continuation of the run through the displayed component. When you are ready to proceed with the run, continue the run in UFT One.
- When one component finishes running, it closes and the next component in the test opens in the testing tool.
When the debug run is complete, ALM imports the results from the testing tool and displays the following summary information in the Debug Run Information dialog box.
- The pass/fail status for the test or flow overall, and the pass/fail status for each individual automated component.
- All relevant messages from the testing tool.