MSTest

  1. MSTest Command Line Error - Test 'x' cannot be found

  2. The problem is in the vsmdi file.  There is an attribute of the 'TestLink' element, 'storage'.  It is pointed to the relative path in the Visual Studio environment.  That's why it works inside VS and not in the test environment.  You will need to point it to the correct path in the test environment and the test will execute.

    <TestLink id="6250d036-0a52-8f15-a606-0045dc75e284" name="EventWorkflowFYIToResolvedCoach" storage="hindsight.testingunittestshbs testsin eleasehbs tests.dll"... />

    Unfortunately that will require (at least) two versions of the vsmdi file.  I haven't figured out how to assign this attribute dynamically.

原文地址:https://www.cnblogs.com/dmdj/p/3459308.html