Click here to Skip to main content
12,634,651 members (26,794 online)
Rate this:
 
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 21:28pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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

Solution 2

  Permalink  
Comments
__TR__ 7-Jan-13 2:46am
   
+5
   
Thank you,
—SA
bhagya@03 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.
   
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 7 Jan 2013
Copyright © CodeProject, 1999-2016
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