how to write up a test plan code example

Example 1: what to include in a test plan

Test Plan Identifier
References
Introduction
Test Items
Features To Be Tested
Features Not To Be Tested
Approach
Pass/Fail Criteria
Suspension Criteria
Test Deliverables
Testing Tasks
Environmental Needs
Responsibilities
Staffing and Training Needs
Schedule
Risks and Contingencies
Approvals

Example 2: how to write a test plan

Analyze the product
Design the Test Strategy
Define the Test Objectives
Define Test Criteria
Resource Planning
Plan Test Environment
Schedule & Estimation
Determine Test Deliverables