Need to set a checkpoint’s value within business component logic
Question ID: 104995
0
0

I have a test that needs to verify that the application is properly displaying the current system date. The programmers developed this window such that the control takes on the name of the value (e.g. "Thursday, November 4, 2010").

I have logic in my business component that formats a variable with the expected string, but can’t see how to assign this to the value that the checkpoint uses. It looks like the options are constant, component parameter, local parameter, data table, environment, or random number.

I tried using local parameter, setting the parameter’s name to "local_date_parameter" and then assigning local_date_parameter = strExpectedValue
But my checkpoint is returning False, so I suspect that my "local_date_parameter" is being treated as a normal variable, and not associated with the checkpoint.

Can you please offer me some guidance on how to achieve my desired result? Thanks!

Marked as spam
Posted by (Questions: 22, Answers: 6)
Asked on April 30, 2013 8:45 pm
58 views
Answers (2)
1
Private answer

To set the local parameter you need to use the LocalParameter object.

Here is the example I used in my QTP.

LocalParameter(''p_parameter'') =''bLUEcOWE''

Below is the text from the QuickTest Professional Object Model reference.

----------

Description
An input or output local parameter. A local parameter is similar to a variable and is defined for a specific business component. It is not accessible by other business components, and its value cannot be used by or passed to other business components. You define local parameters in the Business Component Keyword View using the Configure Value Options dialog box for input parameters and the Output Options dialog box for output parameters. A local parameter can be used to parameterize the value of a step in a business component or to indicate the storage location for one of the output parameters used by a business component.

Note: You can also use the LocalParameter object as a variable in tests.

For more information on local parameters, see the HP QuickTest Professional for Business Process Testing User Guide.

Syntax
LocalParameter(ParamName)

Argument ParamName
Type String
Description The name of the local parameter.

----------

Does this answer your question?

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on April 30, 2013 8:46 pm
0
Private answer

Can you use the GetROProperty instead of the checkpoint. Your strExpectedValue, I'm assuming, it created by using current system date functions and putting it in the correct format. If you compare the two you have a little more control over what messages you might want to put in your component.

Marked as spam
Posted by (Questions: 2, Answers: 2)
Answered on April 30, 2013 8:59 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top