November 30, 2023
How to Write Test Cases With An Example Of Facebook Login Page

In order for a product to be effective, test cases must be developed. In order to minimize the amount of bugs that leak out, test cases should be designed in this manner. You must master the skill of creating test cases that cover all common to extreme circumstances, whether you are a novice or an expert. Any tester can create test cases, but optimization is a skill. As we begin, let’s focus on the tutorial’s core concepts.

What are Test Cases?

In order to test functionality using a varied set of inputs and settings, a test case is a test case. With the planned one, we compare the expected Test Case Result. If the output is what was expected and matches, the test case is considered successful; otherwise, it is regarded as unsuccessful. Manual or automated execution of test cases is available.

Tools for test management, such as Jira, HP QC, and others, are used to maintain test cases. Examining the test cases’ main elements will help.

  • Test Case ID
  • Test Case Description
  • Assumptions
  • Test Data
  • Pre-Condition
  • Test Steps
  • Expected Test Result
  • Actual Test Result
  • Status Pass/Fail
  • Comments

Types of Test Cases

According to the testing technique your project is using, there are several test cases. They include functional, API, performance, security, usability, user interface, database, and unit test cases. Functional test cases are created to evaluate each application feature in light of stakeholder-defined user requirements. Prior to developing a user interface for functionality, API Test Cases are run. With varied sets of inputs and circumstances, we test multiple APIs. To evaluate the application’s load capacity and vulnerabilities, performance and security test cases are utilized.

To decide how user-friendly our application is, usability test cases are run. Most database test cases are based on SQL or No SQL. Developers create unit test cases to efficiently test their programs.

How to Write Test Cases in an Excel Sheet With An Example Of Facebook Login Page

Create an Excel page before writing your test cases there. The ten columns in a test case — Test Case ID, Test Case Description, Assumptions, and Test Data — are not specified in any one template. Precondition, Test Procedure, Expected Result, Actual Result, Status, and Comments. Consider that you wish to create a test case to evaluate the login feature.

Step 1: Set Up Test Case Template in Excel

Create an Excel spreadsheet with columns to capture all the necessary information for each test case. The column headers could be:

  1. Test Case ID
  2. Test Case Description
  3. Test Steps
  4. Expected Result
  5. Actual Result
  6. Pass/Fail

Test Case ID:  Test Case ID will be the test case number of the story number in JIRA.

Test Case Description: Short summaries of the capabilities will be included in the description.

Assumptions: Assumptions should be mentioned in the assumptions columns if any.

Test Data: Test Data is the data with which you are performing the testing.

Pre-condition: Anything done before the test case is executed should be a pre-condition.

Test Steps: In Test Steps, you must mention steps like Login to the application, Enter Username, and password, clicking the login button, and Verifying the page redirects to the splash page.

Expected Result: Following the execution of the test case, the expected Result should show how the application behaved.  For successful Login expected Result would be a redirection to the splash page.

Actual Result: The actual Result shows the application’s actual behavior after the test case has been run.

Status: Depending on the actual Result, the status may be marked as passed or failed.

Comments: Last is the optional comments.

Step 2: Write Test Cases

Now, let’s populate the template with test cases for the Facebook login page:

 test cases for the Facebook login page:

Step 3: Execute the Test Cases

Execute the test cases, record the actual results, and update the “Actual Result” column accordingly.

Step 4: Determine Pass/Fail and Add Comments

Based on the comparison between the “Expected Result” and “Actual Result,” determine if the test case passed or failed, and mark it in the “Pass/Fail” column. Additionally, add comments if necessary to explain the results or provide additional information.

The above template allows you to document each test case’s steps, expected results, actual results, and pass/fail status, enabling clear tracking and reporting of the testing process.

How to write effective Test Cases:

We now have a better understanding of test case writing and optimization. This mystery has still not been resolved. To write test cases that are effective, let’s now become specific.
  • Never write test cases on ideas; always keep to the user requirements. Never stray from the course while writing test cases; always follow the SRS document or, if you have any questions, get them answered.
  • Maintaining up-to-date knowledge of the newest functionality is essential as we adhere to agile. So that you can update the SRS with agile dynamism, and communicate as much as you can with stakeholders and technical people.
  • The test case description should always be brief so that it is simple to group test cases according to functionality just by reading the description.
  • Always create test cases while assuming the role of a customer. Put yourself in the customer’s position to ensure that you account for all test scenarios that a customer might run.
  • Rather than developing broad, in-depth test steps, your test steps should be concise. Clear and clarity are required. To make the test case simple to comprehend and carry out for anyone, divide any large procedures into smaller ones.
  • You need to be given responsibility for test cases if you wrote them. In order to maintain test cases, test case ownership is crucial.
  • Your test cases, test strategy, test cycles, and reports should be organized using a test management platform. You may manage your test cases more effectively and it will serve as a communication tool for the entire team.
  • It is essential to have your team examine the test cases so that no duplicates are created and so that any unnecessary test cases may be eliminated.
  • When looking for bugs, exploratory testing is important. Because of this, it’s important to approach test case execution with the perspective of a reviewer in order to catch any major bugs.
  • Avoid overly complex test case objectives. A single test case will always follow a single objective; this is a rule that should never be broken.
  • Setting test case priority is important when there is a time limitation. You should make sure that your test cases have priority so that you don’t forget about them while you’re running out of time.
  • Learning automation and beginning with manual test cases is essential because it will cut down on manual work and aid in identifying more errors. you must be considering the best way to write Java test cases. To create your functional test cases, you can use any automation tool like Cypress or Selenium with Java. Extensive, TestNG, Allure, and other reporting tools can be connected with this to provide stunning results.
  • Always have cross-browser test cases so that no bugs are leaked to production.
  • One more thing you must be confused at the fact: Who writes UAT test cases? User acceptance testing is done by stakeholders in pre-prod and production. Hence, we leave this part for business analysts and stakeholders to have crucial test places in place by following the above steps.


You must now understand how to create efficient test cases. To continue designing test cases, start saving our sample test case document. Being an expert at writing test cases takes time, but if you use the suggestions above, you will become one in no time. Get a free estimate from us if you still have questions, and we’ll help you design your test cases more effectively and cheaply.

Visit Website

Youtube Channel

Contact US





Leave a Reply

Your email address will not be published. Required fields are marked *