locked
MSTest fails to run test: no output or error messages RRS feed

  • Question

  • I have designed a TestMethod and have successfully run the test method from my computer from the command line.  That is, when I run the test from Test Explorer, I get a good build of the code.  I copy those binaries to a second folder so I can test it by using MSTest from the command line.

    So, my process is as follows:

    1. From Visual Studio, run the TestMethod from the Test Explorer window. (Successful run)
    2. Copy binaries from the TestResults\..\Out folder to a new folder (C:\AutomatedTests)
    3. Open the Developer Command Prompt for VS2013 and run the following commands (Successful run)
           cd C:\AutomatedTests
           mstest /testcontainer:C:\AutomatedTests\regression.dll /test:DR_Comprehensive_Test
    4. I then copy the binaries to another computer, which has Visual Studio 2013 Ultimate installed (My computer has VS 2013 Premium).  I run the same mstest command on this computer and I get the following:
    C:\WINAutomationTesting>mstest /testcontainer:regression.dll /test:DR_Comprehensive_Test
    Microsoft (R) Test Execution Command Line Tool Version 12.0.21005.1
    Copyright (c) Microsoft Corporation. All rights reserved.
    
    Loading regression.dll...
    Starting execution...
    
    Results               Top Level Tests
    -------               ---------------
    Failed                DR_Comprehensive_Test
    0/1 test(s) Passed, 1 Failed
    
    Summary
    -------
    Test Run Failed.
      Failed  1
      ---------
      Total   1
    Results file:  C:\WINAutomationTesting\TestResults\testlab5_TESTLAB5-PC 2015-05-18 17_17_44.trx
    Test Settings: Default Test Settings


    How can I find out why the MSTest is not appearing to run my test properly?
    Monday, May 18, 2015 9:32 PM

Answers

  • Ah, I had the trx file. When I double clicked it, the information I needed was there. But initially it wasn't being displayed.  It works now. Thanks.
    Tuesday, May 19, 2015 4:48 PM

All replies

  • I decided to load the source code for the test on the second computer and execute it from the Test Explorer.  Upon doing so, I got the error about being unable to bind to locking port.  I will have to research that within scope of my test (C# and Selenium web automation).

    However, how would I have found out this information using the MSTest command line argument and/or results?
    Monday, May 18, 2015 9:55 PM
  • Hi Jeff,

    >>how would I have found out this information using the MSTest command line argument and/or results?

    If you want to view the detailed load test result, please collect the .TRX file with command line like:

    MSTest /testmetadata:Bank.vsmdi /resultsfile:BanktestResults.trx

    Reference:

    https://msdn.microsoft.com/en-us/library/ms182488.aspx

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 19, 2015 8:21 AM
  • Ah, I had the trx file. When I double clicked it, the information I needed was there. But initially it wasn't being displayed.  It works now. Thanks.
    Tuesday, May 19, 2015 4:48 PM
  • You are welcome! Glad to know that it works well now.

    Have a nice day,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 20, 2015 1:15 AM