Last week, I was asked to teach someone how to write test cases.
I was up for the challenge. Well, I’ll be honest with you – it wasn’t exactly a challenge. The guy I taught was a fast learner and had great written communication skills.
And I must say, this experience taught me a lot how about how to get your point across and how people learn. I’ve always been a big believer in learning by doing. That’s why I was a avid fan of doing past exams to prepare for the finals at uni. And that’s why I prefer having access to a Test Environment as opposed to just having to survive with Design Specs. It’s amazing how much you can learn by playing around with something – then seeing what happens.
Now to start it all off, I simply said: If I’m dumbing it down too much for you, or it’s going all over your head – just tell me. I’m kind of wary of ‘talking down’ to people but also assuming someone has that knowledge when they don’t. I then launched into what the purpose of a test case is as well as a bit of other information.
- You write a test case with a end goal in mind (what exactly do you want to achieve?)
- You write a test case based on who you believe/might be executing the test case (This can determine the level of detail you will include)
- People have different writing styles when it comes to test cases e.g. some like to include lots of examples in steps, others don’t
- Not everyone is the biggest fan of test cases
I followed this up with an example that I was pretty sure he could relate to:
Let’s face it, we all use it. We’ve all succumbed to the peer pressure because of the Network Externality (booyah I squeezed in an Economics reference in here!). So I figured this was an example that he could relate to.
Test Case Summary:
Ensure you can search for friends on Facebook
You have internet access
You have already registered an account with Facebook
You have friends on Facebook (they don’t have to be real friends, Facebook-only friends will suffice for this example)
Enter the Facebook URL (www.facebook.com) into the browser. Press Enter
Expected Result 1
You arrive on the Facebook homepage/ login page
Enter your login details in the Email or Phone and Password fields. Press Enter
Expected Result 2
Input is accepted. Password appears as asterisks. You arrive on your profile’s home feed.
Start typing in a friend’s name into the search bar on the top left of the screen.
Expected Result 3
Your friends’ names which start with the letters that you have typed, appear just below the search bar.
e.g. You type in “Geo”; search results come up with “George Matthews” and “Mary Georgia”
And so on and so forth.
After that he decided to go for it and start writing up some test cases.
At first I sat with him as he wrote the first test case and gave some feedback on a step or guidance on what to write next when he got suck.
For the next test case I just watched him write it, then gave my feedback at the end.
After that, I just checked every few test cases to see how he was going.
From this, I learned 2 key things on how I like to get my point across and how I like to learn (presuming that I treat others how I like to be treated):
1. Examples are awesome.
They help drive the point home and are a great way of making sure you understand the concept. Brownie points for relatable examples.
2. Learning by doing
Other than the fact, I believe it’s an effective way to see (as soon as possible) whether or not you’ve actually understood the concept etc – I must admit I’m a somewhat impatient person. I’m usually raring to go pretty soon.
So tell me, how have you taught someone to write test cases in the past?
When you explain to them what the purpose of a test case is, what do you say?