Test Case & Bug Reporting


1. Test Case

Definition

A test case is a set of conditions, steps, and expected results used to verify that a software feature works as intended. Test cases help testers systematically check functionality and ensure quality.

Key points:

  • Each test case should have a unique ID.
  • Should be clear, concise, and reproducible.
  • Can be manual or automated.

Components of a Test Case

ComponentDescription
Test Case IDUnique identifier (e.g., TC001)
Test ScenarioHigh-level description of what to test
PreconditionsConditions that must be met before execution
Test StepsStep-by-step actions to perform
Test DataInput data required for testing
Expected ResultWhat the system should do
Actual ResultWhat the system actually does (filled after testing)
StatusPass / Fail / Blocked
Remarks / NotesAny additional info

Example of a Test Case

Scenario: Test login functionality of a mobile app

Test Case IDTC001
Test ScenarioVerify user can login with valid credentials
PreconditionsApp is installed, user has valid account
Test Steps1. Open app 2. Enter username and password 3. Click Login button
Test DataUsername: testuser Password: Test@123
Expected ResultUser should successfully login and see the dashboard
Actual Result(To be filled during execution)
StatusPass / Fail
RemarksN/A

Best Practices for Test Cases

  1. Keep test cases simple and clear.
  2. Cover positive and negative scenarios.
  3. Use unique IDs for tracking.
  4. Include preconditions and test data.
  5. Make them reusable for regression testing.

2. Bug Reporting

Definition

A bug (or defect) is an error, flaw, or unexpected behavior in the software that prevents it from working as intended.

Bug reporting is the process of documenting the issue so that developers can reproduce and fix it.


Components of a Bug Report

ComponentDescription
Bug IDUnique identifier (e.g., BUG001)
Summary / TitleShort description of the bug
DescriptionDetailed explanation of the issue
Steps to ReproduceStep-by-step instructions to replicate the bug
Test DataInput data used when bug occurred
EnvironmentOS, browser, device, app version
SeverityImpact on system (Critical, Major, Minor)
PriorityUrgency to fix (High, Medium, Low)
Expected ResultWhat should happen
Actual ResultWhat actually happened
StatusOpen, In Progress, Fixed, Closed
Screenshots / AttachmentsEvidence of the bug

Example of a Bug Report

Title: Login button not responding on Android app

Bug IDBUG001
DescriptionWhen clicking the login button, nothing happens, and the user cannot login.
Steps to Reproduce1. Open app 2. Enter valid username and password 3. Click Login button
Test DataUsername: testuser Password: Test@123
EnvironmentAndroid 12, App version 2.3.1
SeverityCritical
PriorityHigh
Expected ResultUser should be logged in and redirected to dashboard
Actual ResultNothing happens; button is unresponsive
StatusOpen
Screenshots[Attach screenshot of unresponsive login button]

Best Practices for Bug Reporting

  1. Be clear and concise in description.
  2. Include steps to reproduce carefully.
  3. Specify environment details.
  4. Attach screenshots or logs for evidence.
  5. Use severity and priority to help developers prioritize fixes.
  6. Avoid ambiguous terms like “sometimes” or “it doesn’t work”.
  7. Update status as bug progresses (Open → In Progress → Fixed → Closed).

3. Difference Between Test Case and Bug

FeatureTest CaseBug Report
PurposeTo verify software works correctlyTo document defects in the software
Created ByTesterTester (or QA)
When UsedBefore executionAfter finding an issue during testing
ContentSteps, data, expected resultsIssue description, steps to reproduce, actual vs expected results
OutcomePass/FailOpen/Fixed/Closed

Summary

  • Test Case: Planned steps to check if software behaves as expected.
  • Bug Report: Documented issue when software fails.
  • Test cases ensure coverage, bug reports ensure issues get fixed.
  • Both are essential parts of software quality assurance.