p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional Application Lifecycle Management with Visual Studio 2010 (http://p2p.wrox.com/forumdisplay.php?f=568)
-   -   Chapter 7 Unit Testing with the Unit Test Framework - examples (http://p2p.wrox.com/showthread.php?t=84713)

blaurence46 August 13th, 2011 09:26 AM

Chapter 7 Unit Testing with the Unit Test Framework - examples
I think chapter 7 is good but can anyone point me to some C# code/application which uses the unit test framework so I can see a working example of how some of it's features are really used.

dkallen September 24th, 2011 10:07 AM

Some suggestions for learning automated testing
I wish you the best in learning automated testing. It is one of our most powerful tools to prevent regression and uncover missing and misunderstood requirements. If you have these concerns, then it is worth learning about this topic.

What programming language is your favorite? I suggest you search on Google for the words (TDD using XXX) where XXX is your favorite language. This will give you lots of examples of excellent testing practices.

Have you performed the exercise in Chapter 7 for yourself? If not, I encourage you to create the Functions class and the FunctionsTest, and gain some practice. Coding and running the tests will be much more useful than merely reading about it.

If you want another tutorial to gain additional reinforcement, see this article http://msdn.microsoft.com/en-us/gg454254.

Automated testing is a widely used practice. I believe that if you practice these two tutorials, you will be able to see how you might apply this to testing your own work. As the book's introduction states, this book is not aimed at beginners. So those unfamiliar with basic automated testing practices will need to look elsewhere to learn more. That is why I gave you the link above. It provides some additional references.

If you simply want to see how other people write real tests, you can find some open source projects and if they are any good, they are likely to have automated tests. For example, I Googled open source c# and came up with a Content Management System called cayuhoga. I browsed their source tree and found examples of their test at https://github.com/cuyahogaproject/c...ts/Core/Domain. I am willing to bet that most open source projects have some automated tests. If you download and build any of them, you can explore them on your own.

It sounds as if you do not have a fellow programmer who knows about this. The fastest way to learn it is to work with another programmer who has done testing before and can demonstrate how it is done. But we can teach ourselves as well. That is how I learned it years ago.

All times are GMT -4. The time now is 07:58 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.