Let’s test

Most of the time, testing is to validate that a program works correctly. This means it fulfills the requirements without errors. Essential part of SDLC. testing looks to achieve quality, stability, and guarantee proper responses.

One of the biggest aspects of testing is discovering bugs in the code. It’s also the kind I’m most familiar with. Errors are unavoidable, especially in large projects. No matter how good the programmers are, it is wrong to trust the code they write blindly. Good software needs to work and testing ensures it always does.

Kinds of testing:

  • Unit Testing: Is done with code and consists con testing individual modules of the program.
  • Black Box: Test functionality without knowing the program’s internals.
  • White Box: Testing with knowledge of the internals. Try all branches, cases, etc.
  • Many more on Code Project.

While I unit testing is the only one I have done knowingly, I found that I almost always use black or white box testing concepts when testing my code. The one I use the most is probably white box testing as I tend to test for specific branches in my code, making sure each case works well one by one.

There are still sometimes I try to do some sort of white box testing. I guess I now realize that I should be using this tool a lot more. It has happened to me that after testing various cases individually something that used to work may break. These problems tend to be very easy to miss, especially as a programmer as you tend to make many assumptions about how a piece of code works, so testing with some real-world use cases is very useful.