Coded UI test with test agent on VM - c#-4.0

I configured the test agent on VM, but when initiate a test from MTM/TFS build, the test agent is not performing the GUI test. i can see a successful call from the test controller to the VM test agent. The VM is not lock and in active window screen but somehow its not performing the GUI action that i coded.
it threw below exception after test failed:
"Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException:
The playback failed to find the control with the given search properties. Additional Details: TechnologyName: 'MSAA'ControlType:"
This is very common exception where cannot find the control, but the control is on the screen.
i did the same config by installing test agent on my pyciscal workstation, the test agent able perform the test successfully from the test controller. this is confirm i do not have any problem on my testscript,testcontroller and tfs build. Is there any missing config or permission on my VM? or VM do not have mouse/keyboard causing the GUI test failure?

Related

Azure DevOp - Set Screen Resolution interactive mode

Due to fact that my VM is opening in small resolution I've been facing lots of situations with flaky tests, mainly about "Element is not clickable" notification. The solution to my problem might be adding extensions and increase the resolution:
https://marketplace.visualstudio.com/items?itemName=ms-autotest.screen-resolution-utility-task
The problem is I don't exactly know where it should be placed inside my pipeline which looks like this:
In order to run successfully this extensions there is a need to fulfill requirements:
Agent must be configured to run as an interactive process with autologin enabled (Where I should enable that?)
Shall I configure it directly by the "Demands" section on mine "Restart" agent options? I've tried putting the extensions inside the "Restart" section between "Stop" and "Start" agent tasks but it failed...
You can either reconfig your agent to interactive mode(check below detailed steps), or install a new agent and config it to interactive mode on your VM. Check here to install a new self hosted agent and check for more configuration.
1,
To reconfig your agent to interative mode, you need cd to the agent installation folder and run.\config remove to remove it first as shown in below pic.
2,
After agent is removed, Run .\config to reconfig your agent, and choose interactive during the configuration. Please refer to below screenshot and be careful to choose the right option (Y/N) at the highlighted steps
3,
To start the interactive agent by run .\run
Above steps should be ran as administrator. I followed above steps and successfully run set screen resolution task.

VS2012 CodedUI tests - how to publish and run on remote machine

I have recorded some CodedUI tests in VS2012.
How do I get them to run on a remote machine? (The remote machine already has a test agent configured, connected to a Test Controller).
In my .testsettings file, the dropdown to choose a Test Controller is always blank.
If you've selected "Remote Execution" for your Test Execution method combobox, you should get an option for <Manage Test Controllers...> in the Controller combobox.
Once you've configured your controller and agent properly, if the controller is on the same network and is running, it should display in this dialog.
Also check that your permissions and that the right user is logged into the remote machine. For more detailed info, check out this article.

MSBuild publish task fails - Unable to create directory

I have a web project that I want to publish after a successful build.
In the Edit Build Definition Window i enter the following in the MSBuild Arguments textbox:
/p:DeployOnBuild=true /p:PublishProfile=PushtoDrott
This profile is working very well locally, and even on our TFS server machine when run in the command line. On the server i use an account with local admin priviliges.
What does not work however is the task. The following error is presented:
C:\Programfiles(x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Deploy\Microsoft.Web.Publishing.Deploy.FileSystem.targets
(93): Unable to create directory
"\\remote_server_name\disk$\directory". Access to the path
'\\remote_server_name\disk$\directory' is denied.
This is most likely a security problem, but how do i go around and solve it?
Wich user is the task run by?
Is MSBuild handing over this task to some other process?
When you ran the task on the TFS server machine, what user did you login as?
When Tfs build runs on a server the process will be run under the user which is configured to run tfs build agent service. So find that user and provide it access to the mentioned path and it will work.
We found out that the profile could publish the site when the site was stopped. It was most likely a case of IIS locking some file when there are users on the site.

CSUPLOAD Error: Cannot find the VM Role Agent-Failed the verification tests

I'm about ready to cry so any help is appreciated:
I have prepared a VM Role, installed the Azure Integration Tools and run the sysprep, running csupload from a 64bit command prompt machine, but still am getting this error:
Cannot find the VM Role Agent
Failed the verification test
Cannot prepare VHD.....
I tried just bypassing with skipverify, but when trying to run, the instance is declared unhealthy.
Any ideas?
I think you might need to check the Version of the SDK
http://social.msdn.microsoft.com/Forums/en-US/windowsazuretroubleshooting/thread/af9ecd64-5c88-4745-b4f1-a227485fead0

CruiseControl.Net switch from console to service

I have set up a cruisecontrol.net build server. When running it in console mode it works fine, but when trying to run it as a windows service it doesn't work. The log file shows the following message:
ThoughtWorks.CruiseControl.Core.CruiseControlException:
Source control operation failed: No VSS database (srcsafe.ini) found.
Use the SSDIR environment variable or run netsetup.
The ssdir is set in ccnet.config, so what am I missing here?
Not sure if it's applicable but when I had problems switching between the Console version and the Service version it was down to access rights for the user I was starting the service as.
Perhaps the Service does not have access rights to the srcsafe.ini file and your account does(assuming that's what your using to run the console).
Apologies if I'm way off the mark, just trying to help!
I ran into similar issues when setting up our CI environment at work. If you can get log-in permissions for the service account you are using, you can log in as that account and run CC.NET via the console and debug your issues.

Resources