Has anybody tried any Unit Test generators for .Net?
I assume although it won't be any substitute for any good unit test written by a person who has written the functionality, but I think it will take away some of work and be a starting point on which we can better the unit tests.
Thanks.
The purpose of a unit test in software engineering is to verify the behavior of a relatively small piece of software, independently from other parts. Unit tests are narrow in scope, and allow us to cover all cases, ensuring that every single part works correctly.
The purpose of producing the tool to generate test cases automatically is to reduce the cost of testing the system as well as to save the time of deriving test cases manually. The system's requirements are transformed using use case diagrams, flow of events and sequence diagrams.
Unit test generation is the wrong way to perform unit testing. The proper way to do unit testing is to create test cases before you write functional code, then develop your code until the tests validate, this is know as TDD (Test Driven Development).
One of the key reasons unit test generation is a bad idea is because if there are any bugs in your existing code, the tests will be generated against those bugs, therefore if you fix them in the future, the bad tests will fail and you'll assume something is broken, when it's actually been fixed.
But since the code is written, it's now water under the bridge. And possible buggy unit tests are better than no unit tests at all. I've always preferred NUnit and there's a NUnit compatible test generator here (very affordable).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With