How to Write Test Cases for A Pencil: Your Ultimate Free List of Tests

Test Cases for Pencil [featured image]

It’s not very often that I get to use a pencil.   

However, very recently I did just that and it got me thinking.

“How would you test a pencil if you were a Software Tester”?.

When you’ve been working in the Software Quality Assurance industry for as long as I have, your mind sometimes goes into overdrive. 

Surprisingly enough, there are some of you out there that actually DO test pencils.

I wanted to have a bit of fun and at the same time add some of my experience to give you a list of test cases if I were testing a pencil.

Alternatively if you want to know how to write test cases for a pen then read that article next after this one.

Points to Note:

Before you test anything, always remember to firstly look at the situation you are testing holistically.

Think about the context of WHAT you are testing and WHY.

Try and use as much common sense as possible without relying on too many assumptions.

A small thing like a pencil can have so many different situations and contexts.

13 Staedtler Black and Yellow HB Pencils [Made in Germany]
13 Staedtler HB Pencils which I purchased. [Image Credit: Zaheer @ TestingChat.com]

Requirements and Specifications

The quality of the testing you will conduct will usually be a result of the quality of the specification documents.

If these are ambiguous or low quality then your testing will be an uphill battle.

You should always make sure that you have all of your requirements beforehand.

For example, when the pencil has come off the production line, will it already be sharpened or not?  

What lead softness/hardness is the product you’re testing.

See?

Lots of things to consider so don;t leave this to any assumptions.

Test Cases for Pencil (Positive and Negative)

Below are a list of functional and non functional test cases for a pencil that you should add to your test plan.

There is a breakdown of test steps, a description of the test case  which also includes an expected result.

The expected result will be determined by your specifications.

In your final test plan, you should also include a column called ‘Actual Result’ which will be used to capture the output during your Test execution.

You might want to read my article on how to write a test case if you need some guidance.

StepTest Case DescriptionPrerequisiteExpected Result Post Requisite
1Verify what you are holding is in fact a pencilYou are holding a Pencil.
Note:  This step may seem a bit ‘tongue in cheek’ but it’s better to confirm than to assume.
2Verify the brand of the pencilThe brand is ‘as expected’
3Verify the branding of the pencil as per the User GuidelinesThe pencil should include any brand colours.
For example Staedtler pencils will have yellow and black stripes A red top pencil.The brand name and typeface will be printed in Gold.Display the lead name. (E.g. HB)
4Verify aesthetics and specifications as per the requirements.The pencil will;Be a total length of x mm’s.Be sharpened alreadyWill be a thickness of [x] mm’s.The pencil will be a particular weight.
5Verify the feel of the pencil is as per the quality guidelines.
Note: There are potentially counterfeit products for well known brands.
If you work for a particular brand, then you will be able to check that the product is following company guidelines and is genuine.
The look and feel of the pencil is per the original brand guidelines.

Ensure pencil point is as per the specification.  For example, does the pencil tip need to be irregular, creeping collar, headless horseman etc.  
6Shake the pencil and Verify the lead is intactThe lead of the sharpened pencil is intact and does not break.
7Verify the pencil writes without the lead breakingEnsure the paper surface is smooth and ideally replicates an everyday paper notebook.The pencil will write comfortably without the lead breaking.
8Verify the pencil writes correctly with a sharp tipThe tip is sharp
The pencil writes without breaking.
9Verify pencil writes correctly with a ‘less’ sharpened lead.The pencil should still write well but with less sharpness. 
10Verify the hardness and softness of the lead are as expectedThe expected hardness and softness of the lead is ‘as expected’.
Note:  You should ideally have a golden source to compare the lead type against.
Your experience will also come into play here.
11Verify the pencil sharpens as expectedA good quality sharpener is required.The pencil sharpens ‘as expected’ and the tip is sharp.
12Write a sentence with firm pressure and ensure that the pencil graphite lead remains intact.The user should be able to write a complete sentence.
The pencil lead does not break.
The pencil lead is worn out slightly.
13Verify the graphite lead does not break entirely when a great deal of pressure is applied.
Note:  In this negative test case, we are trying to put the pencil under stress by applying a lot more pressure than you normally would.
The tip of the lead will wear away but the rest of the pencil will remain intact and not break.
 
14Verify the amount of text written before the next sharpening cycle.Have a baseline text that you will write.
Ensure the same style and pressure is applied to keep the test like for like.
The amount of text written for each identical pencil should be like for like.
15Verify pencil is capable 
16Verify pencil can write once subjected to water.The pencil should behave ‘as expected’ according to the specifications.
Note:  In most cases, the pencil should work, however, the quality of the lead may have an impact on the final output and quality of what is written on paper.

There is a really fantastic resource at the huffington post that breaks down the anatomy of a pencil.

Non functional Testing for Pencil

10 Staedtler Red and Black 2B Pencils [Made in Germany]
10 Staedtler Red and Black 2B Pencils. The same brand may have different colours. [Image Credit: Zaheer @ TestingChat.com]

You should also look at the performance of the product, how well it handles stress and also security.

In terms of security, are there any harmful elements to the product?  For example, can it pose a health hazard?  What materials is the product made from?

What about when the product is exposed to water?

The pointed tip could potentially be dangerous but is it a potential weapon?

Expanding into other areas

You can use the above examples and extend this to pencils such as water colours.  

They look the same as a graphite based pencil but their use cases will differ somewhat.  

The main difference is that you’d expect them to work when water is applied to them.

Another example you might want to think about is whether or not the pencil has an eraser.  

If you do use this example then you may want to consider a positive and negative test scenario where the eraser works and doesn’t work.

From a software testing perspective, how do you generate exceptions?

Ask Questions

As always, you should ask lots of questions and NEVER assume the behaviour of how the pencil will work.

Don’t Forget to Add Your Test Case to your Regression Test Suite

The beauty of creating test cases is that you can generally re-use them over and over again.

Regardless of whether you adopt automation testing or manual tests, they’ll come in handy when it comes to regression testing.

Software Testing Pencils – A Summary

Who would’ve thought that creating test cases for a pencil was so much work yet so much fun.

A small yet functional item such as a pencil requires so much thought when writing test cases.

If you’re interested in knowing what is involved with becoming a software tester, then feel free to read the article.

Go here for more test cases.

1 Staedtler Yellow HB Pencil [Made in Germany]
1 Staedtler Yellow HB Pencil. Thankfully part of a whole packet which I purchased online. [Image Credit: Zaheer @ TestingChat.com]