Default

How to Write Test cases for Pencil?

How to Write Test Cases for Pencil?

In this tutorial, we will discuss how to write test cases for a pencil. This guide will teach you how to write effective and efficient test cases in QA/Testing interviews or for testing a product.

Interviewer Standpoint

Why would an interviewer ask such a question for a job description that needs a Test Engineer to test a web application?

The interviewer wants to test the basic testing skills, knowledge, and intuitiveness of your testing capabilities. If you are an experienced candidate, the interviewer wants to check on how you test something new that’s not related to the domain.

Specifications, Intended purpose, User Stories?

First things first, identify and cross-check the system under test without any ambiguity. Do not make any assumptions. Take time and ask questions to clarify things. Gather functional requirements and functional specifications of the system.

Here in this case Pencil. Gather requirements of the pencil like weight, color, size, and dimensions etc. ( This is a traditional SDLC approach ).

Test cases for Pencil

Sample Requirement:

Let’s take an example of  2 HB Pencil that is made of solid graphite lead with a wooden covering. ( HB stands for Hard and Black ). 2 denotes the level of blackness.

The system shall write on white paper with the specified level of darkness.

  • Pencil Weight = 10 g ( on Earth Gravity = 9.81 m/s^2)
  • Pencil length = 15 cm

Actors and User Stories

Test case categories

Organize and divide the test cases that you write into different categories like:

Functional Test cases

  • Black box( without knowing the inner details )
  • White box ( what’s inside the box ? )
  • Integration (coexistence with other systems)
  • Usability ( How usable is the system?)

Non Functional Test cases

  • Stress ( How does the system behave under stress ?)
  • Performance( How does the system perform under abnormal conditions )
  • Security( How secure is the system? )

Write Test Cases

Functional Test Cases

Verify all the functional specifications of the Pencil. The main use case of the pencil is the ability to write on white paper for Students. Similarly, the main use case for the Carpenter is the ability to mark readings on wooden pieces.

  • Verify that the weight of the pencil is as per the specification or not.
  • Verify that the height of the pencil is as per the specification or not.
  • Verify the ability to write on white paper with the desired level of darkness RGB value.( Red Green Blue value)

 

Test Case ID Test Case Description Expected Result
TC_PENCIL_001 Verify that the pencil can write on paper Pencil writes clearly and smoothly on paper
TC_PENCIL_002 Verify that the pencil can be sharpened without breaking Lead does not break and pencil sharpens properly
TC_PENCIL_003 Verify that the eraser attached to the pencil can erase the pencil marks Pencil marks are erased cleanly without damaging the paper

OMR Sheet Test Case

Student answers are marked with pencil on OMR sheets during examination.

Test Case Name Test Case Steps Test Data Expected Result Actual Result
Verify OMR Sheet bubble recognition. Preconditions

Given 2HD pencil.

OMR sheet with questions.

Know least one correct answer.

Scanner.

Steps

  • Take 2HB Pencil.
  • Bubble the questions.
  • Make sure to mark at least one correct answer.
  • Scan the OMR sheet.
  • Examine the score.
 

 

 

Verify that the score is at least >= 1.

Automation Test Case

Pencil OMR Sheet bubble Test Case

 

Automation Test Case
Detailed Steps Test Data Expected Result Actual Result
Simulate and
Verify the 2HB Pencil drawing.
Test Steps

  • Robot arm to pick the Given 2HB Pencil.
  • Paper tray to slide a A4 size white paper.
  • Robot arm draws a shape For example: Circle and fills the circle with the Pencil.
  • Robot Scans the paper and prints it.
  • An automation program reads the RGB( Red – Green – Blue ) values of the circle
    object.
Given

  • A4 size paper.
  • Pencil 2HB
  • Robot Arm capable to grip the pencil.
  • Able to draw an object like circle.
  • Printer and
    Scanner.
Expected Result:

Verifies the print paper result with a predefined Pencil 2HB RGB values with the image RGB values.

Usability Test cases

How usable the system for different users:

Test Case Name Test Case Steps Test Data Expected Result Actual Result
Verify Usability of Pencil among Students. Preconditions

Invite different class of students.

Provide the pencil and other materials.

Prepare a usability questionnaire.

Ease of Writing, Grip, Customer satisfaction etc.

Steps

  • Conduct a standard happy path testing.
  • Take feedback on the user experiences with the product.
  • Scale of 1 to 10.
 

 

 

Derive the Stats based on the recordings.

Mean Customer satisfaction, Ease of writing etc.

Stress Test Cases

Verify the limitations of the system. As a tester we should test the limitations of the system. For example, if you test an application server, we need to know how many requests the server can serve concurrently and what percentile of requests get responses below the SLA.

Think about how you can stress a pencil on unconventional use cases. For example, take the pencil into a cold storage with cold temperature and verify the pencil functionality. Expose the pencil to hot summer temperatures and check if the lead melts, able to write, etc.

Performance Test Case

Verify how much text you can write with the given Pencil. This is like knowing the limits of the system i.e. pencil.

Interoperability Cases

Test the interoperability of the pencil with several other items. For example with a sharpener, eraser, etc.

Verify that the text written with the Pencil is erasable with a standard eraser.

 

That’s it. There are more test cases. The test cases in this tutorial are limited. Try to think of more test cases for the system under test.