Valued Contributor.. Valued Contributor..
Valued Contributor..

Jenkins Environment Variables not accessible to UFT test

We are using Jenkins with the Micro Focus Application Automation Tools addin to run UFT tests from ALM. It seems that the environment variables set by Jenkins (eg. JOB_NAME and BUILD_ID) are not available in the test using CreateObject("WScript.Shell").ExpandEnvironmentStrings. Is there any way the test can get access to those variables?

There are about 20 different variables, and any job parameters are also added.

Labels (1)
1 Reply
Micro Focus Expert
Micro Focus Expert


please check the new feature in 14.51:

with bath runner, you may pass the environment to the Test as the Test parameter. I am not sure about the Test saved on ALM. 

An alternative is to customize some program, taking the Jenkins variable to build an xml file which in turn serves as the ENV file for the Test.



The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.