🎯 What is Requirements Engineering?
Requirements Engineering (RE): The activity of development, elicitation, specification, analysis, and management of the stakeholder requirements, which are to be met by a new or evolving system.
RE is concerned with identifying the purpose of a software system and the contexts in which it will be used. A software system is assessed in terms of the extent to which it satisfies the purpose for which it was intended.
💡 Ten Truths About Requirements
Truth #1: If you don't get the requirements right, it doesn't matter how well you execute the rest of the project.
Truth #2: Requirements development is a discovery and invention process, not just a collection process.
Truth #3: Change happens.
Truth #4: The interests of all the project stakeholders intersect in the requirements process.
Truth #5: Customer involvement is the most critical contributor to software quality.
Truth #6: The customer is not always right, but the customer always has a point.
Truth #7: The first question an analyst should ask about a proposed new requirement is, "Is this requirement in scope?"
Truth #8: Even the best requirements document cannot - and should not - replace human dialogue.
Truth #9: The requirements might be vague, but the product will be specific.
Truth #10: You're never going to have perfect requirements.
📊 Project Success & Failure Factors
Top 10 Project Success Factors
- User involvement
- Executive management support
- Clear statement of requirements
- Proper planning
- Realistic expectations
- Smaller project milestones
- Competent staff
- Ownership
- Clear vision and objectives
- Hard-working, focused staff
Top 10 Challenged Project Factors
- Lack of user involvement
- Incomplete requirements and specifications
- Changing requirements and specifications
- Lack of executive support
- Technology incompetence
- Lack of resources
- Unrealistic expectations
- Unclear objectives
- Unrealistic timeframe
- New technology
📋 Types of Requirements
Requirement: A statement which translates or expresses a need and its associated constraints and conditions.
Business Requirements
Why implement this system?
Example: "Airline wants to reduce airport counter staff costs by 25 percent."
User Requirements
Describes goals/tasks the user must be able to do with the product.
Example: "User needs to be able to check-in for flight using airline's website."
Functional Requirements
Specify the behaviors the product will exhibit under specific conditions.
Example: "If the passenger's profile does not indicate a seating preference, the reservation system shall assign a seat."
System Requirements
Requirements for a product composed of multiple components or subsystems.
Example: "The airport check-in kiosks need a barcode reader to scan a passport."
Non-Functional Requirements
Describe how well the product carries out its tasks. Includes:
Quality Attributes
Product characteristics (performance, safety, availability, compatibility)
Example: "Flight search results should load within 5 seconds."
External Interfaces
Connections between system and outside world
Example: "A link to Tawakkalna database to verify COVID-19 status."
Constraints
Restrictions on developer options during construction
Example: "System shall conform to MIL-STD-498."
Application-Domain Requirements
- Derived from the application domain
- Describe system characteristics and features that reflect the domain
- May be new functional requirements, constraints on existing requirements, or define specific computations
- If domain requirements are not satisfied, the system may be unworkable
Domain Requirement Example
"A patient's designated physician is the only entity allowed to retrieve a patient's medical reports."
🔄 Requirements Engineering Process
Inception
→
Elicitation
→
Analysis
→
Specification
→
Validation
Management (Throughout)
Process Activities
| Activity |
Description |
| Inception |
Start the process (business need, market opportunity, great idea), business case, feasibility study, system scope, risks, etc. |
| Elicitation |
Requirements discovered through consultation with stakeholders |
| Analysis & Negotiation |
Requirements are analyzed and conflicts resolved through negotiation |
| Specification |
A precise requirements document is produced |
| Validation |
The requirements document is checked for consistency and completeness |
| Management |
Needs and contexts evolve, and so do requirements |
⚠️ General Problems with Requirements Process
- Lack of the right expertise - Requirements engineers often lack domain expertise
- Initial ideas are often incomplete - Stakeholders may not know exactly what they want
- Difficulty of using complex tools - Complex methods associated with requirements gathering may negate anticipated benefits
📝 Past Exam Questions & Practice
Question 1 (Quiz 2)
Q: To properly manage the requirements, you need to maintain the accuracy and integrity of the collected requirements. How do the following terminologies affect the requirement management and how they can help in properly managing the requirements:
- Baselines: A baseline is a non-modifiable version of requirements that has been formally reviewed and agreed upon. It serves as a reference point for managing changes and helps maintain requirement integrity by preventing unauthorized modifications.
- Requirement synchronicity: Ensures all requirements documents and artifacts remain consistent with each other. When one requirement changes, related requirements must be updated to maintain synchronicity across the project.
- Tracking requirements status: Each requirement should have a status (proposed, approved, implemented, verified, deleted). This helps monitor progress and identify which requirements need attention.
Question 2 (Midterm Sample)
Q: Which one of the following is not a step of requirement engineering?
Options:
- Elicitation
- Design ✓ (Correct Answer)
- Analysis
- Documentation
Explanation: Design is part of the software development process, not requirements engineering. RE focuses on understanding and documenting what needs to be built, while design focuses on how to build it.
Question 3 (Midterm Sample)
Q: A stakeholder is anyone who will purchase the completed software system under development.
Answer: False ✓
Explanation: A stakeholder is anyone who has an interest in or is affected by the project, not just purchasers. This includes users, developers, managers, domain experts, testers, and many others.
Question 4 (Midterm Sample)
Q: Which of the following is not defined in a good Software Requirement Specification (SRS) document?
- Functional Requirement
- Nonfunctional Requirement
- Goals of implementation
- Algorithm for software implementation ✓ (Correct Answer)
Explanation: SRS focuses on WHAT the system should do, not HOW it should be implemented. Algorithms are design/implementation details, not requirements.
Question 5 (Major-1 Exam)
Q: Collecting quality requirements is considered problematic, discuss what problems we may face as RE when collecting and specifying such requirements.
Sample Answer:
- As requirements engineers, we lack the right expertise for many professions
- Not many experienced software engineers or domain experts are always available
- Extracting requirements from stakeholders can be problematic as stakeholders are not always available
- Many stakeholders may view our presence as a threat to their job and thus will not always cooperate
- Many important areas in requirements can be difficult to specify as clearly as possible
🎓 Key Takeaways
- Requirements engineering is critical - errors in requirements account for 40-50% of all defects in software products
- User involvement is the #1 success factor for projects
- Understand the different types of requirements: Business, User, Functional, System, and Non-functional
- RE is a process involving: Inception → Elicitation → Analysis → Specification → Validation, with Management throughout
- Non-functional requirements are just as important as functional requirements - if not met, the system is useless
- Stakeholders include anyone affected by or interested in the project, not just customers
- Change is inevitable in requirements - plan for it
- Requirements development is about discovery and invention, not just collection
🎯 وش يعني هندسة المتطلبات؟
هندسة المتطلبات (RE): هي النشاط اللي يشمل تطوير، واستخلاص، وتحديد، وتحليل، وإدارة متطلبات أصحاب المصلحة اللي لازم النظام الجديد أو المطوَّر يحققها.
هندسة المتطلبات تهتم بتحديد الهدف من النظام البرمجي والبيئات اللي راح يُستخدم فيها.
يتم تقييم النظام بناءً على مدى تحقيقه للغرض اللي انبنى عشانه.
💡 عشر حقائق عن المتطلبات
الحقيقة #1: إذا ما ضبطت المتطلبات من البداية، ما يهم قدّ إيش تنفّذ باقي المشروع بشكل ممتاز.
الحقيقة #2: تطوير المتطلبات عملية اكتشاف وابتكار، مو بس تجميع طلبات.
الحقيقة #3: التغيير شيء طبيعي ويصير دايمًا.
الحقيقة #4: مصالح كل أصحاب المصلحة تتقاطع في عملية المتطلبات.
الحقيقة #5: مشاركة العميل هي أهم عامل يرفع جودة النظام البرمجي.
الحقيقة #6: العميل مو دايمًا صح، بس دايمًا عنده وجهة نظر لازم تنسمع.
الحقيقة #7: أول سؤال لازم يسأله محلل المتطلبات عن أي متطلب جديد: "هل هذا المتطلب داخل نطاق المشروع؟"
الحقيقة #8: حتى أفضل مستند متطلبات ما يقدر - ولا المفروض - يعوّض الحوار البشري.
الحقيقة #9: المتطلبات ممكن تكون غامضة، بس المنتج النهائي بيكون محدد وواضح.
الحقيقة #10: مستحيل توصل لمتطلبات كاملة ومثالية 100%.
📊 عوامل نجاح وفشل المشاريع
أهم 10 عوامل لنجاح المشروع
- مشاركة المستخدمين
- دعم الإدارة العليا
- وضوح وصياغة المتطلبات
- تخطيط سليم
- توقعات واقعية
- تقسيم المشروع لمراحل صغيرة
- فريق عمل كفؤ
- الإحساس بالمسؤولية والملكية
- رؤية وأهداف واضحة
- فريق ملتزم ويشتغل بتركيز
أهم 10 عوامل للمشاريع المتعثرة
- قلة مشاركة المستخدمين
- متطلبات ومواصفات ناقصة
- تغيّر مستمر في المتطلبات والمواصفات
- غياب دعم الإدارة العليا
- ضعف في التقنية أو الخبرة التقنية
- قلة الموارد
- توقعات غير واقعية
- أهداف غير واضحة
- مدة زمنية غير واقعية
- استخدام تقنيات جديدة بدون خبرة كافية
📋 أنواع المتطلبات
المتطلب: عبارة تصف حاجة معيّنة والقيود أو الشروط المرتبطة فيها.
متطلبات الأعمال (Business Requirements)
ليش نطوّر هذا النظام أصلاً؟
مثال: "شركة الطيران تبغى تقلل تكلفة موظفي كاونتر المطار بنسبة 25٪."
متطلبات المستخدم (User Requirements)
تصف الأهداف/المهام اللي لازم المستخدم يقدر يسويها باستخدام النظام.
مثال: "المستخدم يحتاج يقدر يعمل تسجيل دخول للرحلة عن طريق موقع شركة الطيران."
المتطلبات الوظيفية (Functional Requirements)
تحدد سلوك النظام في ظروف معيّنة.
مثال: "إذا ملف الراكب ما فيه تفضيل مقعد، النظام يحجز له مقعد تلقائيًا."
متطلبات النظام (System Requirements)
متطلبات لنظام مكوَّن من عدة مكوّنات أو أنظمة فرعية.
مثال: "أجهزة الكشك في المطار تحتاج قارئ باركود لمسح جواز السفر."
المتطلبات غير الوظيفية (Non-Functional Requirements)
تصف كيف ينفّذ النظام مهامه، مو وش يسوي فقط. تشمل:
صفات الجودة (Quality Attributes)
خصائص المنتج مثل الأداء، الأمان، التوفّر، التوافقية.
مثال: "نتائج البحث عن الرحلات لازم تظهر خلال 5 ثواني."
الواجهات الخارجية (External Interfaces)
الروابط بين النظام والعالم الخارجي.
مثال: "ربط مع قاعدة بيانات توكلنا للتحقق من حالة كوفيد-19."
القيود (Constraints)
قيود على خيارات المطورين أثناء بناء النظام.
مثال: "النظام لازم يلتزم بالمعيار MIL-STD-498."
متطلبات مجال التطبيق (Application-Domain Requirements)
- جاية من مجال التطبيق نفسه (مثل الطب، الطيران، البنوك...)
- تصف خصائص وميزات في النظام تعكس طبيعة المجال
- ممكن تكون متطلبات وظيفية جديدة، أو قيود على متطلبات موجودة، أو حسابات خاصة
- إذا ما تم تحقيق متطلبات المجال، النظام ممكن يصير غير قابل للاستخدام
مثال على متطلب من مجال التطبيق
"الطبيب المعيّن للمريض هو الجهة الوحيدة المسموح لها بالوصول لتقارير المريض الطبية."
🔄 عملية هندسة المتطلبات
Inception (البداية)
→
Elicitation (استخلاص)
→
Analysis (تحليل)
→
Specification (تحديد)
→
Validation (تحقق)
Management (إدارة مستمرة)
أنشطة العملية
| النشاط |
الوصف |
| Inception (البداية) |
بداية العملية (حاجة تجارية، فرصة في السوق، فكرة قوية)، دراسة جدوى، نطاق النظام، المخاطر، وغيرها. |
| Elicitation (استخلاص المتطلبات) |
اكتشاف المتطلبات عن طريق النقاش مع أصحاب المصلحة. |
| Analysis & Negotiation (تحليل وتفاوض) |
تحليل المتطلبات وحل التعارضات عن طريق التفاوض. |
| Specification (تحديد المتطلبات) |
إنتاج مستند متطلبات دقيق وواضح. |
| Validation (التحقق) |
التأكد من أن مستند المتطلبات متناسق وكامل. |
| Management (إدارة) |
الاحتياجات والبيئة تتغير، وبالتالي المتطلبات تتغير معها. |
⚠️ مشاكل عامة في عملية المتطلبات
- نقص الخبرة المناسبة: مهندسو المتطلبات غالبًا ما ينقصهم خبرة في مجال العمل نفسه.
- الأفكار الأولية غالبًا ناقصة: أصحاب المصلحة مو دايمًا عارفين بالضبط وش يبغون.
- صعوبة استخدام أدوات معقدة: الطرق والأدوات المعقدة في جمع المتطلبات ممكن تعقّد الشغل أكثر من ما تفيده.
📝 أسئلة اختبارات سابقة وتدريبات
السؤال 1 (Quiz 2)
السؤال: عشان تدير المتطلبات بشكل صحيح، لازم تحافظ على دقة وسلامة المتطلبات اللي جمعتها. كيف المصطلحات التالية تأثر على إدارة المتطلبات وتساعد في إدارتها بشكل صحيح:
- Baselines (خط الأساس): نسخة من المتطلبات يتم اعتمادها رسميًا وما تتغير إلا بإجراءات محددة. تعتبر مرجع لإدارة التغييرات وتحافظ على سلامة المتطلبات من التعديل العشوائي.
- Requirement synchronicity (تزامن المتطلبات): التأكد إن كل مستندات المتطلبات والآرتيفاكتس المرتبطة فيها متناسقة مع بعض. إذا متطلب تغيّر، لازم نحدّث المتطلبات المرتبطة فيه.
- Tracking requirements status (تتبع حالة المتطلبات): كل متطلب يكون له حالة (مقترح، معتمد، منفّذ، متحقق، محذوف). هذا يساعد نعرف وين وصلنا وإيش يحتاج شغل.
السؤال 2 (Midterm Sample)
السؤال: أي من التالي ليس خطوة من خطوات هندسة المتطلبات؟
الخيارات:
- Elicitation (استخلاص المتطلبات)
- Design ✓ (التصميم) (الإجابة الصحيحة)
- Analysis (تحليل)
- Documentation (توثيق)
الشرح: التصميم جزء من عملية تطوير البرمجيات، مو من هندسة المتطلبات. هندسة المتطلبات تهتم بفهم وتوثيق "وش نبي نبني"، بينما التصميم يهتم بـ "كيف نبني".
السؤال 3 (Midterm Sample)
السؤال: Stakeholder هو أي شخص راح يشتري النظام البرمجي بعد ما يكتمل.
الإجابة: خطأ ✓
الشرح: الـ Stakeholder هو أي شخص له مصلحة في المشروع أو يتأثر فيه، مو بس اللي يشتري النظام. يشمل المستخدمين، المطورين، المدراء، خبراء المجال، المختبرين، وغيرهم.
السؤال 4 (Midterm Sample)
السؤال: أي من التالي لا يتم تعريفه في مستند متطلبات برمجية (SRS) جيد؟
- Functional Requirement (متطلبات وظيفية)
- Nonfunctional Requirement (متطلبات غير وظيفية)
- Goals of implementation (أهداف التنفيذ)
- Algorithm for software implementation ✓ (خوارزمية تنفيذ البرمجية) (الإجابة الصحيحة)
الشرح: SRS يركز على "وش يسوي النظام"، مو "كيف نطبّقه". الخوارزميات تعتبر تفاصيل تصميم/تنفيذ، مو متطلبات.
السؤال 5 (Major-1 Exam)
السؤال: جمع متطلبات ذات جودة عالية يعتبر شيء صعب. ناقش المشاكل اللي ممكن نواجهها كمهندسي متطلبات أثناء جمع وتحديد هذي المتطلبات.
إجابة نموذجية:
- كمهندسي متطلبات، غالبًا ما يكون عندنا نقص في الخبرة في مجالات مهنية معيّنة.
- مو دايمًا نلقى مهندسين برمجيات أو خبراء مجال عندهم خبرة كافية ومتفرغين.
- استخلاص المتطلبات من أصحاب المصلحة ممكن يكون صعب لأنهم مو دايمًا متوفرين.
- بعض أصحاب المصلحة يشوفون وجودنا تهديد لوظائفهم، فيتعاونون أقل.
- في مجالات كثيرة، صعب نكتب المتطلبات بشكل واضح ودقيق 100%.
🎓 أهم النقاط
- هندسة المتطلبات شيء أساسي - الأخطاء في المتطلبات تشكل تقريبًا 40-50٪ من عيوب الأنظمة البرمجية.
- مشاركة المستخدمين هي العامل رقم 1 في نجاح المشاريع.
- لازم تفرق بين أنواع المتطلبات: أعمال، مستخدم، وظيفية، نظام، وغير وظيفية.
- عملية هندسة المتطلبات تمر بمراحل: بداية → استخلاص → تحليل → تحديد → تحقق، مع إدارة مستمرة.
- المتطلبات غير الوظيفية مهمة زي المتطلبات الوظيفية، وإذا ما تحققت النظام ممكن يكون عديم الفائدة.
- أصحاب المصلحة يشملون أي شخص له علاقة أو يتأثر بالمشروع، مو بس العملاء.
- التغيير في المتطلبات شيء طبيعي، فلازم نخطط له من البداية.
- تطوير المتطلبات عملية اكتشاف وابتكار، مو مجرد تجميع طلبات من الناس.