locked
Visual Studio Community 2015 - How do I run a test method just once? RRS feed

  • Question

  • Hello, I'm not sure if this is the place to post this, but I'm having an issue with running a tests right now. I want to run my test method that I just finished only once, so once it's done, I can see the output from the test.

    However, the issue that I'm having is that once the test finishes running, it reruns the script again and kicks off the same method again and again.  As for how long the test runs for, it usually finishes up after a min or 2.  After about 23 mins and 15 tests executions later, the script stops running and I can finally see the ouput.

    Is there any place in the Visual Studio software where I can set how many times the test method gets executed?


    • Edited by tscott777 Friday, May 6, 2016 5:51 PM Updating information
    Friday, May 6, 2016 5:32 PM

Answers

  • Thanks for Teodora Stanev's reply.

    Hi tscott777,

    Please provide some detailed information about the question that Teodora Stanev asked, which can help us reproduce your problem in our side.

    As far as I know, I don't find where I can set how many times the test method gets executed in Unit Test. But in Load Test, we can set execute times through Test iterations in Run Settings.

    And in Unit Test, we can select one test method in Test Explorer to choose Run Selected Test to choose run a test independently. Usually, this option often run the selected test once every time.

    Best Regards,
    Weiwei


    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.

    • Proposed as answer by Weiwei Cai Wednesday, May 11, 2016 9:44 AM
    • Marked as answer by Weiwei Cai Monday, May 16, 2016 4:58 AM
    Monday, May 9, 2016 5:09 AM

All replies

  • Is this unit test?

    How do you run the test?

    Thank you

    Friday, May 6, 2016 7:37 PM
  • Thanks for Teodora Stanev's reply.

    Hi tscott777,

    Please provide some detailed information about the question that Teodora Stanev asked, which can help us reproduce your problem in our side.

    As far as I know, I don't find where I can set how many times the test method gets executed in Unit Test. But in Load Test, we can set execute times through Test iterations in Run Settings.

    And in Unit Test, we can select one test method in Test Explorer to choose Run Selected Test to choose run a test independently. Usually, this option often run the selected test once every time.

    Best Regards,
    Weiwei


    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.

    • Proposed as answer by Weiwei Cai Wednesday, May 11, 2016 9:44 AM
    • Marked as answer by Weiwei Cai Monday, May 16, 2016 4:58 AM
    Monday, May 9, 2016 5:09 AM