none
Vs 2017 - test dont lunch RRS feed

  • Question

  • Hi,

    I crate a new clean project.

    I do right click  Run/Debug "selected Tests" and nothing happening.

    using System;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    
    namespace UnitTestProject1
    {
        [TestClass]
        public class UnitTest1
        {
            [TestMethod]
            public void TestMethod1()
            {
                int x = 1;
            }
        }
    }

    i run it but nothing happen at all, there is no data sent to the output window

    any idea?

    Wednesday, July 17, 2019 10:28 AM

Answers

  • Hi want 2 Learn, 

    Sorry for delay in reply.

    Please confirm the tag "Show output from" is "Tests" in the output window. 

    If this issue still persists, please try to build the test to check if the messages show in "Build" tag, and if not, please repair your visual studio.

    Look forward to your feedback.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by want 2 Learn Tuesday, July 23, 2019 5:17 AM
    Friday, July 19, 2019 10:20 AM

All replies

  • Hi want 2 learn,

    Welcome to MSDN forum,

    According to your description, did you want to check the value "x" after running test? If so, please add the below code:

    Console.WriteLine();

    Then you could check it by clicking "output" in test explorer.

    And as far as I know, the output window which is in VS UI often displays the test running status.

    If I misunderstand it, please feel free to contact us.

    Any feedback will be expected.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, July 18, 2019 6:16 AM
  • the test not run at all.

    the data that you see in the output window like test start or end I don't have it.

    Thursday, July 18, 2019 9:25 AM
  • Hi want 2 Learn, 

    Sorry for delay in reply.

    Please confirm the tag "Show output from" is "Tests" in the output window. 

    If this issue still persists, please try to build the test to check if the messages show in "Build" tag, and if not, please repair your visual studio.

    Look forward to your feedback.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by want 2 Learn Tuesday, July 23, 2019 5:17 AM
    Friday, July 19, 2019 10:20 AM
  • Hi friend,

    Any update for this issue?

    I can't reproduce same issue in my machines. Since it's a clean project as you mentioned above, I think maybe something is broken with VS IDE. You can follow Dyzlan's suggestion to repair the VS IDE.

    If the issue persists, you can:

    1.Update your VS2017 to latest 15.9.14 which fix most of the reported bugs

    2.Rebuild the project before you Run the test

    3.It seems to be a Unit Test project, right-click the Project=>manage nuget packages to check the Test framework, make sure they're 1.4.0-version nuget package.

    

    4.Check if the Output UnitTestProject1.dll is in bin\debug or bin\relaese path.

    Also, you can try using vstest.console.exe command-line to run the test in Developer Command Prompt for VS2017 as a temporary workaround.

    Looking forward to your reply.

    Sincerely 

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, July 22, 2019 10:31 AM
  • Dylan,

    proposal solved it, changing to "show output from" to "tests" did the trick!

    Tuesday, July 23, 2019 5:18 AM