Thursday 19 June 2014

Unit Testing


Unit testing involves checking of the different components of a software application. In this, each part of software system is validated to ensure its operation. For example, consider a simple HTML login form; In this form you have a login id and password fields. To validate it you may check following conditions:

Unit test

Leave both fields blank and click on submit button.
Leave user id blank and fill password. Click on submit button.
Fill user id and leave password blank. Click on submit button.
Enter Wrong information in both fields and submit form.
Enter correct user id but wrong password and submit form.
Enter correct password but wrong user id and submit form.
Enter user id and password correct and submit form.

Above are some conditions to validate a login form. Write your expected result for all conditions and then test. Finally after getting actual results You mark tests Pass or Fail.

No comments:

Test Case