| | |||||||
| Technology & Technical Skills Computer skills, hardware, software, internet topics, gadgets, programming |
| | Thread Tools | Display Modes |
| | #2 (permalink) |
| Family Member Join Date: Jan 2007 Location: The Netherlands
Posts: 1,823
| www.csunit.org (first result in Google, if you type in C# unit testing) Note that unit testing is not the Holy Grail of software development and doesn't make you more agile per se. |
| | |
| | #5 (permalink) |
| Senior Member Join Date: Sep 2007
Posts: 962
|
NUnit is good. Unit testing is not be the holy grail, nothing is. But it's a damn good tool that lets you be 100% sure of what parts of your code is working and exactly when it breaks. Simply put, Unit testing is good for heart, soul and a good nights sleep. |
| | |
| | #6 (permalink) |
| Love in Action (Mod) Join Date: May 2008 Location: Ohio
Posts: 2,527
|
Oh, Visual Studio 2008 has unit testing? And I was thinking I wasn't going to need to upgrade. Oh yes, I remember nUnit. I used it a while back I think. I already know that unit testing is useful. I used it a while back in C# but couldn't remember what I used, and I used it in PHP quite a bit. |
| | |
| | #7 (permalink) |
| Family Member Join Date: Jan 2007 Location: The Netherlands
Posts: 1,823
|
Unit testing is a tool for agile development, not the tool. The problem with unit testing is that when all your tests succeed, you still don't really know if the program as whole functions as it should. Also, you can't really unit test a complex user interface or anything that has emergent behavior (such as the games I work on). I prefer a "design by a contract" approach, where you define and check the pre- and post-conditions of any interface method, as well as the invariants. |
| | |
| | #8 (permalink) |
| Love in Action (Mod) Join Date: May 2008 Location: Ohio
Posts: 2,527
|
Jim, If the individual parts work, then the entire thing should work together, if you have really come up with enough tests. This is why you use functional testing for the entire program (including the user interface). Have you ever used Selenium? I've had limited experience with it but it looks very useful for exactly that. |
| | |
| | #9 (permalink) | ||
| Family Member Join Date: Jan 2007 Location: The Netherlands
Posts: 1,823
| Quote:
1. It may not be possible or practical to come up with enough tests. 2. Unit tests only work within the scope of a wholly controlled environment, which excludes all major OS-es. Quote:
| ||
| | |
| | #10 (permalink) |
| Love in Action (Mod) Join Date: May 2008 Location: Ohio
Posts: 2,527
|
Jim, If you use TDD (test-driven development), you write your tests before your code, and are really only supposed to write the code to fulfill exactly those tests. If there is something new it needs to do, you first write a test, then write code until it passes. Well that's how it goes in XP, anyway. Not sure what you mean about the OS. Hopefully the development environment should be fairly similar to the production environment. |
| | |
| | #11 (permalink) |
| Family Member Join Date: Jan 2007 Location: The Netherlands
Posts: 1,823
|
I'm familiar with TDD and XP. Again, there are limits to what you can write tests for. I work in real-time graphics... you can't write units tests for a lot of the things I do on a daily basis. You can't write a test that tells you if the shadows look good. By OS I meant the Operating System. You know, Windows and all You can never have a system complex as your garden variety multi-tasking, multi-processor OS in the exact same state twice; that only works in theory. This makes it hard to fully unit test complex applications that are designed to run in such an environment. |
| | |
| | #12 (permalink) |
| Love in Action (Mod) Join Date: May 2008 Location: Ohio
Posts: 2,527
|
True. But I guess it depends on what the program does. I certainly wouldn't use it for graphics. I mostly make web sites, so my experience with it is limited to that domain, which it works quite well for. |
| | |
| | #13 (permalink) |
| Senior Member Join Date: Sep 2007
Posts: 962
|
I heard behaviour driven development is a better way to think of unit testing. Beyond Test Driven Development: Behaviour Driven Development |
| | |
| | #14 (permalink) |
| Love in Action (Mod) Join Date: May 2008 Location: Ohio
Posts: 2,527
|
Weird, I've never heard of that. I'm not sure if I agree yet, but it sounds interesting. I just looked it up on wikipedia real quick. I'll listen to the video later. The outside in sounds like a top-down approach, which I tend to agree with. Anyway, thanks for the link. |
| | |
| Bookmarks |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Women testing men ... | Jamie | Social & Relationships | 104 | 06-24-2008 08:59 PM |
| LoA Testing with a Control Group | Zukin | Intention-Manifestation | 9 | 10-23-2007 12:54 PM |
| Koestler Parapsychology Unit | Markus74 | Psychic & Paranormal | 2 | 12-25-2006 09:10 PM |
| Testing IM via PayPal | Radical | Intention-Manifestation | 12 | 12-04-2006 11:00 PM |
| The Most Profitable Adsense Ad Unit | Henry | Business & Financial | 13 | 11-13-2006 11:26 PM |
All times are GMT. The time now is 12:13 PM.




