(Note: I am unable to ask this question on the original blog for some reason).
As described in this blog: http://blogs.msdn.com/b/gautamg/archive/2010/01/05/2-hello-world-extension-for-coded-ui-test.aspx
More specifically, this section gives me grief:
Build & Deploy the extension
Build and deploy the binaries to "%CommonProgramFiles%\Microsoft Shared\VSTT\10.0\UITestExtensionPackages"
directory. To deploy, you use following commands:
md "%CommonProgramFiles%\Microsoft Shared\VSTT\10.0\UITestExtensionPackages"
For 32 bit -
xcopy /y "%~dp0\bin\Debug\UITestHelloWorldPackage.*" "%CommonProgramFiles%\Microsoft Shared\VSTT\10.0\UITestExtensionPackages\*.*"
For 64 bit -
xcopy /y "%~dp0\bin\Debug\UITestHelloWorldPackage.*" "%Common开发者_JAVA百科ProgramFiles(x86)%\Microsoft Shared\VSTT\10.0\UITestExtensionPackages\*.*"
Note – The above assumes you are building Debug build which is default in VS. Also, if you are using Windows Vista or higher, you will need to do above steps from CMD window with administrative privilege to access "%CommonProgramFiles%"
.
For deploying, another alternative if for some reason the author does not want to copy to the predefined directory is to add following in registry –
Create “HKLM\Software\Microsoft\VisualStudio\10.0\TeamTest\UITest\UITestExtensionPackages”
key.
Under this, create a key with your extension name like “HelloWorldPackage”
here. Set the default value of this key to full path of the extension. For example, “C:\MyDir\MyExtension.dll”
.
My problem: I prefer the registry method, but it does not work. Copying the files directly over to "%CommonProgramFiles(x86)%\Microsoft Shared\VSTT\10.0\UITestExtensionPackages\"
does work. I am able to see the "Hello world" message in the debugging output as mentioned in the Verify Extension section: Go to "%temp%\UITestLogs\CodedUITestBuilder\LastRun"
directory and view UITestLog.html
.
I prefer the registry method, which is not working, and, as I mentioned at the beginning, I am unable to post this question on the original blog.
If you have had a chance to play in the same area and have had success, please share your wisdom. I am not sure how to debug this registry problem, as I see no output. For all I know, the instructions for using the registry method could be incorrect, or not exist at all in the same way as placing a file name schneller.txt
in C:\
does not make the Windows OS boot 4 seconds faster (unfortunately), and if you have been told otherwise, then good luck troubleshooting that!
Answers, comments, questions are welcome.
Registry way is working fine for me IF I don't have any dependencies on other assemblies.
The problem you face may most likely due to inability to locate the dependencies for your extension.
CodedUITestBuilder does not look at the dependent assemblies at the location you mention. You may need to tinker the configuration files to resolve your dependent assemblies.
Easiest (not great) approach is to copy your stuff to the designated folder.
精彩评论