28 | | Let us assume you have to implement a simple login form. The user story is as follows: It asks for the email and password. If the login is successful, it shows the message 'Logged In', if unsuccessful it shows an error. We will write the testcase to check if successful login works. |
29 | | |
| 28 | Let us assume you have to implement a simple login form. There are a few possible cases: |
| 29 | 1. Login is successful |
| 30 | 2. Login is unsuccessful. Because - |
| 31 | * Invalid email |
| 32 | * Invalid password |
| 33 | * Both are invalid |
| 34 | * Data entered fails validation check (for eg: empty fields etc) |
| 35 | |
| 36 | Let us write the testcase for the first case i.e. Login is successful. What is expected when the login will be successful: |
| 37 | * Browser is opened to the login page |
| 38 | * Valid email and valid password is entered |
| 39 | * Submit button is clicked |
| 40 | * A message ''' Logged in ''' shows up confirming the user is logged in. |
| 41 | |
| 42 | Let us translate this user story into the testcase. (and marvel at the beauty of Robot Framework as it is so very easy. :D) |