Test case template (with examples)

    A free test case template with every field explained, three filled-in examples, tips for writing good test cases and how to set it up in Excel or Sheets.

    By the Tebugging team7 min read

    A test case template is a fixed set of fields that every test case fills in: an ID, a title, preconditions, steps, test data and the expected result. Using the same fields each time makes test cases easy to write, run and review, whoever wrote them.

    Test case template

    FieldWhat to writeExample
    IDA short unique codeLOGIN-003
    TitleWhat is checked, in one lineSign-in fails with a wrong password
    PriorityHow important the check isHigh
    PreconditionsWhat must be true before you startA registered user exists; the user is signed out
    StepsNumbered actions, one per line1. Open the sign-in page. 2. Enter the email. 3. Enter a wrong password. 4. Select Sign in.
    Test dataExact values to useEmail: [email protected]; password: wrong-pass-1
    Expected resultWhat should happen, so anyone can judge pass or failThe message "Wrong email or password" is shown; the user stays signed out
    Actual resultWhat did happen (filled in when run)
    StatusPass, fail or blocked (filled in when run)

    Test case examples

    Three test cases written with the template, for sign-in and a discount code:

    IDTitlePreconditionsStepsExpected result
    LOGIN-001Sign-in works with a valid email and passwordRegistered user; signed outOpen sign-in; enter the valid email and password; select Sign inThe dashboard opens and shows the user's name
    LOGIN-003Sign-in fails with a wrong passwordRegistered user; signed outOpen sign-in; enter the valid email and a wrong password; select Sign inAn error message is shown; the user stays signed out
    CART-012Expired discount code is refusedCart total of 50 EUR; code OLD10 expired yesterdayOpen the cart; enter OLD10; select ApplyThe message says the code has expired; the total stays 50 EUR

    How to write good test cases

    1. 1One check per test case. If the title needs the word "and", split it.
    2. 2Write steps anyone can follow, without knowing the product. Name the page, the field and the button.
    3. 3Give exact test data. "A long name" is vague; "a name of 256 characters" is clear.
    4. 4Make the expected result something you can see, so pass or fail is not a matter of opinion.
    5. 5Keep each case independent, so it can run alone and in any order.
    6. 6Set a priority, so the critical cases run first when time is short.

    Positive, negative and edge cases

    • Positive case: the normal path works, such as sign-in with a valid password.
    • Negative case: wrong input is handled well, such as a wrong password or an empty field.
    • Edge case: the limits hold, such as the longest allowed name, an expired link or a double click.

    One test scenario usually becomes two to five test cases of these three kinds. For the difference, see test scenario vs test case.

    Test case template in Excel or Google Sheets

    A spreadsheet works well for a small product. Use one row per test case and one column per field from the template above. For each test run, add three columns: status, tester and date. Group cases by feature on separate tabs, and freeze the header row.

    Spreadsheets get hard to manage as the number of cases and runs grows: results from older runs are overwritten or copied to new tabs, and it is unclear which version is current. That is usually the moment to move to a test management tool.

    Common mistakes

    • Steps that depend on the result of another test case.
    • Expected results such as "works correctly".
    • Missing test data, so every tester uses different values.
    • Only positive cases; no negative or edge cases.
    • Cases that are never updated when the feature changes.

    From template to tool

    Tebugging offers smart test cases and AI-suggested test planning: it suggests scenarios and edge cases from your description, and you review and keep the ones that matter. Tests then run with automated execution and real-time monitoring. Read more in AI test case generation, or start from the website test plan guide.

    Frequently asked questions

    What should a test case include?+

    An ID, a title, preconditions, numbered steps, test data and an expected result. When the test is run, add the actual result and a status of pass, fail or blocked.

    How detailed should a test case be?+

    Detailed enough that someone who does not know the feature can run it and reach the same verdict. Exact test data and a visible expected result matter more than long steps.

    What is the difference between a test case and a test scenario?+

    A test scenario is one line that says what should work. A test case is one exact check of it, with steps, test data and an expected result.

    Can I use Excel for test cases?+

    Yes. A spreadsheet with one row per test case is fine for a small product. As cases and test runs grow, a test management tool keeps results and versions easier to follow.

    Keep reading

    New to a term? See the QA and AI testing glossary.

    Tebugging

    Plan, run and analyze your web tests with AI.

    Start on the free plan. No credit card required.

    Start Testing Free