Cybercrux

Everything is achievable through technology

Art of Unit testing

Main reason to follow Unit Test

“What was I doing until now?” you might ask. You’ve done integration testing. Integration testing means testing two or more dependent software modules as a group.

  1.  With unit test we can test a single module unit.

What is Unit Test?

A unit testis a piece of a code (usually a method) that invokes another piece of code and checks the correctness of some assumptions afterward. If the assumptions turn out to be wrong, the unit test has failed. A “unit” is a method or function.

A unit test should have the following properties:

❂ It should be automated and repeatable.
❂ It should be easy to implement.
❂ Once it’s written, it should remain for future use.
❂ Anyone should be able to run it.
❂ It should run at the push of a button.
❂ It should run quickly.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s