test creation

ihgcko cigna1


The Keyword View enables you to create and view the steps of your test in a
modular, table-like format.You can use the Keyword View to add new steps to your test and to view and
modify existing steps.

Types of Steps to Add to Your Test: You can insert the following types of steps using the relevant options from
the Insert menu.A standard statement step.A checkpoint step.An output value step.Comments.A step that uses programming logic.Steps containing conditional statements and loop statements.

item you can insert:
a test object from the object repository
a utility object
a function call
a statement, for example, a Dim statement
a step generated by the Step Generator.

Conditional and Loop Statements
If...Then statement
ElseIf...Then statement
Else statement
While...Wend statement
For...Next statement
Do...While statement
Do...Until statement

Ex: How to Add a Standard Step to Your Test

Ex: How to Select an Item for Your Step
This task describes how to select an item for your step and includes the
following steps:
Select an item from the displayed list
Drag and drop an item from the Available Keywords pane.
Select a test object from an associated object repository or from your application

How to Insert and Remove Breakpoints in the Keyword View: F9

How to View Properties of Step Elements in the Keyword View:Right-click the item whose properties
you want to view.

Test Creation: Add to Part II the end:

guidance on the main
steps involved in creating these resources:
Analyzing Your Application
Setting Up Object Repositories
Creating Function Libraries
Configuring QuickTest According to Your Testing Needs
Building Your Tests
Adding Steps to Your Test Actions
Running and Troubleshooting Your Tests

Analyzing Your Application
The first step in creating a test is to analyze your application to determine your testing needs.
What development environments need to be supported by QuickTest?
What actions do you need to create?
To determine which actions you need, you navigate through your
application from a customer’s perspective. While doing this, you perform
the steps that customers might perform. Each process you perform in your
application will be represented as a test in QuickTest. You can create your
tests now, or you can wait until you are ready to add steps to your tests.

You can create empty actions now to set up a skeleton infrastructure for your tests.
You may also want to create a single test storing all actions relevant for an
application. Then all other tests can call the actions stored in this central
repository. This helps with test structure and maintenance.

Tip: As you plan your tests and actions, keep in mind that short tests and
actions that check specific functions of the application or complete a
transaction are better than long ones that perform several tasks, as they are
easier to reuse and maintain over time.

Setting Up Object Repositories
In this step, you build one or more object repositories and ensure that all
objects have clear names that follow any predetermined naming conventions defined by your organization.
You can create object repositories using QuickTest functionality to recognize
and learn the objects in your application, or you can manually define objects.
By creating and populating shared object repositories that can be associated
with multiple actions, you can use the same object repository in multiple tests.

Creating shared object repositories for the test automation infrastructure includes one or more of the following:
1. Changing the way that QuickTest identifies specific objects
2. Deciding how to organize your object repositories.If you decide to work with shared object repositories, you need to determine
how many shared object repository files are required for your application.
You also need to determine which shared object repository will be used for each area of your application.

3. Adding (learning) objects from your application
4. Creating new objects with easily understandable names.You may create new objects to represent objects that do not yet exist in your
application. You then update the properties and values of these objects as necessary after they exist in the application.

5. Copying or moving objects from one repository to another
6. Merging objects from local repositories to shared object repositories.

Creating Function Libraries
Creating function libraries involves developing customized functions for the application you want to test.This also makes it possible to update testing functionality
without having to update all the tests that use the keywords.
creating a function library for the test automation infrastructure, you may do the following:
1. Determine whether you need to create any user-defined functions or whether you should associate any existing function libraries with your
test.
2. Determine which keywords are needed.
3. Develop and document business-level keywords in function libraries
using the QuickTest Function Library window.
4. Create the actual functions within the function libraries. You can do this manually, or you can use the Function Definition Generator to generate
function definitions and header information.
5. Optionally define functions as new or replacement methods for test
objects.
6. Debug your function libraries.

Configuring QuickTest According to Your Testing Needs
After you set up the test automation infrastructure, you need to configure
QuickTest to use this infrastructure. This involves one or more of the following:
1. Defining your global testing preferences
You need to specify configuration settings that affect how you create and
run tests in general—these settings are not test-specific.

2. Creating recovery scenarios. Recovery scenarios instruct QuickTest
how to proceed when a step fails.

Building Your Tests
In general, it is best to create tests and actions that check just one or a few simple functions or complete a transaction rather than creating long tests and actions that
perform several complex tasks or that perform many tasks.
You may do the following when creating tests and test steps:
1. Create new tests, if needed.
2. Create the required actions.
3. Insert calls to the relevant actions. For example, if the first step in a test logs in to the application, and you already created a Login action, insert a
call to that action to include it in your test.
4. Associate your object repositories with the relevant actions.
5. Associate your function libraries with the relevant tests.
6. Optionally associate recovery scenarios with your test.

Adding Steps to Your Test Actions
1. Adding steps by selecting the keywords (operations) that represent the application functionality you want to test
2. Enhancing your tests by inserting checkpoints and output values
3. Data-driving your test
4. Replacing fixed values with parameters

Running and Troubleshooting Your Tests
When your tests are ready, you run them, view the run results, and troubleshoot your tests.


登录后才可评论.