Tuesday, August 18, 2009

TEST CASES-WHAT IS IT?

Test cases-these are the back bones of testing. A tester can write n number of test cases. Test cases should be effective. Test cases should be written based on the requirements provided.


STUDENT: What is a Test Case?


TEACHER: A Test Case is a document containing test case ID, steps, execution pre-conditions, expected output, execution post-conditions, actual output, status, comments.































The above diagram shows the format of a test case.


STUDENT: Can you explain me with an example?


TEACHER: Okay, let's write the test case for a login page.


1) Login using valid user name and valid password.


2) Login using invalid username and valid password.


3) Login using valid username and invalid password.


4) Login using blank username and blank password.


5) Login using invalid user name and invalid password.


6) Enter only password and try logging in.


7) Enter only username and try logging in.


8) Verify whether there should be any minimum characters for username or password.


9) Verify whether forgot your password link is present in the login page.


10) Try SQL injection.


These are the steps. So there are 10 steps. The expected output can be determined by reading the steps. We need to get the actual output.


For step 1: Login using valid username and password. The expected output will be login successful. Enter the username and password. Suppose the login is working. So the actual output will be Login successful. The status will be PASS.

No comments:

Post a Comment