-->

Wednesday, November 13, 2013

Introduction to Unit Testing with JUnit

Often overlooked, testing is an important phase of any software package.  Without it, one can find himself with code that compiles, thinking that it works, only to discover a major gaff in the program later on.

It is imperative that certain best practices are followed when it comes time to test one's program. What follows are among such tips to keep in mind.

  1. Test one thing at a time.
  2. Have your tests ready before you start coding.
  3. Keep your test suite seperate from your main code.
In today's world of software development, tests can be easily automated using functions such as JUnit. These interfaces can save you loads of time in the long run.

More tips on precisely how this is done will be available in future articles. For now, allow me to feature the tutorial of one such "Simplyianm" of youtube, and his excellent introduction videos to the concept of Unit Testing.

Below is a decent introduction on how to get started with it:
<iframe width="560" height="315" src="https://www.youtube.com/embed/lYnMyi81hrs" frameborder="0" allowfullscreen></iframe>

~Code Crunch Out~

No comments:

Post a Comment