visual-studio-2013coded-ui-testsranorex

VS2013 Coded UI tests on TFS2012 build infrastructure


We have the following setup:

I am trying to create a Coded UI wrapper for a Ranorex automated test as described here

Everything works fine on my local build machine which has VS2013 installed. I have created a solution that contains two projects: one Coded UI Test project which acts as the "wrapper", and the Ranorex project which contains the actual Ranorex automation. The references/dlls of the Coded UI wrapper project are all contained in a separate project folder which is under version control - the dlls are NOT referenced from their C:\Program Files[...] location.

Both projects supply the dlls for compilation/build in their respective folders that contain all needed dlls. The solution compiles fine locally and executes as well. The build works as well, however test execution doesn't work. Test Manager throws an exception stating that

Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=11.0.0.0 cannot be found.

WHY ?!?

I have no idea where this reference comes from other than the build agent which is version 2012.

However - the dlls for compilation are project-contained and thus it shouldn't matter that the build agent is 2012, right ?

I have also tried to configure the build definition by adding the /p:ToolsVersion=12.0 switch to the MSBuild arguments - it seems to make no difference.

I have also tried to change the targeted .NET version for both projects to 4.0, 4.5 (in all permutations possible), which didn't help.

Where does the reference come from and how can I get rid of it and make the test execute on 2013 test agents ? Or is this an incompatibility that we can't get round ?

I should mention that at no point is Visual Studio 2012 involved - anywhere. I have no idea where else to look or which parameters to change...

Thanks for your help !


Solution

  • The dll Microsoft.VisualStudio.QualityTools.CodedUITestFramework is referenced by the test project, and it is used to run the tests.

    I found that the agents running the tests must match the visual studio version used to code the tests. Try installing VS2013 controller/agents.

    EDIT

    I HAVE NOT TRIED THIS, but maybe you could add this dll in your test container, via your build definition. Not sure if it would work.

    In your build definition > Processes > Automated Tests > Specify assembly tests files (not sure for the traduction, mine is french). There you have your test dll's. If you add the CodedUITestFramework dll there, it will likely be available for the agent.