What is a Test Case?

If you were putting together a bookshelf, and all you had were photos with no labels or further instructions, could you put the shelf together correctly? For most of us, probably not. My Ikea bookshelves and the nightmare it was to put those together WITH instructions can attest to that.

Those instructions are like a test case – they walk you through how to do something step by step. With a bookshelf it would tell you what the pieces are for, what order they are to put together in, and what it should end looking like and how it should function when it’s all assembled.

There isn’t a whole lot of training when you are hired on as a QA Engineer. At each place I’ve worked the way I learned the product I’d be testing was by following test cases. Some places had very few, others had a lot – it’s pretty easy to figure out which one took me longer to get up to par with. The reason that following test cases is how you learn is because they walk you through the application you’ll be working on step by step.

A test case is really just a set of instructions that you document, and follow. Ok, great, but why the heck are you writing one? You want to document what you’ve done – if something goes to prod and there is a bug, where is your proof of what you tested, and how you tested? Also, if you’re going to need to keep testing this feature over and over having a test case written helps you remember what you needed to test, and you update it with any new info as new features are added. Check out my posts on the types of testing for more on why. However, you generally want to document it so well that your grandma could sit down at the computer, follow the steps you wrote, and successfully test your product. And, test it well. Seemed simple for a minute, right?

Once you actually try to sit down and write something out, such as how to login to Facebook and have someone that’s never used Facebook try to follow it you realize that it actually takes quite a bit more thought that you realized, and more details.

So, why not write one? Let’s write a simple test case that tests the basic login functionality on the first Facebook login page. We will only be testing the basic login portion, not resetting a password, logging out, creating a new account, the login page you are redirected to, or any backend calls. Simply, does the login function as it should?


Needed Info
This is where you would provide any pre-requisites, or necessary information to do this test. So, you would provide old Facebook login credentials as well as new, valid Facebook login credentials.
Step Result
1. Open a browser and navigate to www.Facebook.com Facebook home screen with a section for login credentials, or to create an account are on the right.
2. Without typing anything, hit the Login button in the top right corner You should be redirected to another login page that tells you that the email or phone number you entered doesn’t match any account
3. Go back to the previous page by using the back arrow in your browser You should be taken back to the Facebook home page with login in the top right
4. Enter an invalid email address in the email field, in the top right where it says email or phone. An example of an invalid email address would be bob@ or bob.gmail. Push login You should be redirected to another login page that tells you that the email or phone number you entered doesn’t match any account. If part of it matches an account it may prompt you to login as someone, and will say Login as (Firstname) (Lastname)
5. Go back to the previous page by using the back arrow in your browser You should be taken back to the Facebook home page with login in the top right
6. Enter a valid email address in the email field, in the top right where it says email or phone. (such as testemail@gmail.com) Push login You should be redirected to another login page that tells you that the email or phone number you entered doesn’t match any account. If part of it matches an account it may prompt you to login as someone, and will say Login as (Firstname) (Lastname)
7. Go back to the previous page by using the back arrow in your browser You should be taken back to the Facebook home page with login in the top right
8. Enter the correct email address that is associated with your Facebook account (you’ll need to provide this, but I’m definitely not sharing mine here). Push login You should be redirected to another login page that tells you that the email or phone number you entered doesn’t match any account. If part of it matches an account it may prompt you to login as someone, and will say Login as (Firstname) (Lastname)
9. Go back to the previous page by using the back arrow in your browser You should be taken back to the Facebook home page with login in the top right
10. Enter a password but no email address, in the top right where it says password. (such as iamatestpassword) Push login You should be redirected to another login page that tells you that the email or phone number you entered doesn’t match any account. If part of it matches an account it may prompt you to login as someone, and will say Login as (Firstname) (Lastname)
11. Go back to the previous page by using the back arrow in your browser You should be taken back to the Facebook home page with login in the top right
12. Enter one of your previous Facebook passwords (you will need to provide this – I am not going to share mine) and an invalid email address (such as bob. or jayme@yahoo), in the top right where it says email or phone and password. Push login You should be redirected to another login page that tells you that the email or phone number you entered doesn’t match any account. If part of it matches an account it may prompt you to login as someone, and will say Login as (Firstname) (Lastname)
13. Go back to the previous page by using the back arrow in your browser You should be taken back to the Facebook home page with login in the top right
14. Enter your correct Facebook password (you will need to provide this – I am not going to share mine) but no email address, in the top right where it says password. Push login You should be redirected to another login page that tells you that the email or phone number you entered doesn’t match any account. If part of it matches an account it may prompt you to login as someone, and will say Login as (Firstname) (Lastname)
15. Go back to the previous page by using the back arrow in your browser You should be taken back to the Facebook home page with login in the top right
16. Enter your correct Facebook password (you will need to provide this – I am not going to share mine) and an invalid email address (such as bob. or jane@yahoo), in the top right where it says email or phone and password. Push login You should be redirected to another login page that tells you that the email or phone number you entered doesn’t match any account. If part of it matches an account it may prompt you to login as someone, and will say Login as (Firstname) (Lastname)
17. Go back to the previous page by using the back arrow in your browser You should be taken back to the Facebook home page with login in the top right
18. Enter one of your previous Facebook passwords (you will need to provide this – I am not going to share mine) and your correct Facebook email address (again, you’ll need to provide this), in the top right where it says email or phone and password. Push login You should be redirected to another login page that tells you that:

You Entered An Old Password

Your password was changed about X months ago

If you don’t remember making this change, click here.

Your profile photos should show, as well as the first and last name on your Facebook account
19. Go back to the previous page by using the back arrow in your browser You should be taken back to the Facebook home page with login in the top right
20. Enter your correct Facebook password (you will need to provide this – I am not going to share mine) and your correct, current Facebook password (again, you’ll need to provide this), in the top right where it says email or phone and password. Push login You should successfully be logged into Facebook, and see your Facebook feed. You will see the option to create a post in the top center.

Leave a reply:

Your email address will not be published.

Site Footer