Highlighted
Valued Contributor.. Valued Contributor..
Valued Contributor..
594 views

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)
0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert

hi, 

please check the new feature in 14.51:

https://admhelp.microfocus.com/uft/en/14.51/UFT_Help/Content/Landing_Pages/Whats_New_Landing_Page.htm#mt-item-0

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.

Thanks.

James

0 Likes
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.