locked
How could find code without unit test ? RRS feed

  • Question

  • Hi All

    I have a question 

    Is there any solution to find all methods that do not have any unit test ?

    I want to know which classes have unit test and which  do not have 

    how can I find ? 

    Tuesday, February 23, 2016 11:06 AM

Answers

  • Hi Farinaz K,

    >>I want to know for which module, class or methods did not write a unit test , is there any solution for this ?

    As far as I know, there is no clear way to know which class or method has not written a unit test or has written a unit test.

    But you can get which code has been covered by the unit test you wrote via running your test with analyzing code coverage.(Test->Analyze code coverage->All tests)

    For the detailed information about Code Coverage. Please refer to the following document about "Using Code Coverage to Determine How Much Code is being Tested"

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

    Best Regards,

    Lake Xiao


    • Edited by lake Xiao Monday, February 29, 2016 1:25 AM
    • Marked as answer by Farinaz K Monday, February 29, 2016 7:42 AM
    Monday, February 29, 2016 1:24 AM

All replies

  • Hi Farinaz K,

    Thanks for your post.

    >>I want to know which classes have unit test and which  do not have 

    As far as I know, Code UI test only support public class.

    And if you want to know which classes have unit test. You can right click in the class then click "Create Unit Test"

    If I misunderstood your issue. Please free feel to let me know.

    Best Regards,

    Lake Xiao 

    • Proposed as answer by lake Xiao Friday, February 26, 2016 6:51 AM
    Wednesday, February 24, 2016 2:56 AM
  • Hi Lake  Xiao 

    Thanks for your replay

    I Have a project with a lots of  module, class and methods that programmers wrote unit test for some of them not all of them.

    I want to know for which module, class or methods did not write a unit test , is there any solution for this ?

    Sunday, February 28, 2016 12:34 PM
  • Hi Farinaz K,

    >>I want to know for which module, class or methods did not write a unit test , is there any solution for this ?

    As far as I know, there is no clear way to know which class or method has not written a unit test or has written a unit test.

    But you can get which code has been covered by the unit test you wrote via running your test with analyzing code coverage.(Test->Analyze code coverage->All tests)

    For the detailed information about Code Coverage. Please refer to the following document about "Using Code Coverage to Determine How Much Code is being Tested"

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

    Best Regards,

    Lake Xiao


    • Edited by lake Xiao Monday, February 29, 2016 1:25 AM
    • Marked as answer by Farinaz K Monday, February 29, 2016 7:42 AM
    Monday, February 29, 2016 1:24 AM
  • Hi Lake xiao

    Thanks for your Answer :)

    Monday, February 29, 2016 5:01 AM