Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
I want to do automated unit testing through code without writing test methods. I want to show the results on page that shows how many tests paassed and failed. If by using any tool or any other ways is it possible?
Posted 6-Jan-13 20:28pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
Sergey Alexandrovich Kryukov at 7-Jan-13 2:45am
   
Right, my 5. And I also pointed out the most widely used one, please see my answer.
—SA
__TR__ at 7-Jan-13 2:45am
   
+5
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Please see this list: http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#.NET_programming_languages[^].
 
Most widely used tool is NUnit, of course, open-source:
http://en.wikipedia.org/wiki/NUnit[^],
http://www.nunit.org/[^].
 
—SA
  Permalink  
Comments
__TR__ at 7-Jan-13 2:46am
   
+5
Sergey Alexandrovich Kryukov at 7-Jan-13 2:48am
   
Thank you,
—SA
bhagya@03 at 7-Jan-13 3:59am
   
I want to do it from code. I have used NUnit for that. But using NUnit requires to write test methods which i dont want. I want something like this: I have list of Files displayed in Grid and if i select any file then automatic unit testing will be done and result will be shown on page giving details of unit test of that file.
Sergey Alexandrovich Kryukov at 7-Jan-13 9:38am
   
You should understand a simple thing: there is not such thing as miracle. If there is no test methods, then yes, you can automatically test the methods already written in your code. Of course, you can generate a number of calls, using Reflection.
 
But, in general case, it won't be a valid test, in principle. It will be a mess of false negatives and false positives, no matter how good is you testing application is. Do I even need to explain why?
 
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

You can take the next step also: automate the call to your Unit Tests, integrate that with automated builds. It's called Continuous Integration, and a list of tools is available at http://en.wikipedia.org/wiki/Continuous_integration[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.140926.1 | Last Updated 7 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100