我在写需求之前,首先要了解一下什么是需求,参考标准IEC2914-2018对需求有如下定义:Requirement(需求) –statement which translates or expresses a need and it’s associated constraints andconditions需求是对需要的陈述,其中要包含要求的条件与约束。定义中包含了两个非常重要的元素条件condition和约束constraints。那我们再来看一下条件和约束的含义又是什么呢?
Conditions(条件)-measurable qualitative or quantitative attribute that is stipulatedfor a requirement and that indicates a circumstance or event under which arequirements applies.为需求规定的可衡量的定性或定量属性,它指示需求适用的情况或事件
Constrains(约束)- externally limitation on the system, its design, or implementationor on the process used to develop or modify a system对系统,其设计或实现或用于开发或修改系统的过程的外部限制。
从定义上可以明确的看出来条件是对需求本身属性的定义,而约束则是对系统的外部限制,但是无论哪一点都是系统的必要组成部分,两者在规范的需求表达中都必不可少。
有了定义我们再来看以下规范的需求有哪几部分组成,一般来说主要有如下两种形式;
1、 [Condition] [Subject][Action] [Object] [Constraint Of Action ]
条件-主体-动作-对象-约束
2、 [Subject][Action] [Constraint Of Action