0

My Task is to run HP-UFT Test Scripts created in Jenkins Build using VSTS Build and then Automatically pass the Test Scripts and attach the Test Results in related Test Case created in Test Hub. Steps I follow:-

 1. Download the Private Agent(Windows) and create a Build Definition using Jenkins Template.
2.Create a Jenkins Connection(Jenkins is on my Local)using Service Endpoint, Add the following Tasks in the Build Definition.
1.Queue Jenkins Job               2.Download Artifacts   3.Publish Artifacts
4.Publish Test Results
3.Queue the Build using Default Agent Queue,and Build got succeeded.
Hence I am able to integrate Jenkins with VSTS. Now Next Task is to associate this Build with a particular Test Case in Test Hub and attach the screenshots there and automatically pass/fail the Script based on Build Status.

I am following the Steps mentioned in https://www.visualstudio.com/en-us/docs/test/continuous-testing/run-automated-tests-from-test-hub

enter image description here Please Note:- My Test is not based on Visual Studio and rather its an Automation Test Case which is run using HP tool called UFT.

enter image description here

enter image description here

Rodger Nadal
  • 309
  • 2
  • 8
  • 21
  • What's the result if you do test by using Unified Functional Testing extension? – starian chen-MSFT Jul 26 '17 at 02:27
  • @starain-MSFT I am performing Steps mentioned in https://github.com/hpsa/ADM-TFS-Extension/wiki/Unified-Functional-Testing-(UFT)-TFS-Extension I am stuck at the Error Message:-"No agent could be found with the following capabilities: UFT_LAUNCHER" – Rodger Nadal Aug 01 '17 at 10:29
  • Do you restart the build agent? The unpack.ps1 should add UFT_LAUNCHER environment variable. – starian chen-MSFT Aug 02 '17 at 01:32
  • I am trying a bit luck to find any Steps for Agent Restart, but didn't find any. can you help on Restart Agent Steps. – Rodger Nadal Aug 02 '17 at 07:28
  • Actually I am not clear with Step 3 of Installing UFT TFS Extension. https://github.com/hpsa/ADM-TFS-Extension/wiki/Installing-the-Unified-Functional-Testing-TFS-Extension 3.Run the unpack Powershell script. This unpacks the necessary files for the extension and UFT agent to run and sets the system environmental variables appropriately. – Rodger Nadal Aug 02 '17 at 07:39
  • If the build agent running as service, you can restart the service directly. If it is running as interactive mode, close the command prompt and call run.cmd. You also can restart the machine. Regarding step 3, there is unpack.ps1 file in the download package, run that powershell file. You can check the [source code](https://github.com/hpsa/ADM-TFS-Extension/blob/master/installation/unpack.ps1). On the other hand, you can add the environment manually. – starian chen-MSFT Aug 02 '17 at 08:30
  • I restarted the PC,downloaded the Entire Zip Folder and run .\unpack.ps1 Command and getting Error Message related to Execution Policies. Screenshot is attached in the Question Stimulus. – Rodger Nadal Aug 02 '17 at 09:46
  • Regarding policy issue, try the ways in https://stackoverflow.com/questions/16460163/ps1-cannot-be-loaded-because-the-execution-of-scripts-is-disabled-on-this-syste/22949065 and https://stackoverflow.com/questions/4037939/powershell-says-execution-of-scripts-is-disabled-on-this-system – starian chen-MSFT Aug 02 '17 at 09:56
  • You can add environment variable manually: System properties>Advanced> Environment variables>Add UFT_LAUNCHER key with [UFT.zip unpacked path]\UFTWorking value. – starian chen-MSFT Aug 04 '17 at 07:29
  • UFT_Launcher Issue is resolved and I am able to Invoke the Build. But My Concern is that I am getting 0 Automated Tests Identified as given in the above 2nd Screenshot when I am running the Test Case using Run With Option. Please help here – Rodger Nadal Aug 07 '17 at 06:35

1 Answers1

0

The documentation you provided a link is for using the Microsoft-native tools; it won't help you in this situation.

HP has UFT testing tools for VSTS available on the Marketplace that will allow you to run UFT test scripts. However, I would be extremely surprised if those tasks interact with VSTS test cases. I'm sure it's possible to update the test cases in VSTS with the test results from UFT, but I'm not familiar enough with the UFT platform to speculate as to how that may be accomplished.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
  • 1
    I installed UFT Extension and trying to queue the Build adding 2 Tasks :- Publish Artifact drop, Run UFT Test From File System. I am getting below Error while queuing the build: "No agent could be found with the following capabilities: UFT_LAUNCHER" – Rodger Nadal Aug 01 '17 at 07:16
  • I have tried alternate method of Creating Release Definition and I am following the blog:- visualstudio.com/en-us/docs/test/continuous-testing/… In the End when I click Run Test using Automated tests using Release Environment, I am stuck while running Tests using Options I am getting value of Identifying Tests as 0 as given in the above Screenshot. – Rodger Nadal Aug 01 '17 at 10:42