Click here to Skip to main content
15,893,904 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi ,I am Migrating one of Delphie application to C#.net windows application.


i want to do testing for all the methods ,functions and controls.
which testing should i use and Why.
Is their any tool for testing all the methods and functions of c#.

What I have tried:

i have tried Nunit but i have some method with list having many objects in that ,i was unable to do testing with list objects.for one particular object we can do but for so many objects i was unable to give assert.
Posted
Updated 2-Aug-17 19:27pm
Comments
Kornfeld Eliyahu Peter 2-Aug-17 6:49am    
Visual Studio has Unit Test Projects (different templates) - use them if you have no knowledge of any other...
https://docs.microsoft.com/en-us/visualstudio/test/getting-started-with-unit-testing
GrpSMK 2-Aug-17 10:22am    
Try unit testing in visual studio first..all the best
BillWoodruff 3-Aug-17 0:10am    
Sounds like you are "giving up" on testing without really doing research on the testing tools available for .NET.

If you ask specific questions, and give specific code examples ... we can help you.

It depends on the complexity of your solution, we have a big and complex solution with over 200 projects and our development team is small (5 developers max).
We found that it took too much time to maintain the Unit tests (with Nunit), in fact we seemed to spend more time on this than on productive coding alltogether.
We totally abandoned unit testing, but we have a tester (totally overworked) that tests the main Windows product manually.
So my advice is: unit testing is not worth the time and effort if you are a lone developer or in a small team !
 
Share this answer
 
Comments
BillWoodruff 3-Aug-17 0:15am    
Interesting, Rick; while I am not a 'strident' devotee of TDD, I feel like testing does have an integral role to play, particularly for large projects. imho, it's not the sheer number of tests (the myth of complete code coverage ?) that is critical; it's creating the critical tests that is the challenge.
RickZeeland 3-Aug-17 3:04am    
That's a good point about the critical tests, and for me that was also too big a challenge as they expected me too write unit tests for code written by others that was not documented and incomprehensible !
You may use
Lrmis.Web.UnitTests
for testing purpose, which is very useful and popular in .Net
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900