locked
Running a coded ui test from a windows form RRS feed

Answers

  • Hi,

    If you are using VS2013 on 64 bit machine, you need to reference those assemblies from Program Files(x86)\Common Files\Microsoft Shared\VSTT\12.0 rather than VSTT\11.0 and From Program Files(x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies(PrivateAssemblies) Please make sure you reference assembly from correct path. Then don’t forget to check ‘Prefer 32 bit’ checkbox under ‘Platform target’ in Build tab in Properties page of the Windows Forms app. If you don’t check the checkbox, then the winform app will be built as 64 bit and the assemblies will be loaded from Program Files\Common Files\Microsoft Shared\VSTT\12.0 which does not have Microsoft.VisualStudio.TestTools.UITest.Extension.IE.dll.

    Thanks,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Tuesday, March 25, 2014 8:35 AM
    • Marked as answer by Claudio69 Tuesday, March 25, 2014 8:54 AM
    Monday, March 24, 2014 4:54 AM

All replies

  • Hi,

    You can reference this blog: http://blogs.microsoft.co.il/shair/2010/07/15/running-codedui-test-from-another-application/ to create a winform app to run coded UI test.

    But in VS2012, you may get some errors like Failed to load Microsoft.VisualStudio.TestTools.UITest,Extensions.IE.dll. In order to resolve such error, please add the following assemblies into References folder of the windows app:

    From %Program Files%\Common Files\Microsoft Shared\VSTT\11.0

    Microsoft.Visual Studio.TestTools.UITest.Extension.IE.dll

    Microsoft.Visual Studio.TestTools.UITest.Extension.Uia.dll

    From %Program Files%\VisualStudio 2012\Common7\IDE\PrivateAssemblies

    Microsoft.Visual Studio.TestTools.UITest.Logging dll

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Amanda Zhu Monday, March 24, 2014 3:15 AM edit
    Friday, March 21, 2014 6:13 AM
  • Hi,

    I have Visual Studio Ultimate 2013 version 12.0.30110.00 Update 1

    This is my references situation:

    From %Program Files%\Common Files\Microsoft Shared\VSTT\11.0
    Microsoft.Visual Studio.TestTools.UITest.Extension.IE.dll
    Microsoft.Visual Studio.TestTools.UITest.Extension.Uia.dll

    From %Program Files%\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies
    Microsoft.VisualStudio.QualityTools.CodedUITestFramework
    Microsoft.VisualStudio.TestTools.UITest.Extension.dll
    Microsoft.VisualStudio.TestTools.UITesting.dll

    From %Program Files%\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies
    Microsoft.VisualStudio.TestTools.UITest.CodeGeneration
    Microsoft.VisualStudio.TestTools.UITest.Framework.dll
    Microsoft.VisualStudio.TestTools.UITest.Playback.dll
    Microsoft.VisualStudio.TestTools.UITest.Logging.dll

    but when I call che function
    Microsoft.VisualStudio.TestTools.UITesting.Playback.Initialize();

    I have this exception

    An unhandled exception of type 'Microsoft.VisualStudio.TestTools.UITest.Extension.InvalidUITestExtensionPackageException' occurred in Microsoft.VisualStudio.TestTools.UITest.Framework.dll

    Additional information: The following package failed to load: C:\Program Files\Common Files\Microsoft Shared\VSTT\12.0\Microsoft.VisualStudio.TestTools.UITest.Extension.IE.dll.

    Thanks
    Friday, March 21, 2014 7:24 AM
  • Hi,

    If you are using VS2013 on 64 bit machine, you need to reference those assemblies from Program Files(x86)\Common Files\Microsoft Shared\VSTT\12.0 rather than VSTT\11.0 and From Program Files(x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies(PrivateAssemblies) Please make sure you reference assembly from correct path. Then don’t forget to check ‘Prefer 32 bit’ checkbox under ‘Platform target’ in Build tab in Properties page of the Windows Forms app. If you don’t check the checkbox, then the winform app will be built as 64 bit and the assemblies will be loaded from Program Files\Common Files\Microsoft Shared\VSTT\12.0 which does not have Microsoft.VisualStudio.TestTools.UITest.Extension.IE.dll.

    Thanks,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Tuesday, March 25, 2014 8:35 AM
    • Marked as answer by Claudio69 Tuesday, March 25, 2014 8:54 AM
    Monday, March 24, 2014 4:54 AM