Overview
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 Stand point
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 ).
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 gravity = 9.81 m/s^2)
- Pencil length = 15 cm
Actors and User Stories
https://www.testingdocs.com/questions/sample-pencil-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 ( co existence 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 Student. Similarly, the main use case for the Carpenter is the ability to mark readings on wooden piece.
- 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 darkness RGB value.( Red Green Blue value)
OMR Sheet Test Case
Test Case Name | Test Case Steps | Test Data | Expected Result | Actual Result |
Verify OMR Sheet bubble recognition. | Preconditions
Given 2HD pencil. OMR sheet with 10 questions. Know least one correct answer. Scanner. Steps
|
|
Verify that the score is at least >= 1. |
Automation Test Case
Automation Test Case |
Detailed Steps | Test Data | Expected Result | Actual Result |
Simulate and Verify the 2HB Pencil drawing. |
Test Steps
|
Given
|
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. say 10 students. Provide the pencil and other materials. Prepare a usability questionnaire. Ease of Writing, Grip, Customer satisfaction etc. Steps
|
|
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. 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 we can write with the given Pencil. This is like knowing the limits of the 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 more test cases for the system under test.
Related:
https://www.testingdocs.com/atm-test-cases-automated-teller-machine/