摘自 <A byte of Python> page 76
We hv now gone through the various phases in the process of writing a software. These phases can be summarised as follows:
结合我们实际项目的开发经验,由此发散开来。。。。
1. What(Analysis)做什么--需求分析
写SDD(solution design document),里边包含什么呢?
总体上:
需要画用例图,流程图,状态图
每个角色一张usecase图,每个椭圆对应一个详细的USECASE
对每个详细的功能点,又需要写:
(1)logic flow
(2)screen flow
(3)usecase大致的模板
USECASE ID: UCXXX
USECASE NAME: User Register
Use Case Definition
the user can register here.
Actors
The actors described below will only be able to ... for which they have authority.
NORMAL User(NU)
Administrator(ADMIN)
Trigger
The use case can be triggered through either of the following
• Select the link from ...
• Click the ...
Description
The use case is used by authorized users in the process of
Preconditions
The user has logged into the
Post conditions
1. The system displays an error message on the top
that user’s credentials are not met and login screen is displayed again.
2. The system displays an error message on a separate page if the user is not authorized to
Normal Flow
A.
B.
C.
Alternative Flows
A.1.
A.2.
A.3.
A.3.1
A.3.2
B.1
Exceptions
A.1.E.1
A.1.E.2
2. How(Design)怎么做--设计
IDD(Internal Design Document)
需要在RSA中画类图,每个类的每个method都要写注释(实现过程),
类图非常重要,coder对着类图完成开发
时序图。
每个功能的SQL语句(伪代码)。
Note : The lines prefixed with ***** must be implemented in Java. And the sql predicate is specific to the user role.
比如在sql中可以这么写
***if user_role = A
inner join Table_XX on xx
***if user_role =B
left outer join XXX
这就是设计时的伪代码
3. Do It(Implementation)做吧--实现
Coding
4. Test(Testing and Debugging)测试
按照先后顺序包括:
UT = unit testing 单元测试
IT = integration testing 集成测试
ST = system testing 系统测试
UAT= User acceptance testing验收测试
测试用例写在Excel中
表头为
Funciton Area
属于哪个功能模块
Test Case ID
用例的唯一ID,比如
ABC_R2_ST_X_646
ABC表示项目名
R2表示迭代周期
ST表示用例类型为ST
X不清楚
646是用例的号码(不断+1)
Description
用例是做什么的
Prerequisites
前提条件
Conditions
操作步骤
Expected Results
期望结果
Designer Comments
谁设计的用例(有什么特别要说明的)
Test Result
测试结果
Test Date
测试日期
5. Use(Operation or Deployment)用吧-
用户手册
实施工艺
6. Maintain(Refinement)
维护
CR(change request)
作为一个coder,先要读architect、BA及customer之间的user story,
进一步阅读SDD搞清楚requirement
最后根据IDD(类图)做开发
然后使用junit做代码层面的单元测试,最后对照测试用例做其余的测试