How to write Test Case? Flashcards
What is Test Case?
Test Case is a set of such well-designed and easy understandable steps (actions) executed to verify a particular feature or functionality of your software application. Keep in mind “well-designed” and “easy to understand”.
The process of developing Test Cases can also help find problems in the requirements or design of an application.
Test Case Components:
Test Case ID
Test Case Title
Test Case Description
Preconditions
Steps
Test Case ID
This is the unique number of a Test Case in the test management system or in the document. As a rule, all modern test management systems like Jira, TestRail, and Zephyr automatically assign an ID to a newly created Test Case. So, there is no possibility of making a mistake with this component. But, it should be noted that on some projects Excel is still used for testing. That is why you should always remember the rule: “There are no Test Cases with the same ID in your test management system. Even Test Case from finished projects”.
Test Case Title
The key features of a strong title are easy to understand and laconic. Besides that, the Test Cases title must represent the module name or functional area you are going to verify.
Let’s imagine that we have a task to check, what will happen if we input invalid symbols like $,&, * in the “e-mail” field of the login form of the Koel app. According to the above-mentioned principles, the Test Case title should look something like:
Koel | Login form | Invalid Input into the Email Field
Test Case Description
Before starting to test, you should mention all the details about what you are going to test: test data to be used, preconditions (pre-steps) and steps.
If you give the test data to be used wherever applicable for the Test Case within the Test Case description or with the specific Test Case step, you will help not only yourself but your fellow testers too. It is a serious mistake to write Test Cases only for yourself.
Preconditions
- (pre steps) describe different kinds of test execution dependencies:
- Any special set up is needed to be done
- Dependencies on any other Test Cases – does the test case need to be run before/after some other test case
- User data dependency – which page should the user start the journey; the user should be logged in.
Steps
are the way to the expected result. It is important that steps in an effective test case are well-designed and easily understandable. These two points are the basis for understanding how to plan steps for your test cases.
The main attributes of well-designed steps:
Optimal quantity of steps. No need to write additional steps as well as “to eat” step. The things that may look obvious to you may not be so clear for your colleagues.
2. One test case covers only one independent functionality. It is a mistake to verify different functionalities in one test case.
3. Steps are easy executable.
4. Steps should not only cover the functional flow but also each verification point that must be tested.
The main attributes of easy and understandable steps:
Steps are to-the-point. You shouldn’t write an essay to describe your steps.
2. Clear expression. You should avoid using ambiguity in your Test Case steps.
3. Understandable even for beginners. Your colleagues, who probably are not that experienced, should be able to understand how to execute each step.
Test Case vs Defect
Test case is positive vs Defect is always negative.
Test case is positive vs Defect is always negative.
- Test case writing is a major activity
- One of the most important parts of the software testing
- Test case bring together the whole testing process.
- They help to find new defects, which may be skipped in ad-hoc testing.
- Because they measure the quality of application.