{"id":31315,"date":"2017-05-05T12:12:22","date_gmt":"2017-05-05T20:12:22","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/?p=31315"},"modified":"2019-02-14T15:51:46","modified_gmt":"2019-02-14T23:51:46","slug":"using-visual-studio-agent-deployment-task-on-machines-not-connected-to-the-internet","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/using-visual-studio-agent-deployment-task-on-machines-not-connected-to-the-internet\/","title":{"rendered":"Using &#8216;Visual Studio Agent Deployment&#8217; task on machines not connected to the internet"},"content":{"rendered":"<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">&#8216;Run Functional Tests&#8217; (RFT) task is used for running functional tests using remote machines or to run tests in a distributed manner using multiple machines. With TFS 2017 Update 2 and VSTS, You can use &#8220;Run Functional Tests&#8221; task to run tests using Visual Studio Test Agent 2017.<\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">The RFT task needs a companion &#8216;Deploy Test Agent&#8217; task that deploys and configures test agents against your VSTS account or the TFS server. Using the Deploy Test Agent version 2 task, you can now choose which version of Test Agents you want to deploy.<\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/AgentVersionSetting.png\"><img decoding=\"async\" width=\"500\" height=\"114\" class=\"wp-image-31325 size-mediumlarge aligncenter\" alt=\"agentversionsetting\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/05\/AgentVersionSetting-500x114.png\" \/><\/a><\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">For machines which are connected to the internet, the process is pretty straightforward.<\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">The required test agent will be downloaded and installed automatically if it&#8217;s not present on the machine.<\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">For machines that are not connected to the internet, the task supports installing test agents from a shared UNC path. For this, you need to make the test agent installer available on a network share.<\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">If you are installing Test Agent 2015, use the following steps:<\/p>\n<ol type=\"1\" style=\"margin-left: .375in;direction: ltr;margin-top: 0in;margin-bottom: 0in;font-family: Calibri;font-size: 11.0pt;font-weight: normal;font-style: normal\">\n<li style=\"margin-top: 0;margin-bottom: 0;vertical-align: middle\" value=\"1\"><span style=\"font-family: Calibri;font-size: 11.0pt;font-weight: normal;font-style: normal\">Download Test Agent 2015 from <\/span><a href=\"https:\/\/go.microsoft.com\/fwlink\/?LinkId=827840\"><span style=\"font-family: Calibri;font-size: 11.0pt\">https:\/\/go.microsoft.com\/fwlink\/?LinkId=827840<\/span><\/a><\/li>\n<li style=\"margin-top: 0;margin-bottom: 0;vertical-align: middle\"><span style=\"font-family: Calibri;font-size: 11.0pt\">Copy the test agent to a machine which is accessible by build agent and test agent machines<\/span><\/li>\n<li style=\"margin-top: 0;margin-bottom: 0;vertical-align: middle\"><span style=\"font-family: Calibri;font-size: 11.0pt\">Share the test agent folder using Windows file sharing<\/span><\/li>\n<li style=\"margin-top: 0;margin-bottom: 0;vertical-align: middle\"><span style=\"font-family: Calibri;font-size: 11.0pt\">Use the shared path location in &#8220;Visual Studio Test Agent Deployment&#8221; task as shown below<\/span><\/li>\n<\/ol>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/TA2015.png\"><img decoding=\"async\" width=\"500\" height=\"109\" class=\"alignleft wp-image-31335 size-mediumlarge\" alt=\"ta2015\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/05\/TA2015-500x109.png\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">With the Visual Studio 2017 release, the packaging and installation experience has changed. So you need to first create an offline installer using the bootstrapper. The installer also checks for certificates to verify package authenticity, so some extra prep is required before an offline installer can be used by the &#8216;Visual Studio Test Agent Deployment&#8217; task.<\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">To easily create an offline package of Test Agent 2017 in a single step, we have created a Powershell script.<\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">If you are using TFS 2017 Update 2, please use the PS script located <a href=\"https:\/\/github.com\/Microsoft\/vsts-tasks\/tree\/releases\/dev15tfsu3\/Tasks\/DeployVisualStudioTestAgent\/CreateOfflineTestAgent.ps1\">here<\/a>.<\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">If you are using VSTS, please use the PS script located <a href=\"https:\/\/github.com\/Microsoft\/vsts-tasks\/blob\/master\/Tasks\/DeployVisualStudioTestAgent\/CreateOfflineTestAgent.ps1\">here<\/a><\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">Run the PS script providing language and sharedFolder as optional parameters. If these parameters are not provided, Test Agent English (en-us) package will be downloaded to the folder from where the script runs.<\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">If you do not want to run the script, you can perform the following steps instead:<\/p>\n<ol type=\"1\" style=\"margin-left: .375in;direction: ltr;margin-top: 0in;margin-bottom: 0in;font-family: Calibri;font-size: 11.0pt;font-weight: normal;font-style: normal\">\n<li style=\"margin-top: 0;margin-bottom: 0;vertical-align: middle\" value=\"1\"><span style=\"font-family: Calibri;font-size: 11.0pt;font-weight: normal;font-style: normal\">Download the bootstrapper vs_testagent.exe from: <\/span><a href=\"https:\/\/aka.ms\/vs\/15\/release\/vs_TestAgent.exe\"><span style=\"font-family: Calibri;font-size: 11.0pt\">https:\/\/aka.ms\/vs\/15\/release\/vs_TestAgent.exe<\/span><\/a><\/li>\n<li style=\"margin-top: 0;margin-bottom: 0;vertical-align: middle\"><span style=\"font-family: Calibri;font-size: 11.0pt\">Run the following command to create an offline cache (the following example assumes ENU language)<\/span><\/li>\n<\/ol>\n<p style=\"margin: 0in;margin-left: .75in;font-family: Calibri;font-size: 11.0pt\">vs_testagent.exe &#8211;layout C:TA2017Setup &#8211;lang en-US<\/p>\n<p style=\"margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt\">This downloads the Test agent packages to C:TA2017Setup folder<\/p>\n<p style=\"margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/TAPackage.png\"><img decoding=\"async\" width=\"336\" height=\"350\" class=\"size-mediumlarge wp-image-31345 aligncenter\" alt=\"tapackage\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/05\/TAPackage-336x350.png\" \/><\/a><\/p>\n<p style=\"margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt\">3.\u00a0Now &#8220;Archive\/Zip&#8221;\u00a0 all the contents of the folder and name it as &#8220;TestAgent.zip&#8221;.\u00a0Please make sure you retain the directory information while zipping.<\/p>\n<p style=\"margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/PreserveDirectory.png\"><img decoding=\"async\" width=\"500\" height=\"264\" class=\"size-mediumlarge wp-image-31355 aligncenter\" alt=\"preservedirectory\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/05\/PreserveDirectory-500x264.png\" \/><\/a><\/p>\n<p style=\"margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt\">4.\u00a0Share the folder which contains &#8220;TestAgent.zip&#8221; using Windows file sharing.<\/p>\n<p style=\"margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt\"><span style=\"font-family: Calibri;font-size: 11.0pt\">5. Use the shared path location in &#8220;Visual Studio Test Agent Deployment&#8221;\u00a0<\/span><\/p>\n<p style=\"margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/TA2017.png\"><img decoding=\"async\" width=\"500\" height=\"113\" class=\"size-mediumlarge wp-image-31365 aligncenter\" alt=\"ta2017\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/05\/TA2017-500x113.png\" \/><\/a><\/p>\n<p style=\"margin: 0in;font-family: Calibri;font-size: 11.0pt\">Notes:<\/p>\n<ol type=\"1\" style=\"margin-left: .375in;direction: ltr;margin-top: 0in;margin-bottom: 0in;font-family: Calibri;font-size: 11.0pt;font-weight: normal;font-style: normal\">\n<li style=\"margin-top: 0;margin-bottom: 0;vertical-align: middle\" value=\"1\"><span style=\"font-family: Calibri;font-size: 11.0pt;font-weight: normal;font-style: normal\">For Test agent 2017, make sure the archive retains the folder structure as shown and name it &#8220;TestAgent.zip&#8221;<\/span><\/li>\n<li style=\"margin-top: 0;margin-bottom: 0;vertical-align: middle\"><span style=\"font-family: Calibri;font-size: 11.0pt\">If you are using Azure machines, the agent will be downloaded from internet and installed automatically. For creating Azure machines, w<\/span>e recommend creating &#8220;VM image with Test Agent preinstalled&#8221;. If Test Agent is preinstalled, the &#8216;Deploy Test Agent&#8217; step skips the installation portion and simply configures the agent, and thus runs faster.<\/li>\n<\/ol>\n<ol type=\"1\" style=\"margin-left: .375in;direction: ltr;margin-top: 0in;margin-bottom: 0in;font-family: Calibri;font-size: 11.0pt;font-weight: normal;font-style: normal\">\n<li style=\"margin-top: 0;margin-bottom: 0;vertical-align: middle\" value=\"3\"><span style=\"font-family: Calibri;font-size: 11.0pt;font-weight: normal;font-style: normal\">It is also recommended that you install the latest <a href=\"https:\/\/msdn.microsoft.com\/en-us\/powershell\/wmf\/readme\">Windows Management Framework<\/a> on test agent machines <\/span><\/li>\n<\/ol>\n<ol type=\"1\" style=\"margin-left: .375in;direction: ltr;margin-top: 0in;margin-bottom: 0in;font-family: Calibri;font-size: 11.0pt;font-weight: normal;font-style: normal\">\n<li style=\"margin-top: 0;margin-bottom: 0;vertical-align: middle\" value=\"4\"><span style=\"font-family: Calibri;font-size: 11.0pt;font-weight: normal;font-style: normal\">A prerequisites checklist is available at <\/span><a href=\"https:\/\/github.com\/Microsoft\/vsts-tasks\/tree\/master\/Tasks\/DeployVisualStudioTestAgent\"><span style=\"font-family: Calibri;font-size: 11.0pt\">https:\/\/github.com\/Microsoft\/vsts-tasks\/tree\/master\/Tasks\/DeployVisualStudioTestAgent<\/span><\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>&#8216;Run Functional Tests&#8217; (RFT) task is used for running functional tests using remote machines or to run tests in a distributed manner using multiple machines. With TFS 2017 Update 2 and VSTS, You can use &#8220;Run Functional Tests&#8221; task to run tests using Visual Studio Test Agent 2017. The RFT task needs a companion &#8216;Deploy [&hellip;]<\/p>\n","protected":false},"author":86,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,252],"tags":[],"class_list":["post-31315","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-testing"],"acf":[],"blog_post_summary":"<p>&#8216;Run Functional Tests&#8217; (RFT) task is used for running functional tests using remote machines or to run tests in a distributed manner using multiple machines. With TFS 2017 Update 2 and VSTS, You can use &#8220;Run Functional Tests&#8221; task to run tests using Visual Studio Test Agent 2017. The RFT task needs a companion &#8216;Deploy [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/31315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=31315"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/31315\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=31315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=31315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=31315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}