How to retrieve the default value of the business test parameter?

  • KM02461274
  • 30-Jun-2016
  • 01-Jul-2016

Summary

The provided function is example how to retrieve the default value of the business test parameter.

Question

Below function is used for retrieving the default value of parameter in business process test when QuickTest External Execution Engine (QEEE) is on : 
Public function getDefaultValue(byval parameter_name)
    set oQTP = CreateObject("QuickTest.Application")
    set oBusinessComponent=oQTP.BusinessComponent
 
    business_component_name=oBusinessComponent.Name
                    
    set business_component_parameters=oQTP.Test.Actions.Item(""&business_component_name&" ["&business_component_name&"]").ActionParameterDefinitions
    temp_57=business_component_parameters.Count
 
    For m=1 to business_component_parameters.Count
    temp_58=business_component_parameters.Item(m).Name
             If parameter_name=business_component_parameters.Item(m).Name Then
                    getDefaultValue=business_component_parameters.Item(m).DefaultValue
                    set oQTP=nothing
                    exit Function
            End If
    Next
    set oQTP=nothing
    getDefaultValue=""
End Function
 
 
For more information:
 
What are QuickTest Execution Engine (QEEE) Features?, please see the article: https://softwaresupport.hpe.com/group/softwaresupport/search-result/-/facetsearch/document/KM1317418