I've set up a new TFS 2010 Buildserver to which I can VPN connect and submit a build from VS2010.
- deploys my db
- creates the build
- runs my unit tests
My next step is to push out and run my Automated UI tests as part of the same build. My problem is that the server involved is a Domain controller and as I understand things that prevents me from running a Test Controller/Agent on it (the obvious route for me with my one server).
I've seen some stuff on the web that talks about running the BUILD service interactively (rather than a Test Agent interactively) however I can't get this to work. When I try I get complaints about non created objects. (sorry: don't have access to the code right now!)
Can someone tell me is it valid these days to deploy UI tests via a TFS build like this i.e. without test controller/agents running anywhere? If not I am wondering what does it mean to have a Build service running interactively.
Thanks for your post.
To execute Code UI Test in Team Build with the Interactive Process, please refer to the detailed steps in this article: http://blogs.msdn.com/b/mathew_aniyan/archive/2009/05/26/coded-ui-test-in-a-team-build.aspx.
As far as I know, the Test Controller/Agent can install on the Domain Controller(you can contact VS UI Automation Testing experts to confirm that). Configure TFS 2010 Team Build Server to run Code UI Test, please refer to this document: http://codesmartnothard.com/ConfiguringATFS2010TeamBuildServerToRunCodedUITests.aspx. And please refer to the replies in this post: http://social.msdn.microsoft.com/Forums/en/tfsbuild/thread/d9ef6654-02b6-4ee7-8c74-d1aa4dd5a201.
John Qiao [MSFT]
MSDN Community Support | Feedback to us
Thanks for this. These are roughly the blogs/articles I've been looking at and in fact kind of reinforce my basic question, which is do you actually need a test controller/agent? Your first blog:
makes no use of test agents/models and if this works then great the answer is 'No you don't necessarily need a test controller/agent'. I'm hoping this is true ... however I can't get it to work. My UI Tests, which work fine locally are generating
'Object reference not set to an instance of an object'
all over the place when I do this with either my build service user logged on locally to the server or Virtual Desktoped to it.
The reason I don't believe I can create a Test Controller/Agent on my Domain Controller is this :
You must not install and run a test controller on a computer that is also a domain controller."
I don't usually have a great deal of time for MS documentation but... well, when they put a box around it ;)
To be more specific, the following "test" will succeed locally but when it runs as part of the build on the build server it will fail if I have a browser window open on the server and a virtual desktop open to the server .
public void Account01LoginInvalidInputs()
var window = new BrowserWindow();
window.SearchProperties[UITestControl.PropertyNames.ClassName] = "IEFrame";
windows = window.FindMatchingControls();
The last line of code here is what is generating the error, which is:
LoginInvalidInputs threw exception:
System.NullReferenceException: Object reference not set to an instance of an object.
Revealingly perhaps the test does pass on the buildserver if I DON't have a browser open on the server, so it is connecting at some level to the server.
If anyone's interested
- Running without Test Controllers/agents is valid - though a bit clunky
- You cannot run Test Controllers/Agents on a Domain controller
- My problem turned out to be specifically to do with a bug that can affect running Automated UI tests with TFS Builds. I came across a fix here ...