EDUCBA

EDUCBA

MENUMENU
  • Explore
    • Lifetime Membership
    • All in One Bundles
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign up
Home Software Development Software Development Tutorials Software Testing Tutorial Test Case

Test Case

Priya Pedamkar
Article byPriya Pedamkar

Updated July 10, 2023

What is Test Case?

Introduction to Test Case

A test case is a document that contains a various set of data, conditions to be performed and the expected result for the particular condition, developed by the software testers to perform the execution of the particular part of the software to verify the working of the software against requirements. To perform the test, this case use parameters like test scenario, test ID, prerequisites, description, test data, test step, test results, test parameters, actual results, various environment, environment information.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

Template

It usually has the following fields. However, the format of the fields may differ from company to company, depending on the test management tool used by them.

ID The ID is given to the test case.
Description The description of the test case.
Related Requirement The ID is given to the requirement that this test case maps to.
Prerequisites Any preconditions or requirements that are to be satisfied before running the test.
Test Steps Step-by-step instructions were given to run the test.
Test Data Data that is used while conducting the test.
Expected Result The result that is expected from the test, logged before running the test.
Actual Result The actual result obtained after running the test
Status The status obtained after running the test. It can be Pass, Fail, Not Executed, Blocked.
Comments Any remarks to be given for the test.
Environment Information Includes Network/Hardware/Software information in which the test is run.

How to Write a Test Case?

Below are the steps:

Step 1: Assign a Number and a Description.

Step 2: In order to run it, we need Test Data. Without the test data, we would not have the proper information to test, making the task laborious.

Step 3: To run it, we need to have a certain set of instructions to carry out the test. These steps are called Test Steps. The need for this arises, when the author resigns from the project or is on a break. Then someone else from the project will need to take up the testing. Written steps will help them.

Step 4: The aim of them is to examine the behavior of the application. To perform this, we will need to have an Expected Result. After its execution, expected results will be compared with the Actual Result from the test, and accordingly, a Status will be assigned to it.

Step 5: We can also have an Additional field like the Prerequisite field, which tells us the conditions to be met before the test run, a Post-Conditions field, which tells us the conditions to be met after the test run, etc.

Example:

ID Description Test Steps Test Data Expected Result Actual Result Status
TC01 Check Employee Login with valid Data

1. Go to the login page.

2.Enter Userid

3.Enter password

4. Click on the Login button

Userid= admin

Password= abc12345

User should be able to log in As Expected Pass
TC02 Check Employee Login with invalid Data 1. Go to the login page.

2.Enter Userid

3.Enter password

4. Click on the Login button

Userid= admin

Password= 12345abc

User should not be able to log in As Expected Pass

Importance of Test Case

They have a huge impression on the testing phase. Writing them is as significant as the testing process itself. It helps us think through the specifics and ensures that we are tackling them from as many outlooks as possible.

The importance of having it is that anyone can retest the test using them. They are potent artifacts that are useful to future teammates, in addition to providing documentation on how an application performs. To sum up, They provide the following significance:

  • They ensure good coverage of the test, making sure the main functionality is not missed during testing.
  • It allows them to think of different ways of confirming the features of the application, thoroughly.
  • Negatives are also written, making the testing a thorough process, with little being overlooked.
  • They are reusable, as anyone can refer them and run the test.

Useful Tips and Tricks

When writing them, keep in mind the following information:

  • It should be simple and concise, with not more than 15 steps.
  • Each of them is to be made reusable.
  • Avoid repetition.
  • Additional test setup information is to be provided like software, hardware, operating system, version of the application under test, prerequisites for the test, etc.
  • It should be written in a way that we test only one thing at a time, with no overlaps.
  • Ensure that all scenarios, positive and negative, are covered, giving us 100% coverage.
  • They should be created with the end-user in mind.

Conclusion

To conclude, They can enhance our efforts in overall testing and can improve our software quality to great ends, while saving us time and effort due to the reusability of test cases.

Recommended Articles

This is a guide to What is Test Case. Here we have discussed the Template, Importance, and Useful Tips and tricks. You may also look at the following articles to learn more –

  1. What is Software Development?
  2. Software Engineering Interview Questions
  3. Career as a Software Developers
  4. Types of Test Case
ADVERTISEMENT
All in One Excel VBA Bundle
500+ Hours of HD Videos
15 Learning Paths
120+ Courses
Verifiable Certificate of Completion
Lifetime Access
ADVERTISEMENT
Financial Analyst Masters Training Program
2000+ Hours of HD Videos
43 Learning Paths
550+ Courses
Verifiable Certificate of Completion
Lifetime Access
ADVERTISEMENT
All in One Data Science Bundle
2000+ Hour of HD Videos
80 Learning Paths
400+ Courses
Verifiable Certificate of Completion
Lifetime Access
ADVERTISEMENT
All in One Software Development Bundle
5000+ Hours of HD Videos
149 Learning Paths
1050+ Courses
Verifiable Certificate of Completion
Lifetime Access
Primary Sidebar
Footer
Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
  • Blog as Guest
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

🚀 Cyber Monday Reloaded Price Drop! All in One Universal Bundle (3700+ Courses) @ 🎁 90% OFF - Ends in ENROLL NOW