microsoft / VisualStudio-TestHost

Infrastructure for executing interactive UI tests in Visual Studio.
Apache License 2.0
43 stars 23 forks source link

How can I use this library to write automated integration test? #39

Open paulodero opened 4 years ago

paulodero commented 4 years ago

I would like to know if possible how I can use this tool to perform some integration testing for a visual studio extension. I will need to write end to end tests from the time a user starts interacting with the visual studio extension, including UI tests. I have checked for any documentation online with no success.

zooba commented 4 years ago

@sailro may be able to help you out, but this library is no longer maintained.

The broken links to examples in PTVS can be fixed by replacing "master" with "v3.2.1", but that branch is nearly five years old, which is about when we stopped using it. But the examples and code wrapping DTE and Windows Automation commands may be helpful still.

The basic functionality is included in Microsoft.VSSDK.TestHostFramework.dll (in PublicAssemblies in your install), which should let you annotate tests to launch VS and give you the DTE object. I think the rest of the framework used at Microsoft is still internal-only.

sailro commented 4 years ago

Hello @paulodero, I'm going to try to add a minimal sample soon to this repo.

sharwell commented 4 years ago

@paulodero I would highly recommend using https://github.com/josetr/VsixTesting for this. It is much easier to set up, and the repository contains example tests.