Ok, so I figured out how to do it for profiler sampling (not instrumentation)...
- Launch Visual Studio (VS) and open the project that has the automated test that you would like to profile.
- Put a breakpoint on the first line of the test that will be profiled.
- Debug the test.
- Start a second instance of VS.
- Open Performance Explorer (depending on your version of VS2013 this will be at either Tools->Analyze->Windows->Performance Explorer or Analyze->Windows->Performance Explorer).
- In Performance Explorer, click Actions->Attach and attach to vstest.executionengine.*.
- Go back to the first VS instance (currently at a breakpoint) and run the test to completion.
- Go back to the second VS instance. The profiler will detect that the unit test process has exited and complete its profiling.
One thing that could be improved would be to do this with instrumentation, but it is not currently clear to me how that could be done in VS Professional edition.