Saturday, 13 September 2014

Test Case

DEFINITION
A test case is a set of conditions or variables under which a tester will determine whether a system under test satisfies requirements or works correctly.
The process of developing test cases can also help find problems in the requirements or design of an application.
TEST CASE TEMPLATE
A test case can have the following elements. Note, however, that normally a test management tool is used by companies and the format is determined by the tool used.
Test Suite IDThe ID of the test suite to which this test case belongs.
Test Case IDThe ID of the test case.
Test Case SummaryThe summary / objective of the test case.
Related RequirementThe ID of the requirement this test case relates/traces to.
PrerequisitesAny prerequisites or preconditions that must be fulfilled prior to executing the test.
Test ProcedureStep-by-step procedure to execute the test.
Test DataThe test data, or links to the test data, that are to be used while conducting the test.
Expected ResultThe expected result of the test.
Actual ResultThe actual result of the test; to be filled after executing the test.
StatusPass or Fail. Other statuses can be ‘Not Executed’ if testing is not performed and ‘Blocked’ if testing is blocked.
RemarksAny comments on the test case or test execution.
Created ByThe name of the author of the test case.
Date of CreationThe date of creation of the test case.
Executed ByThe name of the person who executed the test.
Date of ExecutionThe date of execution of the test.
Test EnvironmentThe environment (Hardware/Software/Network) in which the test was executed.
TEST CASE EXAMPLE / TEST CASE SAMPLE
Test Suite IDTS001
Test Case IDTC001
Test Case SummaryTo verify that clicking the Generate Coin button generates coins.
Related RequirementRS001
Prerequisites
  1. User is authorized.
  2. Coin balance is available.
Test Procedure
  1. Select the coin denomination in the Denomination field.
  2. Enter the number of coins in the Quantity field.
  3. Click Generate Coin.
Test Data
  1. Denominations: 0.05, 0.10, 0.25, 0.50, 1, 2, 5
  2. Quantities: 0, 1, 5, 10, 20
Expected Result
  1. Coin of the specified denomination should be produced if the specified Quantity is valid (1, 5)
  2. A message ‘Please enter a valid quantity between 1 and 10′ should be displayed if the specified quantity is invalid.
Actual Result
  1. If the specified quantity is valid, the result is as expected.
  2. If the specified quantity is invalid, nothing happens; the expected message is not displayed
StatusFail
RemarksThis is a sample test case.
Created ByJohn Doe
Date of Creation01/14/2020
Executed ByJane Roe
Date of Execution02/16/2020
Test Environment
  • OS: Windows Y
  • Browser: Chrome N
WRITING GOOD TEST CASES
  • As far as possible, write test cases in such a way that you test only one thing at a time. Do not overlap or complicate test cases. Attempt to make your test cases ‘atomic’.
  • Ensure that all positive scenarios and negative scenarios are covered.
  • Language:
    • Write in simple and easy to understand language.
    • Use active voice: Do this, do that.
    • Use exact and consistent names (of forms, fields, etc).
  • Characteristics of a good test case:
    • Accurate: Exacts the purpose.
    • Economical: No unnecessary steps or words.
    • Traceable: Capable of being traced to requirements.
    • Repeatable: Can be used to perform the test over and over.
    • Reusable: Can be reused if necessary.

No comments:

Post a Comment