Re: UFT Business component unable to read environment variables from function library (872 Views)
Reply
Advisor
Jupalli
Posts: 17
Registered: ‎06-19-2013
Message 1 of 6 (893 Views)
Accepted Solution

UFT Business component unable to read environment variables from function library

[ Edited ]

For our Business components, we have a library that has environment variables declared in it. The Function library is associated to the application area associated with the business component.

 

When I run the component alone, the environment variables return the assigned value from the function library. However, when I associated the component to a business process test and run it along with other components, I see below error

"Run Error - The environment parameter "XXXXX" was not found. Confirm that an environment parameter with this name is defined or specify another environment variable."

 

I did check the spelling of the variable and its correct. I also tried replacing the environment variables with CONST variable which works like a charm.

 

Just wanted to understand if this was one of the intended changes as part of 11.53 because it was working fine in 11.51 also if anyone have had similar issues

 

 

We are using UFT 11.53 alongside ALM 11.52.


-- Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any solution/suggestion posted.
Please use plain text.
HP Expert
vzamoraz
Posts: 502
Registered: ‎04-12-2012
Message 2 of 6 (872 Views)

Re: UFT Business component unable to read environment variables from function library

Hello Jupalli,

 

       Are you using scripted component or keyword component?

       Did you try patch 1 for UFT11.53?

       Are you able to see the problem on 1 specific machine or on different machines?

 

Best Regards.

 

Remember if you have a valid contract with HP feel free to visit our FT/QTP Support Customer Forums: http://h30499.www3.hp.com/t5/Functional-Testing-QTP/ct-p/sws-Fun_Test
You can create an account with your HP credentials

 

Please use plain text.
Advisor
Jupalli
Posts: 17
Registered: ‎06-19-2013
Message 3 of 6 (867 Views)

Re: UFT Business component unable to read environment variables from function library

[ Edited ]

I appreciate your quick response.

 

Please, see below inline for my comments

 

Are you using scripted component or keyword component?

    [Jupalli] Scripted Component

 

Did you try patch 1 for UFT11.53?

    [Jupalli] Assuming you are refereing to patch UFT_00066.exe, NO. The last patch we have is UFT_00044.exe. Is it a known issue in UFT_00044.exe?

 

Are you able to see the problem on 1 specific machine or on different machines?

    [Jupalli] Mostly on the VM instances but have seen this on individual machines too


-- Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any solution/suggestion posted.
Please use plain text.
HP Expert
vzamoraz
Posts: 502
Registered: ‎04-12-2012
Message 4 of 6 (850 Views)

Re: UFT Business component unable to read environment variables from function library

I have not seen that as a known issue, there were related problems on previous versions like QTP 11 or 10.

I am not able to reproduce the issue.

What are exactly the steps you follow to reproduce the problem?

Could you share the function library or the variables declaration?

If you uninstall Patch 11.53 it works again?

 

 

Regards.

 

Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.

Please use plain text.
Advisor
Jupalli
Posts: 17
Registered: ‎06-19-2013
Message 5 of 6 (844 Views)

Re: UFT Business component unable to read environment variables from function library

[ Edited ]

 Hi vzamoraz,

 

Please, see below inline for my comments

 

 

What are exactly the steps you follow to reproduce the problem?

     [Jupalli] Follow below steps to reproduce the issue

                   1. Create a function library in resources, say 'test_constants.vbs' and declare a

                        environment variable as below

                        e.g: Environment("test") = "constant value"

                   2. Create a new application area in resources, say 'env_test' and associate above

                        created library (test_constants.vbs) to it

                   3. Create a new scripted component in Business Components, say 'comp_test' and use above

                        created application area (env_test)

                   4. Add below code to the component (comp_test), save the changes

                        e.g: Reporter.ReportEvent micPass, "Env_Value", Environment("test")

                   5. Open the component in UFT and run it and in the result report, you would see the above step with value

                   6. Now create a test in Test Plan of ALM, say 'BPT_test' and add the component from step #3 (comp_test)

                   7. Run the test from ALM and in the result report, you would see the an Run Error saying

                        "The environment parameter "test" was not found. Confirm that an environment parameter with this

                        name is defined or specify another environment variable.

                        Line (1): "Reporter.ReportEvent micPass, "Env_Value", Environment("test")"." 

 

If you uninstall Patch 11.53 it works again?

     [Jupalli] We were using the same scripts (nothing changed) on UFT version 11.51 and it was working.

                     Don't have a machine right now that I could use to downgrade it to 11.51


-- Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any solution/suggestion posted.
Please use plain text.
Occasional Visitor
UFT_User_123
Posts: 1
Registered: ‎03-26-2014
Message 6 of 6 (746 Views)

Re: UFT Business component unable to read environment variables from function library

We have the same behaviour and got the following solution from HP:

 

  1. Open the Registry Editor (start -> run -> type: "regedit") on the client machine where script is being ran (QTP/UFT)
  2. Go to "HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTest Professional\MicTest\QEEE"
    Change key (or create if it doesn't exist):
  3. Type: String value (REG_SZ)
    Name: ExternalExecutionSupported
    Value: "No"
  4. Repeat steps on every client machine, under every user that logins.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation