課程章節
培訓 · 第 2 單元:需求與驗證 · 第 2.1 章,共 6 章
2.1 撰寫需求與品質檢查 3:37
撰寫需求及其屬性,並讓品質檢查找出薄弱的用語。
展示 Holarch 1.27。
您將學到
- 將需求寫成一個可測試、帶有可量測數值的 shall 陳述
- 在規格書的章節下新增需求
- 設定需求的優先順序、驗證方法、理由與類型標籤
- 對文件執行品質檢查,並修正被標記的需求
- 親自審查需求後,標記 Correct 與 Feasible
在 Bike-Share Dock 規格書中撰寫需求:什麼樣的需求才算好、在章節下新增需求、填寫優先順序、驗證方法與理由、為需求加上標籤、執行需求品質檢查、修正薄弱的需求,並記錄審查者的判斷。
練習
在 Holarch 中於 CubeSat EO-1 示範專案上親自操作。
- 開啟您的 EO-1 示範專案(或建立它:管理專案 → 專案檔案 ▾ → 新增示範專案 → CubeSat(引導式系統工程))。
- 開啟需要與需求 → 文件 → EO-1 System Requirements Specification。選取章節 5 Communications,按一下 + 子項目,將需求命名為
Command Link Margin,並寫一個帶有數值的 shall 陳述(例如在 5 度仰角時至少有 6 dB 餘裕)。 - 在屬性面板中,將優先順序設為 High、Verification Method 設為 Analysis,並填寫理由,然後按一下 + 標籤 並選擇 Performance Requirement。
- 開啟需要與需求 → 品質,在範圍列中選擇文件:EO-1 System Requirements Specification,然後按一下檢查品質。閱讀 2.5 Safe Mode Recovery 的建議。
- 將 2.5 改寫成一個可量測的陳述(觸發復原的條件、速度多快,以及復原到哪個模式),然後再按一次檢查品質。
- 審查您的改寫,然後按一下該列 Correct 與 Feasible 下方的 ✘,將它們標記為 Yes。
當 2.5 Safe Mode Recovery 的分數比之前高、其建議不再指出含糊字詞,且 Correct 與 Feasible 顯示 ✔ 時,即完成。
自我檢查
- 為什麼以 and 連接的需求,即使兩半都很好,分數仍然較低?
- 為什麼自動檢查永遠無法標記 Correct 與 Feasible?
- 為什麼像 quickly 這樣的字詞在需求中會造成問題?
顯示答案
為什麼以 and 連接的需求,即使兩半都很好,分數仍然較低?
它把兩個需求合而為一。它們無法分別驗證、追溯或變更,因此檢查會將其標記為非單一。
為什麼自動檢查永遠無法標記 Correct 與 Feasible?
需求是否陳述了正確的需要、能否實現,需要工程判斷。由人審查需求並標記這兩項準則。
為什麼像 quickly 這樣的字詞在需求中會造成問題?
它無法量測,因此沒有任何測試能證明需求已達成。請以數值與單位取代它。
延伸閱讀
文字稿
顯示文字稿 (旁白與畫面內容)
Introduction
Welcome to Requirements and Verification. This track follows requirements from the first draft to the proof that the system meets them, on the Bike-Share Dock from Getting Started.
This first chapter is about writing requirements well, and letting Holarch check them.
A good requirement
A good requirement states one thing the system shall do, in words that can only mean one thing, with a value someone can test. Vague words such as fast or user friendly cannot be tested, and two requirements joined by and cannot be checked separately.
On screen: Card: a good requirement.
Write requirements
Open the specification. Select section 5.1, Timing and Throughput, open the menu next to After, and choose Add Child. Name the requirement Pay at the Kiosk, and write its statement in the inspector.
On screen: SRS → 5.1 → Add Child → Pay at the Kiosk.
Add two more the same way: an environmental requirement under 7.1, and a usability requirement under 8.3. The usability one is written the way requirements often are on a first try.
On screen: 7.1 → Operate in Cold and Heat; 8.3 → Friendly Kiosk.
Attributes and labels
Each requirement also has attributes for planning. Select Pay at the Kiosk, and set its priority to High, its verification method to Test, and its rationale: why the value was chosen.
On screen: 5.1.1 → Priority, Verification Method, Rationale.
Give it a label too: click Label in the inspector, and choose Performance Requirement. Labels let you filter and report by kind.
On screen: + Label → Performance Requirement.
Quality check
Now check the wording. Open Needs and Requirements, then Quality, choose the specification, and click Check Quality. Each requirement is scored against nine qualities of a good requirement, with a tick or a cross for each.
On screen: Quality → Document: the SRS → Check Quality.
Friendly Kiosk scores low. The findings name the problems: user friendly and quick cannot be measured, and the and joins two requirements in one.
On screen: Findings for Friendly Kiosk.
Fix it. Go back to the document, select the requirement, and rewrite it as one measurable statement.
On screen: Back to the SRS → 8.3.1 → new description.
Check the quality again. The score rises. Two qualities, correct and feasible, always need a person: when you have reviewed a requirement, click their crosses to mark them yes.
On screen: Quality → Check Quality again → mark Correct and Feasible.
Recap
Let's recap. You learned what makes a requirement good, added requirements under sections, filled in their attributes and labels, ran the quality check, fixed a weak requirement, and recorded your own judgment.
Next, you trace the stakeholder needs to these requirements.