views:

103

answers:

3

I have heard the term unit testing many times and I am wondering how this is related to the web development field. I program with PHP, Javascript, Actionscript 3.0 and I am starting to get into C++, C# and JAVA. If anyone has any good resources that I can take a look into as I believe this is a good method to follow for "test driven" development?

+3  A: 

Unit testing is not only related to web development. It means that you are testing the code independantly from the rest of the application. It is a general term and applies to any type of software.

I recommend to read the Software testing article on Wikipedia if you get started with software testing.

I hope it helps.

luc
Thanks for the information, it is very helpful. I want to make sure that I am doing the best work that I can and I believe this will help me out in the end. Thanks again!
alvincrespo
A: 

As James suggested above, look up the various frameworks for the languages you're interested in, and they'll usually have a 'Getting Started' bit to get you up to speed.

  • Javascript - www.jsunit.net
  • AS3 - FlexUnit
  • C# - nUnit, xUnit, MbUnit, MsUnit, etc, etc

In a nutshell, you typically use unit tests to confirm that certain methods behave as you'd expect them to, thereby giving you more assurance that the whole application will behave as you'd expect it to in a production environment. It's not foolproof, but it can make a massive difference on complex systems, regardless of the environment you're running in.

Marcus
A: 

This should be a good introduction link text. There are several Unit Testing Libraries which are Language Specific, JUnit for Java, PHPUnit for PHP, Ruby has some inbuilt classes for testing, as well as libraries like RSpec among others, You can also use resources like link text, which sometimes have good tutorials/ articles on testing. Yeah google will be your best friend for specific testing Libraries and their documentation.

As far as working on TDD goes, try to pick a small project, implement test cases for the code you write, and you will get better at it, as I mentioned there are pretty good introductory tutorials out there.

Shiv