Understanding Components: Components are easily-maintained reusable scripts that perform a specific task, and are the building blocks from which an effective business process testing structure can be produced. Components are parts of a business process that has been broken down into smaller parts. For example, in most applications users need to log in before they can do anything else. A Subject Matter Expert can create one component that represents the login procedure for an application. Each component can then be reused in different business process tests, resulting in easier maintenance, updating, and test management.
Components are comprised of steps. For example, the login component's first step may be to open the application. Its second step could be entering a user name. Its third step could be entering a password, and its fourth step could be clicking the Enter button.
You can create and edit components in QuickTest by adding steps on any supported environment, parameterizing selected items, and enhancing the component by incorporating functions (operations) that encapsulate the steps needed to perform a particular task. In Quality Center, a Subject Matter Expert creates components and combines them into business process tests, which are used to check that the application behaves as expected.
Creating Components in the Quality Center Business Components Module:The Subject Matter Expert can create a new component and define it in the Quality Center Business Components module. The Business Component module includes the following:
Details: Provides a general summary of the component's purpose or goals, and the condition of the application before and after a component is run (its pre-conditions and post-conditions).
Snapshot: Displays an image that provides a visual cue or description of the component's purpose or operations.
Parameters: Specifies the input and output component parameter values for the business component. Implementing and using parameters enables a component to receive data from an external source and to pass data to other components in the business process test flow.
Design Steps: Enables you to create or view the manual steps of your business component, and to automate it if required.
Automation: Displays or provides access to automated components. For keyword-driven components, enables you to create and modify the steps of your automated business component in a keyword-driven, table format, and provides a plain-language textual description of each step of the implemented component.
Used by: Provides details about the business process tests that include the currently selected business component. The tab also includes a link to the relevant business process test in the Test Plan module.
Component Requests pane: Enables you to handle new component requests that were generated in the Test Plan module. Component requests are requests to add a new business component to the project.
Implementing Components in QuickTest Professional: Generally, components are created by Subject Matter Experts in Quality Center, although they can also be created and debugged in QuickTest.
In QuickTest, you create components by recording steps on any supported environment or by adding steps manually (if the object repository is populated and the required operations are available). You can parameterize selected items. You can also view and set options specific to components.
QuickTest enables you to create and modify two types of components: business components and scripted components. A business component is an easily-maintained, reusable unit comprising one or more steps that perform a specific task. A scripted component is an automated component that can contain programming logic. Scripted components share functionality with both test actions and business components. For example, you can use the Keyword View, the Expert View, and other QuickTest tools and options to create, view, modify, and debug scripted components in QuickTest. Due to their complexity, scripted components can be edited only in QuickTest. (If needed, you can convert test actions to scripted components. For more information, click the Help button in the Action Conversion Tool window.)
In Quality Center, the Subject Matter Expert can open components created in QuickTest. The Subject Matter Expert can then view and edit business components, but can only view the details for scripted components.
Creating Business Process Tests in the Quality Center Test Plan Module: To create a business process test, the Subject Matter Expert selects (drags and drops) the components that apply to the business process test and configures their run settings.
Note: When you run a business process test from Quality Center, the test run may also be influenced by settings in the QuickTest Remote Agent.
Each component can be used differently by different business process tests. For example, in each test the component can be configured to use different input parameter values or run a different number of iterations.
If, while creating a business process test, the Subject Matter Expert realizes that a component has not been defined for an element that is necessary for the business process test, the Subject Matter Expert can submit a component request from the Test Plan module.
Running Business Process Tests and Analyzing the Results: You can use the run and debug options in QuickTest to run and debug an individual component.
You can debug a business process test by running the test from the Test Plan module in Quality Center. When you choose to run from this module, you can choose which components to run in debug mode. (This pauses the run at the beginning of a component.)
When the business process test has been debugged and is ready for regular test runs, the Subject Matter Expert runs it from the Test Lab module similar to the way any other test is run in Quality Center. Before running the test, the Subject Matter Expert can define run-time parameter values and iterations using the Iterations column in the Test Lab module grid.
From the Test Lab module, you can view the results of the entire business process test run. The results include the value of each parameter, and the results of individual steps reported by QuickTest.
You can click the Open Report link to open the complete QuickTest report. The hierarchical report contains all the different iterations and components within the business process test run.
Understanding the Differences Between Components and Tests: If you are already familiar with using QuickTest to create action-based tests, you will find that the procedures for creating and editing components are quite similar. However, due to the design and purpose of the component model, there are certain differences in the way you create, edit, and run components. The guidelines below provide an overview of these differences.
- A component is a single entity. It cannot contain multiple actions or have calls to other actions or to other components.
- When working with components, all external files are stored in the Quality Center project to which you are currently connected.
- The name of the component node in the Keyword View is the same as the saved component. You cannot rename the node.
- Business components are created in the Keyword View, not the Expert View.
You add resources via the component's application area, and not directly to the component.
- Components use custom keywords created in function libraries to perform operations, such as verifying property values and opening the application you are testing.