51Testing软件测试论坛

标题: Sample Test Case Template with Examples [Download] [打印本页]

作者: 赵佳乐SMILE    时间: 2012-12-13 16:15
标题: Sample Test Case Template with Examples [Download]
本帖最后由 赵佳乐SMILE 于 2012-12-13 16:22 编辑

I get many requests to share a good test case template. I’m surprised many testers are still documenting test cases with Word docs or Excel files. They prefer excel spreadsheets because they can easily group test cases by test types and most importantly they easily get test metrics with Excel formulas. But I’m sure as volume of your tests goes on increasing, you will find it extremely difficult to manage.
[attach]82750[/attach]
If you are not using any test case management tool, I strongly recommend using any open source tool to manage and execute your test cases.

Test case formats vary by organization. But using a standard test case format for writing test cases is one step closer to setting up testing process on your project. It also minimizes ad-hoc testing done without proper test case documentation. But even if you use standard templates you need to setup test cases writing, review and approval, test execution and most importantly test report preparation process, all using manual methods.

Also if you have process to review test cases by business team then you must format these test cases in a template agreed by both the parties.

Here is how to make this manual test case management process a bit easier with the help of simple testing templates.

Note: I’ve listed maximum fields related to test case. But it is advised to use only those fields which are used by your team. Also if you think any field is used by your team but missing from this list feel free to add it in your customized template.

Below are the standard fields of sample test case template:

Test case ID: Unique ID for each test case. Follow some convention to indicate types of test. E.g. ‘TC_UI_1′ indicating ‘user interface test case #1′.

Test priority (Low/Medium/High): This is useful while test execution. Test priority for business rules and functional test cases can be medium or higher whereas minor user interface cases can be low priority. Test priority should be set by reviewer.

Module Name – Mention name of main module or sub module.

Test Designed By: Name of tester

Test Designed Date: Date when wrote

Test Executed By: Name of tester who executed this test. To be filled after test execution.

Test Execution Date: Date when test executed.

Test Title/Name: Test case title. E.g. verify login page with valid username and password.

Test Summary/Description: Describe test objective in brief.

Pre-condition: Any prerequisite that must be fulfilled before execution of this test case. List all pre-conditions in order to successfully execute this test case.

Dependencies: Mention any dependencies on other test cases or test requirement.

Test Steps: List all test execution steps in detail. Write test steps in the order in which these should be executed. Make sure to provide as much details as you can. Tip – to efficiently manage test case with lesser number of fields use this field to describe test conditions, test data and user roles for running test.

Test Data: Use of test data as an input for this test case. You can provide different data sets with exact values to be used as an input.

Expected Result:  What should be the system output after test execution? Describe the expected result in detail including message/error that should be displayed on screen.

Post-condition: What should be the state of the system after executing this test case?

Actual result: Actual test result should be filled after test execution. Describe system behavior after test execution.

Status (Pass/Fail): If actual result is not as per the expected result mark this test as failed. Otherwise update as passed.

Notes/Comments/Questions: To support above fields if there are some special conditions which can’t be described in any of the above fields or there are questions related to expected or actual results mention those here.

Add following fields if necessary:

Defect ID/Link: If test status is fail, then include the link to defect log or mention the defect number.

Test Type/Keywords: This field can be used to classify tests based on test types. E.g. functional, usability, business rules etc.

Requirements: Requirements for which this test case is being written. Preferably the exact section number of the requirement doc.

Attachments/References: This field is useful for complex test scenarios. To explain test steps or expected result using a visio diagram as a reference. Provide the link or location to the actual path of the diagram or document.

Automation? (Yes/No): Whether this test case is automated or not. Useful to track automation status when test cases are automated.

With the help of above fields I’ve prepared test case example templates for your reference:

Download test case template with example:

- DOC file and [attach]82752[/attach]
- XLS file[attach]82753[/attach]



[attach]82751[/attach]
Also refer few more articles on writing effective test cases here and here. Use these test writing guidelines and above template to write and manage test cases effectively on your project.

Personally, I prefer to use test case management tool. You can start with any open source tool. It will be a good addition for your efforts to setup testing process and also save lot of time instead of manually maintaining these documents.
作者: 赵佳乐SMILE    时间: 2012-12-13 16:23
果然很sample
但是我不知道所说的 test case management tool 是什么




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2