Highlighted
Super Contributor.
Super Contributor.
1327 views

HPToolsLauncher and Visual Studio Remote Agents

Jump to solution

Has anyone successfully implemented the visual stuido plugin: https://marketplace.visualstudio.com/items?itemName=uftpublisher.application-UFT-TFS

I'm struggling with the wiki help page, as it seems to lack detail, my current error is.

  • System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Program Files\Microsoft VisualStudio\UFTWorking\bin\PSModule.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) 

 

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Super Contributor.
Super Contributor.

Re: HPToolsLauncher and Visual Studio Remote Agents

Jump to solution

Caught out by Classic N00b faults, 

VSTS extension for UFT uses PS. Powershell exposes several additional compelxities:

  • Installing the UFT agent on an account that did not have adequate permissions, indicated by errors such as 
    Could not create scheduler, please verify ALM client installation on run machine by downloading and in installing the add-in form: http://[serverName:PortNum]/qcbin/TDConnectivity_index.html
  • Windows blocks execution of files downloaded from the Internet (remove by right click the file > Properties > unblock)
  • Initally Missing the environment variable UFT_LAUNCHER then incorreclty included backslash in the Environment Variable
  • Putting the UFTWorking folder in the Program Files folder (only administrators have access to this folder)
  • Extracted UFTWorkfing folder needs subfolders res or props to work (script will not create these)
  • not installing the ALM TDConnectivity tool or opening the http://almServer:almport/qcbin/start_a.jsp?common=true 
  • Not realising that the Invoke-RunFromAlmTask  uses different enum list for almRunMode  than when using other ALM tools (runLocally not RUN_LOCAL ) 

View solution in original post

0 Likes
3 Replies
Highlighted
Super Contributor.
Super Contributor.

Re: HPToolsLauncher and Visual Studio Remote Agents

Jump to solution

Caught out by Classic N00b faults, 

VSTS extension for UFT uses PS. Powershell exposes several additional compelxities:

  • Installing the UFT agent on an account that did not have adequate permissions, indicated by errors such as 
    Could not create scheduler, please verify ALM client installation on run machine by downloading and in installing the add-in form: http://[serverName:PortNum]/qcbin/TDConnectivity_index.html
  • Windows blocks execution of files downloaded from the Internet (remove by right click the file > Properties > unblock)
  • Initally Missing the environment variable UFT_LAUNCHER then incorreclty included backslash in the Environment Variable
  • Putting the UFTWorking folder in the Program Files folder (only administrators have access to this folder)
  • Extracted UFTWorkfing folder needs subfolders res or props to work (script will not create these)
  • not installing the ALM TDConnectivity tool or opening the http://almServer:almport/qcbin/start_a.jsp?common=true 
  • Not realising that the Invoke-RunFromAlmTask  uses different enum list for almRunMode  than when using other ALM tools (runLocally not RUN_LOCAL ) 

View solution in original post

0 Likes
Highlighted
Frequent Contributor.. Frequent Contributor..
Frequent Contributor..

Re: HPToolsLauncher and Visual Studio Remote Agents

Jump to solution

Thanks for the tips in getting this to run and I fell into the same problems with the file properties.  Now I have only one error but this is confusing.  It finds the folder with the UFT test but then UFT doesn't open and run.  I am at a lose to know what is wrong.  This is the log file from VSTS what is wrong?  It will be something simple I have missed I am sure 

 

2018-06-20T15:02:30.0891296Z ##[section]Starting: Job
2018-06-20T15:02:30.0911298Z Current agent version: '2.134.2'
2018-06-20T15:02:30.5539717Z ##[section]Starting: Initialize Job
2018-06-20T15:02:30.5609724Z Prepare build directory.
2018-06-20T15:02:30.6491783Z Set build variables.
2018-06-20T15:02:30.6491783Z Download all required tasks.
2018-06-20T15:02:30.6843789Z ##[section]Finishing: Initialize Job
2018-06-20T15:02:30.7143819Z ##[section]Starting: Get Sources
2018-06-20T15:02:30.7505826Z Syncing repository: RailAutomatedTests (TfsGit)
2018-06-20T15:02:30.7535829Z Prepending Path environment variable with directory containing 'git.exe'.
2018-06-20T15:02:30.7625838Z ##[command]git version
2018-06-20T15:02:31.0491891Z git version 2.14.3.windows.1
2018-06-20T15:02:31.0803893Z ##[command]git config --get remote.origin.url
2018-06-20T15:02:31.1673907Z ##[command]git config gc.auto 0
2018-06-20T15:02:31.2337915Z ##[command]git config --get-all http.https://skfdc.visualstudio.com/SKF%20Insight%20Rail/_git/RailAutomatedTests.extraheader
2018-06-20T15:02:31.3248006Z ##[command]git config --get-all http.proxy
2018-06-20T15:02:31.4088090Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --tags --prune --progress --no-recurse-submodules origin
2018-06-20T15:02:32.6017239Z ##[command]git checkout --progress --force d017220ffae06bba338c0997c5393833b8373439
2018-06-20T15:02:32.7967434Z HEAD is now at d017220... Cal Factor Test all working this is to be used as the basic structure for all the automated tests that are to be developed
2018-06-20T15:02:32.7997437Z ##[section]Finishing: Get Sources
2018-06-20T15:02:32.8027440Z ##[section]Starting: RunFromFileSystemTask
2018-06-20T15:02:32.8177455Z ==============================================================================
2018-06-20T15:02:32.8177455Z Task : UFT File System Execution
2018-06-20T15:02:32.8177455Z Description : Execute UFT tests from file system
2018-06-20T15:02:32.8177455Z Version : 1.0.0
2018-06-20T15:02:32.8177455Z Author :
2018-06-20T15:02:32.8177455Z Help :
2018-06-20T15:02:32.8177455Z ==============================================================================
2018-06-20T15:02:32.8397477Z Preparing task execution handler.
2018-06-20T15:02:33.4440052Z Executing the powershell script: C:\agent\_work\_tasks\RunFromFileSystemTask_cfbe1493-3bb1-44d5-ac87-7f14a148a6f0\1.0.0\localTask.ps1
2018-06-20T15:02:34.0480656Z "Started..."
2018-06-20T15:02:34.1242703Z Launcher timeout is 10675199::02:48:05
2018-06-20T15:02:34.1242703Z Controller Polling Interval: 30 seconds
2018-06-20T15:02:34.1242703Z PerScenarioTimeout: 00::01:00:00 minutes
2018-06-20T15:02:34.1398704Z FileSystemTestRunner timeout is 10675199.02:48:05.4775807
2018-06-20T15:02:34.1398704Z Mc connection info is - Mc HostAddress: , McPort: 8080, Username: , UseSSL: 0, UseProxy: 0, ProxyType: 0, ProxyAddress: , ProxyPort: 0, ProxyAuth: 0, ProxyUser:
2018-06-20T15:02:34.1398704Z 1 tests found:
2018-06-20T15:02:34.1398704Z C:\RailAutomatedTests\UFT Insight Passenger\Tests\Calibration Factors\Cal Factors Test
2018-06-20T15:02:34.1398704Z ============================================================================
2018-06-20T15:02:34.2182724Z 20/06/2018 16:02:34 Running: C:\RailAutomatedTests\UFT Insight Passenger\Tests\Calibration Factors\Cal Factors Test
2018-06-20T15:02:34.2338725Z Test result: Error
2018-06-20T15:02:34.2338725Z 20/06/2018 16:02:34 Test complete: C:\RailAutomatedTests\UFT Insight Passenger\Tests\Calibration Factors\Cal Factors Test
2018-06-20T15:02:34.2338725Z -------------------------------------------------------------------------------------------------------
2018-06-20T15:02:41.1014424Z ================================================
2018-06-20T15:02:41.1014424Z Run status: Job failed, total tests: 1, succeeded: 0, failures: 0, errors: 1
2018-06-20T15:02:41.1014424Z Error : C:\RailAutomatedTests\UFT Insight Passenger\Tests\Calibration Factors\Cal Factors Test
2018-06-20T15:02:41.1014424Z ================================================
2018-06-20T15:02:42.1295233Z ##[error]Microsoft.PowerShell.Commands.WriteErrorException: Task Failed
2018-06-20T15:02:42.1485252Z ##[error]PowerShell script completed with 1 errors.
2018-06-20T15:02:42.1485252Z ##[section]Finishing: RunFromFileSystemTask
2018-06-20T15:02:42.1525256Z ##[section]Starting: Post Job Cleanup
2018-06-20T15:02:42.1565260Z Cleaning any cached credential from repository: RailAutomatedTests (Git)
2018-06-20T15:02:42.1751264Z ##[command]git remote set-url origin https://skfdc.visualstudio.com/SKF%20Insight%20Rail/_git/RailAutomatedTests
2018-06-20T15:02:42.2843271Z ##[command]git remote set-url --push origin https://skfdc.visualstudio.com/SKF%20Insight%20Rail/_git/RailAutomatedTests
2018-06-20T15:02:42.3623276Z ##[section]Finishing: Post Job Cleanup
2018-06-20T15:02:42.7667330Z ##[section]Finishing: Job
0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: HPToolsLauncher and Visual Studio Remote Agents

Jump to solution
some suggestions for debugging:
Open the PS script and see if you can run it from powershell manually
C:\agent\_work\_tasks\RunFromFileSystemTask_cfbe1493-3bb1-44d5-ac87-7f14a148a6f0\1.0.0\localTask.ps1

Random thoughts:
Check folder permissons for the user that VSTS is installed as. (eg. C:\.....\Cal Factors Test
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.