The build directory of the test run either does not exist or access permission is required - microsoft-test-manager

1) Installed and configured Test Agent(2013) using Service Account that has Project Administrator build permissions in TFS in Test Agent machine(Remote Desktop)
2) Installed and configured Test Controller(2013) using same Service Account in Controller machine(Remote Desktop)
3) Established connection between Test Agent and Controller with the same service Account
4) Created successfully a lab environment using the same Service Account in MTM
5) Created build definition and mapped latest build number to the Test plan in MTM
6) Ran the Test case from MTM but running in to an error with the message "The build directory of the test run either does not exist or access permission is required", though service account has access to build drop location
7) Scripted Test methods in Visual Studio 2017 and using TFS 2015. Test Agent and Test Controller are of 2013 version. Service Account and Virtual machines all are in same domain

This is a known issue with MTM. If you are using vNext build, this issue arises. Please see the Q&A portion in the link below.
https://msdn.microsoft.com/en-us/library/dd380741.aspx

Related

Visual Studio 2017 Web publishing fails if user is non-admin while the same user can be used for VS2015 web publishing on the same web server

I am trying to publish a ASP.NET Core Web project to IIS (remote server) using a non-admin account using Visual Studio 2017 and I have the following error on deploy:
Starting Web deployment task from source:
manifest(D:\Projects\Own\AspNetCore\CoreWithAngularTrial\CoreWithAngularTrialApi\obj\Debug\netcoreapp1.1\PubTmp\CoreWithAngularTrialApi.SourceManifest.xml)
to Destination: auto(). C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\MSBuild\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeploy.targets(134,5):
Error : Web deployment task failed. (Connected to the remote computer
("...") using the Web Management Service, but could
not authorize. Make sure that you are using the correct user name and
password, that the site you are connecting to exists, and that the
credentials represent a user who has permissions to access the site.
Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.)
Make sure the site name, user name, and password are correct. If the
issue is not resolved, please contact your local or server
administrator. Error details: Connected to the remote computer
("...") using the Web Management Service, but could
not authorize. Make sure that you are using the correct user name and
password, that the site you are connecting to exists, and that the
credentials represent a user who has permissions to access the site.
Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
The remote server returned an error: (401) Unauthorized. Publish
failed to deploy.
I have the following configuration for deployment:
Publish method = Web deploy
Server = servername:8172/msdeploy.axd
Site name = Default Web Site/CoreWithAngularTestApi
User name = username
Password = ******
The exact same configuration works when publishing a different application (ASP.NET MVC 5) under the same Web site (Default Web Site), so publishing configuration appears to be correct on the remote server.
Making username a local administrator unblocks the publishing process in Visual Studio 2017.
Also, publishing configuration files (*.pubxml) are virtually identical.
Event viewer on remote server catches the following error:
IISWMSVC_AUTHORIZATION_SERVER_NOT_ALLOWED
Only Windows Administrators are allowed to connect using a server
connection. Other users should use the 'Connect To Site or
Application' task to be able to connect.
Process:WMSvc User=username
Question: How can I enabled non-administration web publishing from Visual Studio 2017?
This issue has been fixed: https://github.com/aspnet/websdk/issues/146.
ASP.NET core project uses a different set of Publish targets (hence the change in behavior from MVC5). This project is available on GitHub - https://github.com/aspnet/websdk.
I managed to figure out why the publish fails with non-admin user. Server setup is correct, but Visual Studio publishing seems to treat ASP.NET Core Web app deployment differently from ASP.NET MVC 5 one.
I had to explicitly specify web site name within the publishing profile xml file. So, instead of:
<MSDeployServiceURL>servername:8172/msdeploy.axd</MSDeployServiceURL>
I put
<MSDeployServiceURL>servername:8172/msdeploy.axd?Site=Default Web Site</MSDeployServiceURL>
NOTE: This problem does not occur when publishing an MVC 5 project within VS2017.

Cant web deploy web application from team city

Im having a bit of trouble web deploying from my CI server teamcity.I can however do a web deploy through visual studio.
I get the following error
Open in IDE
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4276,
5): error ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed.
(Could not connect to the remote computer ("destinationserver"). On
the remote computer, make sure that Web Deploy is installed and that
the required process ("Web Deployment Agent Service") is started.
Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)
and this is my configuration in team city
enter image description here
i have also opened up port 8172 so i dont think it is a permissions issue and checked the username and pass is correct
So what i dont understand is why i am able to publish locally but not from the CI?
Thanks,
Martin
I solve this replacing the IP address of the destination host with the DNS name and adding this parameter to the deployment:
/P:MsDeployServiceUrl=https://%TargetServer%/MsDeploy.axd?site=%SiteName%

TFS2015 Run Functional Tests - Windows Security prompt for credentials

I'm running functional tests(selenium) on remote test machines.
Sadly when i started using multiple test machines i get Windows Security prompt for credentials while Run Functional Tests step is performed on remote machine.
When i enter credentials set for Test Agent, functional tests starts but after restarting the test machine...
This prompt occurs each time when i start build with functional tests.
I tried to add/remove credentials in Credential Manager but each time new Credential for PersonalAccessToken is added.
I thought that setting same account name with same password on each machine may be the reason, but i changed it and this still occurs.
Anyone faced this problem before?
The account that you use in the Test Agent deployment step needs to have access to TFS.
This is not authenticated using PAS but AD credentials, the same ones that are used to run the service.

Visual Studio Load Test "No such host is known"

I am trying to load test with Visual Studio. I have the test on my local machine, the controller set up on a Server (WinServer 2008 R2) and the Agents on a separate server (WinServer 2008 R2).
I have successfully setup the test controller in visual studio and can connect to it (when i open up Manage test controller, enter in the controller server address, I can find it, and the related agents show up as well)
But when I try to run the test, it throws the error:
Test run 'TestName' could not be executed. Failed to queue test run to the controller that connects data and diagnostics: ControllerServerAddress. No such host is known
Try the following:
On the test agent update the C:\Windows\System32\drivers\etc\hosts file with the controller name and IP address of the test controller. Also to be sure that the performance monitor can be used by the test controller during the test turn on network discovery for the test agent.

"Test agent could not connect to the test controller" VS2013 Agents

I am receiving the error when trying to register a test agent to the load test controller
Configuration started on 2015/10/16, 16:05:47.
OS Version : Microsoft Windows NT 6.3.9600.0
Executable version : 12.0.21005.1
I, 2015/10/16, 16:06:07.812, Restarted service successfully.
I, 2015/10/16, 16:06:07.968, Verifying that the test agent is able to connect to the test controller.
E, 2015/10/16, 16:08:10.005, Test agent could not connect to the test controller.
I, 2015/10/16, 16:08:10.005, Disabling auto logon on the machine...
I, 2015/10/16, 16:08:10.005, Adding agent setting AutoLogonEnabledByAgentConfiguration=0 on agent machine
In the windows event log, this is seen:
Unable to connect to the controller on 'machinename:6901'. The server has rejected the client credentials.
The logon attempt failed
I've tried all I can find for people that have reported similar issues (Firewall is disabled, no antivirus, UAC is disabled, user is in admin group as well as TeamTestAgentService/ControllerAdmins/ControllerUsers). I've tried running the setup under different users/same user/"as admin" while still using the same username/pass for the log on. Trying to point different machines Test Agents to this controller and the same error occurs. Per another site, I also tried adding this to QTAgentService.exe.config
<appSettings>
<add key="BindTo" value="x.x.x.x"/>
</appSettings>
I have also tried using a different account for the Controller vs Test Agent. IE Both CtrlUser and TestUser are in the same groups listed above. As I understand it thought, this should work since they should be the same name/pass for Workgroup authentication.
I've referenced these pages among others and unless I've missed something, those solutions do not apply.
"Test Agent could not connect to the test controller" VS2012 Agents
VS2013 Test agent and controller not communicating
VS2013 Remote load test agent can't connect to controller
https://social.msdn.microsoft.com/Forums/en-US/59bc2270-37d9-4297-ac3f-e0da21d10a95/test-agent-could-not-connect-to-the-test-controller-vs2012-agents
Any thoughts/suggestions?
I was using a version downloaded by a prior employee that we have been using for CodedUI testing (12.0.21005.1). I downloaded the latest version (2013 Update 5) and after installing that, it worked with the same settings I was using before.

Resources