Issue running tests marked with the async keywork from the mstest command-line in VS2011-Beta

Answered Issue running tests marked with the async keywork from the mstest command-line in VS2011-Beta

  • 2012年5月11日 9:24
     
     

    Hi,

    I am unable to run tests marked with the async keyword using MSTest from the command-line.  The same test runs OK from within Visual Studio.  The error that I get is:

    Not Runnable 
    UTA007: Method TheTest defined in class Test does not have correct signature. Test method marked with the [TestMethod] attribute must be non-static, public, does not return a value and should not take any parameter. for example: public void Test.Class1.Test(). 

    Any help will be gratefully appreciated

    Thanks,

    Dan

全部回复

  • 2012年5月12日 9:01
     
     已答复

    Hi Dannv,

    Thanks for trying VS11 Beta and giving feedback.

    MSTest.exe is old command line test executor, in beta it does not support execution of async test methods.
    We recommend you to use new command line test runner $(VSInstallDir)\Common7\IDE\CommonExtenstions\Microsoft\TestWindow\vstest.console.exe to execute your tests. Refer http://msdn.microsoft.com/en-us/library/hh507838(v=vs.110).aspx for more info.


    Regards,
    Vikram Agrawal,
    Developer, VSTLM, Microsoft Corporation