views:

71

answers:

1

I like to use the "UserControl TestContainer" that works great for testing a controls properties during design time. Yet it has limitations. Usually, I just create a Windows Form Application to test the control's run-time interface. It would be nice to combine the two phases. Today, I discovered that the test-container is defined in the project file as show below.

What I like to do is create my own test-container and use it for my Windows Forms Control Library projects in Visual Studio 2008. I cannot find any specific documentation, and the documentation I found was related to MSTest and not helpful. Any help, suggestions, or research directions for implementing my own test-container?

  <ItemGroup>
    <Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
  </ItemGroup>

The "Service element above just runs the UserControlTestContainer.exe executable, passing the assembly name as a parameter.

A: 

The Service element above runs the C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\UserControlTestContainer.exe executable, passing the assembly path as a parameter.

Using .NET Reflector, I modified my existing testing application to behave like UserControlTestContainer, then copied into the IDE folder, and everything works well.

Lastly, I modified my new "user-control test-container" application to accept forms and controls, in addition to user-controls.

AMissico