Software Engineering Lab Manual
Software Engineering Lab Manual
SOFTWARE ENGINEERING
(3161605)
Place:
Date:
2
Preface
The main motto of any laboratory/practical/field work is to enhance required skills and create ability
amongst students to solve real-time problems by developing relevant competencies in the psychomotor
domain. By keeping this in view, GTU has designed a competency-focused outcome- based curriculum
for engineering degree programs where sufficient weightage is given to practical work. It shows the
importance of enhancement of skills amongst the students, and it pays attention to utilizing every second
of time allotted for practicals amongst students, instructors, and faculty members to achieve relevant
outcomes by performing the experiments rather than merely study-type experiments. It is a must for the
effective implementation of a competency-focused outcome-based curriculum that every practical is
keenly designed to serve as a tool to develop and enhance relevant competency required by the various
industry among every student. These psychomotor skills are very difficult to develop through traditional
chalk-and-board content delivery methods in the classroom. Accordingly, this lab manual is designed
to focus on industry-defined relevant outcomes rather than the old practice of conducting practicals to
prove concepts and theories.
By using this lab manual, students can go through the relevant theory and procedure in advance before
the actual performance, which creates interest, and students can have a basic idea prior to the
performance. This, in turn, enhances pre-determined outcomes amongst students. Each experiment in
this manual begins with competency, industry-relevant skills, course outcomes as well as practical
outcomes (objectives). The students will also achieve safety and necessary precautions to be taken while
performing practical.
This manual also provides guidelines to faculty members to facilitate student-centric lab activities
through each experiment by arranging and managing necessary resources in order that the students
follow the procedures with required safety and necessary precautions to achieve the outcomes. It also
gives an idea of how students will be assessed by providing rubrics.
Software Engineering is an application of a systematic, defined, and measurable approach that begins
with requirement specification and progresses with planning, modeling, and testing, and concludes with
deployment. It is a layered paradigm that comprises processes, methods, and tools with the bedrock of
quality focus. The Software Engineering approach's main purpose is committed to developing the
software products within the stipulated time and budget with more quality. Quality product motivates
firmness, commodity, and delight.
Utmost care has been taken while preparing this lab manual; however ,there is always a chance of
improvement. Therefore, we welcome constructive suggestions for improvement and removal of errors,
if any.
3
Software Engineering (3161605)
4
Software Engineering (3161605)
The following industry relevant competency is expected to be developed in the student by undertaking
the practical work of this laboratory.
1. Teacher should provide the guideline with demonstration of practical to the students with all
features.
2. Teacher shall explain basic concepts/theory related to the experiment to the students before
starting of each practical
3. Involve all the students in performance of each experiment.
4. Teacher is expected to share the skills and competencies to be developed in the students and
ensure that the respective skills and competencies are developed in the students after the
completion of the experimentation.
5. Teachers should give opportunity to students for hands-on experience after the
demonstration.
6. Teacher may provide additional knowledge and skills to the students even though not covered
in the manual but are expected from the students by concerned industry.
7. Give practical assignment and assess the performance of students based on task assigned to
check whether it is as per the instructions or not.
8. Teacher is expected to refer complete curriculum of the course and follow the guidelines for
implementation.
1. Students are expected to carefully listen to all the theory classes delivered by the faculty members
and understand the COs, content of the course, teaching and examination scheme, skill set to be
developed etc.
2. Students shall organize the work in the group and make record of all observations.
3. Students shall develop maintenance skill as expected by industries.
4. Student shall attempt to develop related hand-on skills and build confidence.
5. Student shall develop the habits of evolving more ideas, innovations, skills etc. apart from those
included in scope of manual.
6. Student shall refer technical magazines and data books.
7. Student should develop a habit of submitting the experimentation work as per the schedule and
she/he should be well prepared for the same.
5
Software Engineering (3161605)
1. Student has to perform all the practical as described in the practical list.
2. For performing the practical list, student can able to work individually or work in a team as per
subject teacher guidelines.
3. After establishing the team, every team will have to identify the problem area / definition for
performing the laboratory work.
4. Every team has to approve their problem definition to respective faculty member within 15 days
of the beginning of the semester.
5. Once the problem definition is approved by the faculty member, every team has to perform all the
practical based on their respective problem definition.
6
Software Engineering (3161605)
Index
(Progressive Assessment Sheet)
7
Software Engineering (3161605)
Practical – 1
AIM: Study of various type of Software Process models with comparison and find out which process
model will be appropriate for your selected Project.
Objectives:
• To learn different software process models.
• To compare various software process models and analyze their advantages and disadvantages.
• To identify a suitable model for a specific project based on its requirements.
Theory:
A software process model is a framework that describes the activities performed at each stage of the
software development life cycle (SDLC). Different process models help in managing the software development
process efficiently.
1. Waterfall Model
• Description: Linear and sequential approach with distinct phases (Requirements, Design, Implementation,
Testing, Deployment).
• Phases: Each phase must be completed before the next begins.
• Use Case: Suitable for projects with well-defined, stable requirements.
• Advantages: Simple, easy to understand, and well-documented.
• Disadvantages: Inflexible, difficult to accommodate changes, late testing.
3. Incremental Model
• Description: Divides the project into smaller increments, each delivering a part of the functionality.
• Phases: Each increment goes through requirements, design, implementation, and testing.
• Use Case: Suitable for projects where partial delivery is acceptable.
• Advantages: Early delivery, flexibility, easier to manage risks.
• Disadvantages: Requires good planning, integration challenges.
8
Software Engineering (3161605)
5. Agile Model
• Description: Iterative and flexible approach focusing on delivering small, functional increments.
• Key Principles: Customer collaboration, responding to change, working software.
• Frameworks: Scrum, Kanban, XP.
• Use Case: Suitable for projects with evolving requirements.
• Advantages: Adaptable, continuous feedback, faster delivery.
• Disadvantages: Requires active user involvement, less documentation.
6. Iterative Model
• Description: Develops the product through repeated cycles (iterations), refining it over time.
• Phases: Each iteration includes planning, design, implementation, and testing.
• Use Case: Suitable for large projects where requirements evolve.
• Advantages: Early delivery, flexibility, risk management.
• Disadvantages: Requires careful planning, can be costly.
7. Spiral Model
• Description: Combines iterative development with systematic risk analysis.
• Phases: Planning, Risk Analysis, Engineering, Evaluation (repeated in cycles).
• Use Case: Ideal for large, complex, and high-risk projects.
• Advantages: Risk management, flexibility, early prototyping.
• Disadvantages: Complex, costly, requires expertise.
8. Prototype Model
• Description: Focuses on building a prototype to understand requirements and refine the product.
• Phases: Prototype creation, user feedback, refinement.
• Use Case: Suitable for projects with unclear or evolving requirements.
• Advantages: Early user feedback, reduces risk of misunderstanding requirements.
• Disadvantages: Can lead to scope creep, additional cost and time.
9
Software Engineering (3161605)
10
Software Engineering (3161605)
Quiz:
11
Software Engineering (3161605)
2. State weather the following statements are true or false. Justify your answer.
a) Software development organizations which follow the iterative waterfall model for
product development provide maximum customer satisfaction.
Answer: False
Justification:
• The iterative waterfall model is rigid and sequential, with limited scope for
incorporating changes once a phase is completed.
• Customer feedback is only addressed in later iterations, which can delay issue
resolution and reduce satisfaction.
• Example: In the payroll project, iterative waterfall would delay testing until all modules
(login, salary, attendance) are fully developed, leading to late detection of integration
issues.
Suggested Reference:
12
Software Engineering (3161605)
Rubrics 1 2 3 4 5 Total
Signature of Faculty:
13
Software Engineering (3161605)
Practical – 2
AIM: Discuss Project Management: Project Planning and Project Scheduling for the Mini Payroll Management
System.
Objectives:
1. To represent the plan to deliver the project scope over time.
2. To apply project scheduling techniques (Gantt chart, critical path analysis).
3. To use software metrics for cost estimation.
Theory:
Once a software project is found to be feasible, project planning becomes a crucial phase that must be
completed before any development activity begins. Project planning ensures that tasks are well-defined, resources
are allocated efficiently, and timelines are established for smooth project execution.
Among the key aspects of project planning, project-task scheduling plays a significant role in determining
the order, dependencies, and timelines of various project activities. A well-structured scheduling approach helps
in identifying critical tasks, optimizing resource allocation, and ensuring timely project completion.
Module Tasks
Login/User Management - Design UI for login and registration
2. Dependency Analysis
Once tasks are broken down, their dependencies must be established. If one task relies on the completion of
another, it must be scheduled accordingly.
Example: Dependency Analysis for Payroll System
• Login/User Management → Employee Management (User must be authenticated to manage
employees).
• Employee Management → Attendance Tracking (Employee data must exist before tracking
attendance).
• Attendance Tracking → Salary Processing (Salary depends on attendance records).
• All modules → Report Generation (Reports compile data from all modules).
Task dependencies define the order of execution, ensuring that interdependent tasks follow a logical sequence.
3. Time Estimation
Accurate estimation of time required for each task is crucial for setting realistic deadlines. The Constructive Cost
Model (COCOMO) or expert judgment methods can be used to estimate effort and duration.
Example: Estimated Duration for Payroll System
Using COCOMO estimation, the project effort is calculated as 14.17 person-months, and the total project
14
Software Engineering (3161605)
duration is approximately 6.32 months. However, for a student team of three, the adjusted timeline is around 2.1
months.
4. Resource Allocation
Resource allocation ensures that every activity has the necessary manpower and tools. This process typically
involves assigning specific team members to tasks based on their expertise.
Example: Role-Based Resource Allocation
• Frontend Developer: Responsible for UI design and user interaction.
• Backend Developer: Handles database integration and business logic.
• Tester: Validates functionality and ensures performance efficiency.
W1 W2 W3 W4 W1 W2 W3 W4 W1 W2 W3 W4 W1 W2 W3 W4
Problem
statement
Software
lifecycle
model
SRS
ERD
Data
15
Software Engineering (3161605)
Dictionary
Level-0
DFD
Level-1
DFD
Level-2
DFD
Use Case
Diagram
Use Case
Description
Function
point
metrics
COCOMO
II Model
Risk
Analysis
Testing
16
Software Engineering (3161605)
17
Software Engineering (3161605)
Quiz:
Suggested Reference:
18
Software Engineering (3161605)
Rubrics 1 2 3 4 5 Total
Signature of Facult
19
Software Engineering (3161605)
Practical – 3
AIM: Prepare the Software Requirement Specification (SRS) document for selected project.
Objectives:
1. Learn how to provide a detailed overview of our software product, its parameters and goals.
2. Describes the project's target audience and its user interface, hardware and software requirements.
Theory:
A software requirements specification (SRS) is a document that is created when a detailed description of
all aspects of the software to be built must be specified before the project is to commence. It is important
to note that a formal SRS is not always written. In fact, there are many instances in which effort expended
on an SRS might be better spent in other software engineering activities. However, when software is to be
developed by a third party, when a lack of specification would create severe business issues, or when a
system is extremely complex or business critical, an SRS may be justified.
Software Requirements
Specification
for
Payroll Management System
Version 1.0 approved
Prepared by Meet and Udit
Government Engineering College, Modasa
01-03-2025
20
Software Engineering (3161605)
Table of Contents
Revision History
2. Introduction
2.1 Purpose
This document specifies the requirements for the Library Management System v (LMS), designed
to automate cataloging, member registration, loan tracking, and reporting. It replaces manual processes to
improve efficiency and accuracy.
2.5 References
• IEEE Std 830-1998: IEEE Recommended Practice for Software Requirements Specifications.
• User Interface Style Guide (Internal Document).
21
Software Engineering (3161605)
3. Overall Description
The LMS is a standalone system but may integrate with external databases or authentication services. It
replaces manual workflows and enhances library operations.
Function Description
Employee Management Add, update, or remove employees using employee ID, name, role, and salary.
Attendance Tracking Track employee attendance, leaves, and overtime.
Salary Calculation Calculate monthly salary based on attendance, deductions, and bonuses.
Payroll Reporting Generate PDF/Excel reports for payroll, tax summaries, and employee
payslips.
22
Software Engineering (3161605)
Screen Description
Login Page Role-based access (librarian/member).
Dashboard Overview of total books, active loans, and pending
fines.
Search Interface Search books by title, author, ISBN, or category.
23
Software Engineering (3161605)
5. System Feature
System Feature
5.4 Reporting
Priority: Medium
• REQ-7: Generate monthly loan reports in PDF/Excel
24
Software Engineering (3161605)
7. Other Requirements
• Internationalization: Support for English and regional languages (TBD).
8. Appendices
Appendix A: Glossary
Term Definition
ISBN 13-digit International Standard Book Number.
Check-out Process of borrowing a book.
Item Description
Payment Gateway Integration Finalize third-party service for fine payments.
Multilingual Support Add support for regional languages.
Revision History
25
Software Engineering (3161605)
Introduction
Purpose
This document specifies the requirements for the Library Management System (LMS), a software
solution designed to automate library operations such as book cataloging, member registration, loan
tracking, and report generation. It replaces manual workflows to improve efficiency, accuracy, and
user experience.
Document Conventions
Product Scope
The LMS will:
• Manage book inventory (add, update, remove).
• Track member registrations and loan history.
• Automatically calculate overdue fines.
• Generate reports (loans, inventory, fines).
• Provide a secure web-based interface for librarians and members.
References
• IEEE Std 830-1998: IEEE Recommended Practice for Software Requirements Specifications.
• User Interface Style Guide (Internal Document).
Overall Description
Product Perspective
The LMS is a standalone system but may integrate with external databases or authentication
services. It replaces manual record-keeping and streamlines library workflows, reducing human error
and operational costs.
26
Software Engineering (3161605)
Product Functions
Function Description
Book Management Add, update, or remove books using ISBN, title, author, and category.
Member Management Register, update, or deactivate members.
Loan Management Track check-outs, check-ins, and calculate overdue fines.
Reporting Generate PDF/Excel reports for loans, inventory, and financial summaries.
Operating Environment
User Documentation
• User Manual: PDF/online guide with step-by-step instructions.
• In-App Help: Context-sensitive tooltips for key features.
27
Software Engineering (3161605)
Hardware Interfaces
Software Interfaces
• Email Service: Send automated reminders for due dates (e.g., SMTP).
• Payment Gateway: Integrate with services like PayPal/Razorpay (TBD).
Communications Interfaces
• HTTPS: Secure data transmission.
• REST API: For future integration with mobile app
System Features
System Feature 1
4.1.1 Description and Priority
Priority: High
• REQ-1: Librarians shall add books by entering ISBN, title, author, and category.
• REQ-2: System shall validate ISBN format (13 digits).
28
Software Engineering (3161605)
4.1.4 Reporting
Priority: Medium
• REQ-7: Generate monthly loan reports in PDF/Excel.
Performance Requirements
• The system shall support 100 concurrent users with a response time <2 seconds for all
user actions.
• Scalability: The system shall be designed to handle a 20% annual increase in users and
data volume without performance degradation.
Safety Requirements
• Data Integrity: Implement transaction rollback mechanisms to recover from system failures
during check-in/check-out processes.
• Backups: Daily encrypted backups of the database stored in a secure offsite location.
Security Requirements
• Authentication: Password encryption using bcrypt hashing.
• Authorization: Role-based access control (RBAC) to restrict member access to
administrative functions.
• Data Encryption: HTTPS for secure data transmission; sensitive data (e.g., passwords,
payment details) encrypted at rest.
• Compliance: Adhere to GDPR for user data protection.
Business Rules
• Members with overdue books are automatically blocked from borrowing new items.
• Fines accrue at ₹10/day starting 7 days after the due date.
• Maximum 5 books per member can be borrowed simultaneously.
Other Requirements
• Legal Compliance: Adhere to local library regulations for data retention and user privacy.
• Internationalization: Support for English and regional languages (e.g., Hindi, Tamil) to be
added in Phase 2.
29
Software Engineering (3161605)
Appendix A: Glossary
Term Definition
ISBN 13-digit International Standard Book Number.
Check-out Process of borrowing a book.
• Use Case Diagram: Illustrates interactions between librarians, members, and the system
(e.g., book search, loan management).
• ER Diagram: Defines database schema for entities like Books, Members, and Loans.
Item Description
Payment Gateway Integration Finalize third-party service for fine payments.
Multilingual Support Add support for regional languages.
Quiz:
30
Software Engineering (3161605)
Non-Functional Requirements
Define how the system performs. These describe system qualities, constraints, and standards.
Examples from the LMS:
• Performance: Support 100 concurrent users with <2s response time.
• Security: Encrypt passwords using bcrypt hashing.
• Usability: Achieve 90% user satisfaction via an intuitive interface.
• Reliability: Ensure 99.9% uptime (excluding maintenance).
Key Difference:
• Functional: What the system does (e.g., manage loans).
• Non-Functional: How well the system does it (e.g., securely, quickly, reliably).
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Complete Complete Complete Complete Complete
Marks implementation implementation implementation implementation implementation
as asked as asked as asked as asked as asked
Problem analysis Problem analysis Problem analysis Problem analysis
Development Development Development
of the Solution of the Solution of the Solution
Concept Clarity Concept Clarity
& &
understanding understanding
Correct answer to
all questions
Signature of Faculty
31
Software Engineering (3161605)
Practical – 4
AIM: Draw the Data Flow Diagram for your selected Project.
• Objectives:
To model the flow of data in the Mini Payroll Management System using Data Flow Diagrams (DFDs)
at different levels (Context, Level 1, Level 2).
• Theory:
The DFD takes an input-process-output view of a system. That is, data objects flow into the
software, are transformed by processing elements, and resultant data objects flow out of the
software. The data flow diagram enables you to develop models of the information domain and
functional domain.
Term Notation Remarks
32
Software Engineering (3161605)
• Process: Processes are represented by circle. The name of the process is written into the circle.
The name of the process is usually given in such a way that represents the functionality of the
process. More detailed functionalities can be shown in the next Level if it is required. Usually it is
better to keep the number of processes less than 7. If we see that the number of processes becomes
more than 7 then we should combine some the processes to a single one to reduce the number of
processes and further decompose it to the next level .
• External entity: External entities are only appear in context diagram. External entities are
represented by a rectangle and the name of the external entity is written into the shape. These send
data to be processed and again receive the processed data.
• Data store: Data stares are represented by a left-right open rectangle. Name of the data store is
written in between two horizontal lines of the open rectangle. Data stores are used as repositories
from which data can be flown in or flown out to or from a process.
• Data flow: Data flows are shown as a directed edge between two components of a Data Flow
Diagram. Data can flow from external entity to process, data store to process, in between two
processes and vice-versa.
• Background / Preparation
Levels of DFD
DFD uses hierarchy to maintain transparency thus multilevel DFD‟s can be created. Levels of DFD
are as follows:
• 0-level DFD: The primary external entities (boxes) produce information for use by the
system and consume information generated by the system
33
Software Engineering (3161605)
• 1-level DFD: It represents the main functions of the system and how they interact with
each other.
Level 1 DFD
Decomposes the system into core sub-processes:
1. Login Management
2. User Management
3. Employee Management
4. Attendance Management
5. Salary Management
6. Report Generation
Data Stores:
• User Data, Employee Data, Attendance Data, Salary Data.
34
Software Engineering (3161605)
• 2-level DFD: It represents the processes within each function of the system and how they
interact with each other.
35
Software Engineering (3161605)
36
Software Engineering (3161605)
o Software:
Lucidchart, Draw.io, or Visio for diagramming
Quiz:
1. In a data flow diagram, does an arrow represent a flow of control or something else?
Answer:
In a Data Flow Diagram (DFD), an arrow does NOT represent a flow of control. Instead, it represents
the flow of data between components of the system.
2. What is “information flow continuity” and how is it applied as a data flow diagram is refined?
Answer:
Information flow continuity ensures consistency between DFD levels. When refining a DFD from a
high-level (e.g., Level 0) to a detailed level (e.g., Level 1 or 2), the inputs and outputs of a parent process
must match those of its child processes.
• How it works:
o Level 0 (Context Diagram): Shows the system as a single process with inputs/outputs.
o Level 1: Breaks the Level 0 process into sub-processes. All data flows entering/exiting the Level
0 process must appear in Level 1.
o Level 2: Further decomposes Level 1 processes. The inputs/outputs of each sub-process must
align with its parent process.
• Example:
o Level 0: The system receives "Employee Data" as input and generates "Salary Report" as output.
o Level 1: The "Salary Management" process (a child of Level 0) must also accept "Employee
Data" and produce "Salary Report."
• Purpose:
o Prevents data loss or inconsistency during decomposition.
o Ensures traceability across DFD levels.
37
Software Engineering (3161605)
3. Facilitates Communication:
o Bridges gaps between technical teams and non-technical stakeholders (e.g., clients,
managers).
o Example: A DFD helps a client visualize how their employee data flows through the system.
6. Documentation:
o Serves as a reference for future upgrades or troubleshooting.
Suggested Reference:
38
Software Engineering (3161605)
Rubrics 1 2 3 4 5 Total
39
Software Engineering (3161605)
Practical – 5
AIM: Draw the Entity-Relationship Diagram for your selected Project.
• Objectives:
1. Identify entity sets, their attributes, and various relationships
2. Represent the data model through ER diagram
• Theory:
Entity-Relationship model is used to represent a logical design of a database to be created. In ER
model, real world objects (or concepts) are abstracted as entities, and different possible
associations among them are modeled as relationships.
For example, student and school -- they are two entities. Students study in school. So, these two
entities are associated with a relationship "Studies in".
As another example, consider a system where some job runs every night, which updates the
database. Here, job and database could be two entities. They are associated with the relationship
"Updates".
The Entity-Relationship (ER) model is used to abstract real-world objects (entities) and their
relationships. Key components include:
• Entity Sets: Collections of similar entities (e.g., Employee, User).
• Attributes: Properties describing entities (e.g., EmpID, Salary).
• Relationships: Associations between entities (e.g., "manages," "has").
• Keys:
o Primary Key (PK): Uniquely identifies an entity (e.g., EmpID).
o Foreign Key (FK): Links entities (e.g., EmpID in Attendance references Employee).
• Weak Entities: Depend on another entity for identity (e.g., Attendance depends on Employee).
40
Software Engineering (3161605)
1. Entity Sets
2. Relationships
Relationship Entities Cardinality Description
Involved
Manages User (Admin) 1:N One admin user can
→ Employee manage multiple
employees.
Has_Attendance Employee → 1:N One employee can have
Attendance multiple attendance
records (e.g., monthly
entries).
Has_Salary Employee → 1:1 One employee has one
Salary salary entry (updated
over time).
3. Weak Entities
• Attendance: Depends on Employee (identified by EmpID + Year + Month).
• Salary: Depends on Employee (identified by EmpID).
Attributes of Entity
Attributes are the characteristics describing any entity belonging to an entity set. Any entity in a set
can be described by zero or more attributes.
For example, any student has got a name, age, an address. At any given time a student can study only
at one school. In the school he would have a roll number, and of course a grade in which he studies.
These data are the attributes of the entity set Student.
41
Software Engineering (3161605)
Keys
One or more attribute(s) of an entity set can be used to define the following keys:
Super key: One or more attributes, which when taken together, helps to uniquely identify an entity
in an entity set. For example, a school can have any number of students. However, if we know
grade and roll number, then we can uniquely identify a student in that school.
Candidate key: It is a minimal subset of a super key. In other words, a super key might contain
extraneous attributes, which do not help in identifying an object uniquely. When such attributes
are removed, the key formed so is called a candidate key.
Primary key: A database might have more than one candidate key. Any candidate key chosen for a
particular implementation of the database is called a primary key.
Prime attribute: Any attribute taking part in a super key
Weak Entity
An entity set is said to be weak if it is dependent upon another entity set. A weak entity can't be
uniquely identified only by it's attributes. In other words, it doesn't have a super key.
For example, consider a company that allows employees to have travel allowance for their immediate
family. So, here we have two entity sets: employee and family, related by "Can claim for". However,
family doesn't have a super key. Existence of a family is entirely dependent on the concerned
employee. So, it is meaningful only with reference to employee.
ER model uses the "ISA" hierarchy to depict specialization (and thus, generalization).
Mapping Cardinalities
One of the main tasks of ER modeling is to associate different entity sets. Let's consider two entity
sets E1 and E2 associated by a relationship set R. Based on the number of entities in E1 and E2 are
associated with, we can have the following four type of mappings:
42
Software Engineering (3161605)
One to one: An entity in E1 is related to at most a single entity in E2, and vice versa
One to many: An entity in E1 could be related to zero or more entities in E2. Any entity in E2 could
be related to at most a single entity in E1.
Many to one: Zero or more number of entities in E1 could be associated to a single entity in E2.
However, an entity in E2 could be related to at most one entity in E1.
Many to many: Any number of entities could be related to any number of entities in E2, including
zero, and vice versa.
ER Diagram
From a given problem statement we identify the possible entity sets, their attributes, and
relationships among different entity sets. Once we have these information, we represent them
pictorially, called an entity-relationship (ER) diagram.
43
Software Engineering (3161605)
Data Design:
1. Name: ADMIN
44
Software Engineering (3161605)
2. Name: EMPLOYEE
3. Name: TAX
4. Name : Work-Hour
Sr.No. Field Name Data Type Field Constraints Description Example
Length
1. EId Numeric 3 Primary Key Employee ID 239
2. Min.Hours Numeric 2 Not Null Minimum hours 6
to complete by
employee
3. Hours Worked Numeric 3 Not Null Number of 30
hours worked in
a month
4. Holiday Numeric 2 Not Null Number of 3
Holidays
availed in a
month
Table 5.1: Entity-Attribute Mapping for Work Hour
45
Software Engineering (3161605)
5. Name: SALARY
Sr.No. Field Name Data Type Field Constraints Description Example
Length
1. EId Numeric 3 Primary Key Employee ID 239
2. HRA Float 5 Not Null HRA added on 2300
basic
3. DA Float 4 Not Null DA added on 2378
basic
4. MA Float 4 Not Null MA added on 5678
basic
5. Basic Float 8 Not Null Basic Salary 30000
Table 5.1: Entity-Attribute Mapping for Salary
Quiz:
• Key Characteristics:
o No Primary Key: It lacks a primary key (a unique identifier) and uses a foreign key from the
owner entity set.
o Partial Key: It may have a discriminator (or partial key) that, combined with the owner’s primary
key, uniquely identifies a weak entity.
o Total Participation: Weak entities always depend on the owner entity (e.g.,
an Attendance record cannot exist without an Employee).
Why It Matters:
Weak entity sets model real-world dependencies (e.g., attendance data is meaningless without an employee).
Types of Cardinality:
1. One-to-One (1:1)
o One entity in set A is linked to at most one entity in set B, and vice versa.
o Example: A Salary record is assigned to exactly one Employee, and an Employee has only
46
Software Engineering (3161605)
one Salary.
2. One-to-Many (1:N)
o One entity in set A can be linked to multiple entities in set B, but an entity in set B is linked to only
one entity in set A.
o Example: One User (Admin) can manage many Employee records, but an Employee is managed
by only one Admin.
3. Many-to-One (N:1)
o Opposite of 1:N. Many entities in set A are linked to one entity in set B.
o Example: Many Attendance records (for different months) belong to one Employee.
4. Many-to-Many (M:N)
o Entities in set A can be linked to multiple entities in set B, and vice versa.
o Example: In a university system, a Student can enroll in many Courses, and a Course can
have many Students.
Why
Cardinality ensures data integrity by defining how relationships behave (e.g., preventing duplicate salary entries
for an employee).
Rubrics 1 2 3 4 5 Total
47
Software Engineering (3161605)
Signature of Faculty:
48
Software Engineering (3161605)
Practical – 6
AIM: Draw Usecase Diagram for your selected Project .
• Objectives:
1. To write different scenarios of the system‟s execution.
2. To explore various UML use case diagram components to draw USECASE diagram.
• Theory:
o A use case diagram is used to represent the dynamic behavior of a system. It encapsulates
the system's functionality by incorporating use cases, actors, and their relationships. It
models the tasks, services, and functions required by a system/subsystem of an application.
It depicts the high-level functionality of a system and also tells how the user handles a
system.
o Purpose of Use Case Diagrams
▪ The main purpose of a use case diagram is to portray the dynamic aspect of a
system. It accumulates the system's requirement, which includes both internal as
well as external influences. It invokes persons, use cases, and several things that
invoke the actors and elements accountable for the implementation of use case
diagrams. It represents how an entity from the external environment can interact
with a part of the system.
Following are the purposes of a use case diagram given below:
1. It gathers the system's needs.
2. It depicts the external view of the system.
3. It recognizes the internal as well as external factors that influence the system.
4. It represents the interaction between the actors.
o In a use-case diagram, an actor is a user of the system (i.e. Something external to the
system; can be human or non-human) acting in a particular role.
o A use-case is a task which the actor needs to perform with the help of the system,
e.g., find details of a book or print a copy of a receipt in a bookshop.
o We can draw a box (with a label) around a set of use cases to denote the system
boundary, as on the previous slide (“library system”).
Inheritance can be used between actors to show that all use cases of one actor are available
to the other:
If several use cases include, as part of their functionality, another use case, we have a
special way to show this in a use-case diagram with an <<include>> relation.
49
Software Engineering (3161605)
If a use-case has two or more significantly different outcomes, we can show this by
extending the use case to a main use case and one or more subsidiary cases.
Background / Preparation:
Fig 6.1: Use Case Diagram for the Employee Payroll System
It is essential to analyze the whole system before starting with drawing a use case diagram, and
then the system's functionalities are found. And once every single functionality is identified, they
are then transformed into the use cases to be used in the use case diagram.
After that, we will enlist the actors that will interact with the system. The actors are the person or
a thing that invokes the functionality of a system. It may be a system or a private entity, such that
it requires an entity to be pertinent to the functionalities of the system to which it is going to
interact.
50
Software Engineering (3161605)
Once both the actors and use cases are enlisted, the relation between the actor and use case/ system
is inspected. It identifies the no of times an actor communicates with the system. Basically, an
actor can interact multiple times with a use case or system at a particular instance of time.
Following are some rules that must be followed while drawing a use case diagram:
1. A pertinent and meaningful name should be assigned to the actor or a use case of a
system.
2. The communication of an actor with a use case must be defined in an understandable
way.
3. Specified notations to be used as and when required.
4. The most significant interactions should be represented among the multiple no of
interactions between the use case and actors.
The purposes of use case diagrams can be as follows:
Rules:
• Use clear, descriptive names for actors and use cases.
• Avoid overcrowding; split complex diagrams into smaller ones.
Procedure / Steps
Use Case Diagram for Mini Payroll Management System
51
Software Engineering (3161605)
Actors:
1. Admin: Manages system operations (e.g., user/employee management).
2. Employee: Views personal details and payslips.
Use Cases:
1. Login: Authenticate user credentials.
2. Manage User: Register, update, or delete user profiles.
3. Manage Employee: Add, modify, or remove employee records.
4. Generate Reports: Create payroll, attendance, or salary reports.
5. Calculate Salary: Compute salary based on attendance.
Relationships:
• Association: Admin ↔ Manage User, Manage Employee, Generate Reports.
• Include: Login is included in all admin/employee actions.
• Extend: "Forgot Password" extends the Login use case.
Scenarios
1. Login Scenario:
o Actor: Admin/Employee.
o Flow: User enters credentials; system validates and grants access.
o Exception: Invalid credentials trigger an error message.
2. Generate Salary Report:
o Actor: Admin.
o Flow: Admin selects "Generate Report," system compiles salary data into a PDF.
o Post-Condition: Report saved in the database.
3. Update Employee Details:
o Actor: Admin.
o Flow: Admin edits employee records (e.g., bank details), system updates the database.
Below are real-world use case descriptions from the Employee Payroll System project:
52
Software Engineering (3161605)
53
Software Engineering (3161605)
2. Documentation Software:
o Microsoft Word/Google Docs: For documenting scenarios, use cases, and quiz answers.
o Markdown Editors: Tools like Typora or VS Code for formatting reports.
3. Collaboration Tools (Optional):
o Miro/Whimsical: For team-based brainstorming and diagram refinement.
• Procedure / Steps:
o Developing Use Cases:
o Step One – Define the set of actors that will be involved in the story
▪ Actors are people, devices, or other systems that use the system or product within
the context of the function and behavior that is to be described
▪ Actors are anything that communicate with the system or product and that are
external to the system itself
o Step Two – Develop use cases, where each one answers a set of questions
Quiz:
1. What are the four main components of a use case diagram?
o Actors: External entities interacting with the system (e.g., Admin, Employee).
o Use Cases: Functionalities or tasks the system performs (e.g., Login, Generate Reports).
o Relationships: Connections between actors and use cases (e.g., association, include, extend).
o System Boundary: A box enclosing use cases to define the system’s scope (labeled with the
system name, e.g., "Mini Payroll Management System").
Example from Practical:
o In the Mini Payroll System, the Admin actor is linked to use cases like "Manage Employee"
and "Generate Reports," all enclosed within the system boundary.
2. List relationships used in use case diagrams.
o Association: A line connecting an actor to a use case (e.g., Admin → Manage Employee).
o Include: A mandatory relationship where one use case requires another (e.g., Login
is included in all actions like "Generate Reports").
o Extend: An optional relationship for conditional behavior (e.g., "Forgot
Password" extends the Login use case).
o Generalization: Inheritance between actors or use cases (e.g., "Admin" and "Employee"
could generalize to a "User" actor).
Example from Practical:
o The "Forgot Password" use case extends the Login functionality, indicating it is an optional
scenario.
3. What tests can help find useful use cases?
o Scenario Testing: Validate if use cases cover real-world workflows (e.g., testing the
"Calculate Salary" use case with sample attendance data).
o Requirement Traceability Matrix (RTM): Map use cases to requirements to ensure coverage
54
Software Engineering (3161605)
oFunctional Testing: Test each use case’s functionality (e.g., ensuring "Manage User"
correctly updates profiles).
Example from Practical:
o During UAT, the Admin verified that the "Generate Reports" use case produced accurate
salary slips, aligning with user expectations.
Suggested Reference:
Rubrics 1 2 3 4 5 Total
55
Software Engineering (3161605)
Signature of Faculty:
56
Software Engineering (3161605)
Practical – 7
AIM: Solve the problem by applying basic COCOMO model.
• Objectives:
1. Categorize projects using COCOMO, and estimate effort and development time required
for a project.
• Theory
A software project is not just about writing a few hundred lines of source code to achieve
a particular objective. The scope of a software project is comparatively quite large, and
such a project could take several years to complete. However, the phrase "quite large" could
only give some (possibly vague) qualitative information. As in any other science and
engineering discipline, one would be interested to measure how complex a project is. One
of the major activities of the project planning phase, therefore, is to estimate various project
parameters in order to take proper decisions. Some important project parameters that are
estimated include:
Project size: What would be the size of the code written say, in number of lines, files,
modules?
Cost: How much would it cost to develop a software? A software may be just pieces of
code, but one has to pay to the managers, developers, and other project personnel.
Duration: How long would it be before the software is delivered to the clients?
Effort: How much effort from the team members would be required to create the
software?
In this experiment we will focus on two methods for estimating project metrics:
COCOMO
COCOMO (Constructive Cost Model) was proposed by Boehm. According to him, there
could be three categories of software projects: organic, semidetached, and embedded. The
classification is done considering the characteristics of the software, the development team
and environment. These product classes typically correspond to application, utility and
system programs, respectively. Data processing programs could be considered as
application programs. Compilers, linkers, are examples of utility programs. Operating
systems, real-time system programs are examples of system programs. One could easily
apprehend that it would take much more time and effort to develop an OS than an
attendance management system.
The concept of organic, semidetached, and embedded systems are described below.
57
Software Engineering (3161605)
Organic: A development project is said to be of organic type, if The project deals with
developing a well understood application The development team is small The team
members have prior experience in working with similar types of projects
Semidetached: A development project can be categorized as semidetached type, if
The team consists of some experienced as well as inexperienced staff Team members may
have some experience on the type of system to be developed
Embedded: Embedded type of development project are those, which Aims to develop a
software strongly related to machine hardware Team size is usually large
Boehm suggested that estimation of project parameters should be done through three
stages: Basic COCOMO, Intermediate COCOMO, and Complete COCOMO.
where
▪ KDSI is the estimated size of the software expressed in Kilo Delivered Source
Instructions
▪ a, b, c are constants determined by the category of software project
▪ Effort denotes the total effort required for the software development, expressed in
person months (PMs)
▪ Tdev denotes the estimated time required to develop the software (expressed in
months)
The value of the constants a, b, c are given below:
Software project a b c
Organic 2.4 1.05 0.38
Semi-detached 3.0 1.12 0.35
Embedded 3.6 1.20 0.32
58
Software Engineering (3161605)
Fig 7.1: COCOMO Effort Calculation Steps for the Payroll System
Quiz:
1. Assume that the size of an organic type software product has been estimated to be 32,000 lines of source
code. Assume that the average salary of software engineers be Rs. 15,000/- per month. Determine the
effort required to develop the software product and the nominal development time.
Given:
• Object Points = 48 (19 screens + 2 reports).
• Productivity Rate = 7 (low).
• Effort = 48 / 7 ≈ 7 person-months.
Calculation:
• 321.05=321×320.05321.05=321×320.05
• 320.05=e0.05×ln(32)320.05=e0.05×ln(32)
o ln(32)≈3.4657ln(32)≈3.4657
o 0.05×3.4657≈0.17330.05×3.4657≈0.1733
o e0.1733≈1.19e0.1733≈1.19
59
Software Engineering (3161605)
• 321.05≈32×1.19=38.08321.05≈32×1.19=38.08
• Effort = 2.4×38.08≈91.39 person-months2.4×38.08≈91.39 person-months
Calculation:
• ln(91.39)≈4.515ln(91.39)≈4.515
• 0.38×4.515≈1.71570.38×4.515≈1.7157
• e1.7157≈5.56e1.7157≈5.56
• Tdev = 2.5×5.56≈13.9 months2.5×5.56≈13.9 months
Quiz Answer
1. Effort Required: 91.39 PM91.39 PM
2. Development Time: 13.9 months13.9 months
Total Cost: ₹1,370,850₹1,370,850
Suggested Reference:
60
Software Engineering (3161605)
Rubrics 1 2 3 4 5 Total
Signature of Faculty:
61
Software Engineering (3161605)
Practical – 8
AIM: Modeling UML Class Diagrams and Sequence diagrams.
Objectives:
Theory:
Class diagram
It is a graphical representation for describing a system in context of its static construction[1].
Class name
A class is uniquely identified in a system by its name. A textual string [2]is taken as class name. It
lies in the first compartment in class rectangle.
Attributes
Property shared by all instances of a class. It lies in the second compartment in class rectangle.
Operations
An execution of an action can be performed for any object of a class. It lies in the last compartment
in class rectangle.
Example
To build a structural model for an Educational Organization, „Course‟ can be treated as a class which
contains attributes „courseName‟ & „courseID‟ with the operations „addCourse()‟ &
„removeCourse()‟ allowed to be performed for any object to that class.
62
Software Engineering (3161605)
Admin
Aid Int (PK)
SSN Int
Employee
Eid int (PK)
Name string
Contact string
Salary float
Salary
Eid int (FK)
Basic float
HRA float
DA float
Tax
Eid int (FK)
TDS float
EPF float
Relationships:
Admin -- Manages --> Employee (1:N)
Employee -- Has --> Salary (1:1)
Employee -- Has --> Tax (1:1)
Generalization/Specialization
It describes how one class is derived from another class. Derived class inherits the properties of its
parent class.
63
Software Engineering (3161605)
Geometric_Shapes is the class that describes how many sides a particular shape has. Triangle,
Quadrilateral and Pentagon are the classes that inherit the property of the Geometric_Shapes class.
So the relations among these classes are generalization. Now Equilateral_Triangle,
Isosceles_Triangle and Scalene_Triangle, all these three classes inherit the properties of Triangle
class as each one of them has three sides. So, these are specialization of Triangle class.
Relationships
Existing relationships in a system describe legitimate connections between the classes in that
system.
Association
It is an instance level relationship[i] that allows exchanging messages among the objects of both
ends of association. A simple straight line connecting two class boxes represent an association.
We can give a name to association and also at the both end we may indicate role names and multiplicity of
the adjacent classes. Association may be uni-directional.
Example
64
Software Engineering (3161605)
Aggregation
It is a special form of association which describes a part-whole[i] relationship between a pair of
classes. It means, in a relationship, when a class holds some instances of related class, then that
relationship can be designed as an aggregation.
Example
For a supermarket in a city, each branch runs some of the departments they have. So, the relation
among the classes „Branch‟ and „Department‟ can be designed as an aggregation. In UML, it can
be shown as in the fig. below
Composition [i]
It is a strong from of aggregation which describes that whole is completely owns its part. Life cycle
of the part depends on the whole.
Example
Let consider a shopping mall has several branches in different locations in a city. The existence of
branches completely depends on the shopping mall as if it is not exist any branch of it will no
longer exists in the city. This relation can be described as composition and can be shown as below
• Multiplicity
It describes how many numbers of instances of one class is related to the number of instances of another
class in an association.
Notation for different types of multiplicity:
65
Software Engineering (3161605)
o Sequence diagram:
▪ The sequence diagram represents the flow of messages in the system and is also
termed as an event diagram. It helps in envisioning several dynamic scenarios. It
portrays the communication between any two lifelines as a time-ordered sequence
of events, such that these lifelines took part at the run time. In UML, the lifeline is
represented by a vertical bar, whereas the message flow is represented by a vertical
dotted line that extends across the bottom of the page. It incorporates the iterations
as well as branching.
66
Software Engineering (3161605)
Actor
A role played by an entity that interacts with the subject is called as an actor. It is out of
the scope of the system. It represents the role, which involves human users and external
hardware or subjects. An actor may or may not represent a physical entity, but it purely
depicts the role of an entity. Several distinct roles can be played by an actor or vice versa.
Activation
It is represented by a thin rectangle on the lifeline. It describes that time period in which
an operation is performed by an element, such that the top and the bottom of the rectangle
is associated with the initiation and the completion time, each respectively.
Messages
The messages depict the interaction between the objects and are represented by arrows.
They are in the sequential order on the lifeline. The core of the sequence diagram is formed
by messages and lifelines.
67
Software Engineering (3161605)
Recursive Message: A self message sent for recursive purpose is called a recursive
message. In other words, it can be said that the recursive message is a special case of the
self message as it represents the recursive calls.
68
Software Engineering (3161605)
1) Add Employee :
2) Delete Employee :
69
Software Engineering (3161605)
3) Update Employee :
SEQUENCE DIAGRAM :-
A sequence diagram in Unified Modelling Language (UML) is a kind of interaction diagram that shows how
processes operate with one another and in what order. It is a construct of a Message Sequence Chart.
70
Software Engineering (3161605)
Sequence Diagram
Quiz:
1. In a sequence diagram:
(a) What does a box depict?
• Box (Lifeline): A rectangular box at the top of a sequence diagram represents a lifeline, which is an
object or actor participating in the interaction.
o Example: In a library system, a lifeline could be User, Book, or Database.
o Purpose: Shows the existence of an object/actor over time.
71
Software Engineering (3161605)
o Types of Messages:
1. Synchronous Call (Solid Line with Filled Arrowhead): A method call that waits for a
response (e.g., user → System: login()).
2. Return Message (Dashed Line with Open Arrowhead): Response to a synchronous
call (e.g., System → user: success).
3. Asynchronous Message (Solid Line with Half Arrowhead): A non-blocking message
(e.g., System → EmailService: sendConfirmation()).
Suggested Reference:
72
Software Engineering (3161605)
Rubric 1 2 3 4 5 Total
s
Marks Complete Complete Complete Complete Complete
implementatio implementatio implementatio implementatio implementa
n as asked n as asked n as asked n as asked tion as
asked
Problem analysis Problem analysis Problem analysis Problem
analysis
Development of Development of Development
the Solution the Solution of the
Solution
Concept Concept
Clarity & Clarity &
understanding understandi
ng
Correct
answer to all
questions
Signature of Faculty:
73
Software Engineering (3161605)
Practical – 9
AIM: Design the various test cases to perform the testing of the system and also perform the various type
of testing
Objectives: To explore and learn about different testing techniques and use them.
• Theory:
o Software Testing is evaluation of the software against requirements gathered from users
and system specifications. Testing is conducted at the phase level in software development
life cycle or at module level in program code. Software testing comprises of Validation and
Verification.
o Software Validation
▪ Validation is process of examining whether or not the software satisfies the user
requirements. It is carried out at the end of the SDLC. If the software matches
requirements for which it was made, it is validated.
o
Validation ensures the product under development is as per the user
requirements.
o Validation answers the question – "Are we developing the product which
attempts all that user needs from this software ?".
o Validation emphasizes on user requirements.
o Software Verification
▪ Verification is the process of confirming if the software is meeting the business
requirements, and is developed adhering to the proper specifications and
methodologies.
• Errors - These are actual coding mistakes made by developers. In addition, there is a
difference in output of software and desired output, is considered as an error.
74
Software Engineering (3161605)
• Fault - When error exists fault occurs. A fault, also known as a bug, is a result of an
error which can cause system to fail.
• Failure - failure is said to be the inability of the system to perform the desired task.
Failure occurs when fault exists in the system.
o Testing Levels
▪ Testing itself may be defined at various levels of SDLC. The testing process runs
parallel to software development. Before jumping on the next stage, a stage is
tested, validated and verified.
▪ Testing separately is done just to make sure that there are no hidden bugs or
issues left in the software. Software is tested on various levels -
o Unit Testing
While coding, the programmer performs some tests on that unit of program to
know if it is error free. Testing is performed under white-box testing approach. Unit
testing helps developers decide that individual units of the program are working as per
requirement and are error free.
o Integration Testing
Even if the units of software are working fine individually, there is a need to find
out if the units if integrated together would also work without errors. For example,
argument passing and data updation etc.
o System Testing
The software is compiled as product and then it is tested as a whole.
• Background / Preparation:
o Test management tool
o Test management tools are used to keep track of all the testing activity, fast data
analysis, manage manual and automation test cases, various environments, and plan
and maintain manual testing as well.
o Test management tools are used to keep track of all the testing activity, fast data analysis,
manage manual and automation test cases, various environments, and plan and maintain
manual testing as well.
o The test management tool is connected with the automation software. These types of tools
had various strategies for testing and multiple sets of features. Some of the test management
tools had capabilities to design the test case with the help of requirements.
75
Software Engineering (3161605)
o It is best for test managing, scheduling, defect logging, tracking, and analysis.
o Some of the most commonly used test management tools are as follows:
o Quality center
o RTH
o Testpad
o Test Monitor
o PractiTest
76
Software Engineering (3161605)
o Test Cases:
▪ The test case is defined as a group of conditions under which a tester determines
whether a software application is working as per the customer's requirements or
not. Test case designing includes preconditions, case name, input conditions, and
expected result. A test case is a first level action and derived from test scenarios.
o Unit Testing
o Integration Testing
o System Testing
o Acceptance Testing
In Unit Testing, we tested individual components like each controls for their validations to ensure that they operate
correctly.
The next level is called Integration Testing. In this many unit tested modules are combined into subsystems, which
are then tested. The goal here is to see if the modules can be integrated properly. This testing activity can be
considered testing the design.
77
Software Engineering (3161605)
In System Testing, we tested whether system elements have been properly integrated and perform allocated
functions to detect the errors that may result from unanticipated interactions between sub-system and system
components.
Finally, in Acceptance Testing, we tested whether the system is accepted for operational use or not.
In this employee management system I have used unit testing & integration Testing
TEST CASE :
78
Software Engineering (3161605)
79
Software Engineering (3161605)
1
2
Example
80
Software Engineering (3161605)
Quiz:
1. What elements of the WebApp can be “unit tested”? What types of tests must be conducted only after
the WebApp elements are integrated?
Unit-Testable Elements in the Mini Payroll System:
• Salary Calculation Logic:
o Example: A function that calculates net_salary = (salary_per_annum / 12) * present_days.
o Unit test: Verify correct output for valid/invalid inputs (e.g., negative days).
81
Software Engineering (3161605)
• User Authentication:
o Example: A method validating login credentials (Admin/Employee).
o Unit test: Test with valid/invalid username-password combinations.
• Input Validation:
o Example: Checking PAN number format or email syntax during employee registration.
o Unit test: Ensure invalid formats (e.g., ABCDE1234X) are rejected.
• Database CRUD Operations:
o Example: Testing if addEmployee() correctly inserts data into the database.
Tests Requiring Integration:
• Attendance-Salary Integration:
o Test if attendance data (present/absent days) is correctly used in salary calculation.
o Example: Ensure Attendance module feeds accurate data to Salary module.
• Report Generation:
o Verify that reports (e.g., payroll, attendance) pull data from integrated modules.
• User Role Access:
o Test if Admin can access all modules (e.g., delete employees), while Employees can only view
payslips.
2. What is white box testing? What are the different coverage-based testing strategies?
White Box Testing:
• Definition: Testing the internal code structure, logic, and workflows of the Mini Payroll System.
• Example: Checking the algorithm for calculating LOP (Loss of Pay) days in the salary module.
Coverage-Based Strategies:
1. Statement Coverage:
o Ensure every line of code is executed.
o Example: Test all code paths in the login() method (success, invalid password, empty fields).
2. Branch Coverage:
o Test all decision branches (e.g., if-else conditions).
o Example: Validate both conditions in if (role == "Admin") { ... } else { ... }.
3. Path Coverage:
o Test all possible paths through the code.
o Example: Cover all combinations in a multi-condition salary calculation (e.g., bonuses,
deductions).
4. Condition Coverage:
o Ensure all boolean expressions are tested for true/false.
82
Software Engineering (3161605)
o Example: Test if (attendance > 0 && salary > 0) for both true and false cases.
Suggested Reference:
1 Software Testing: A Craftsman's Approach, by Paul C. Jorgensen, Third Edition
2 Software Engineering by Rajib Mall, PHI 2014
83
Software Engineering (3161605)
Rubrics 1 2 3 4 5 Total
Signature of Faculty:
84
Software Engineering (3161605)
Practical – 10
AIM: Study of Open-source tools in DevOps for Infrastructure Automation, Configuration Management,
Deployment Automation, Performance Management, Log Management. Monitoring
DevOps is the combination of cultural philosophies, practices, and tools that increases an organization‟s
ability to deliver applications and services at high velocity: evolving and improving products at a faster
pace than organizations using traditional software development and infrastructure management processes.
This speed enables organizations to better serve their customers and compete more effectively in the
market.
In some DevOps models, quality assurance and security teams may also become more tightly integrated
with development and operations and throughout the application lifecycle. When security is the focus of
everyone on a DevOps team, this is sometimes referred to as DevSecOps.
These teams use practices to automate processes that historically have been manual and slow. They use a
technology stack and tooling which help them operate and evolve applications quickly and reliably. These
tools also help engineers independently accomplish tasks (for example, deploying code or
85
Software Engineering (3161605)
provisioning infrastructure) that normally would have required help from other teams, and this further
increases a team‟s velocity.
Software and the Internet have transformed the world and its industries, from shopping to entertainment
to banking. Software no longer merely supports a business; rather it becomes an integral component of
every part of a business. Companies interact with their customers through software delivered as online
services or applications and on all sorts of devices. They also use software to increase operational
efficiencies by transforming every part of the value chain, such as logistics, communications, and
operations. In a similar way that physical goods companies transformed how they design, build, and
deliver products using industrial automation throughout the 20th century, companies in today‟s world
must transform how they build and deliver software.
DevOps Practices
Continuous Integration
Continuous integration is a software development practice where developers regularly merge their code
changes into a central repository, after which automated builds and tests are run. The key goals of
continuous integration are to find and address bugs quicker, improve software quality, and reduce the time
it takes to validate and release new software updates.
Continuous Delivery
Continuous delivery is a software development practice where code changes are automatically built,
tested, and prepared for a release to production. It expands upon continuous integration by deploying all
code changes to a testing environment and/or a production environment after the build stage. When
continuous delivery is implemented properly, developers will always have a deployment-ready build
artifact that has passed through a standardized test process.
Microservices
The microservices architecture is a design approach to build a single application as a set of small services.
Each service runs in its own process and communicates with other services through a well- defined
interface using a lightweight mechanism, typically an HTTP-based application programming interface
(API). Microservices are built around business capabilities; each service is scoped to a single purpose.
You can use different frameworks or programming languages to write microservices and deploy them
independently, as a single service, or as a group of services.
86
Software Engineering (3161605)
Infrastructure as Code
Infrastructure as code is a practice in which infrastructure is provisioned and managed using code and
software development techniques, such as version control and continuous integration. The cloud‟s API-
driven model enables developers and system administrators to interact with infrastructure
programmatically, and at scale, instead of needing to manually set up and configure resources. Thus,
engineers can interface with infrastructure using code-based tools and treat infrastructure in a manner
similar to how they treat application code. Because they are defined by code, infrastructure and servers
can quickly be deployed using standardized patterns, updated with the latest patches and versions, or
duplicated in repeatable ways.
Configuration Management
Developers and system administrators use code to automate operating system and host configuration,
operational tasks, and more. The use of code makes configuration changes repeatable and standardized. It
frees developers and systems administrators from manually configuring operating systems, system
applications, or server software.
Policy as Code
With infrastructure and its configuration codified with the cloud, organizations can monitor and enforce
compliance dynamically and at scale. Infrastructure that is described by code can thus be tracked,
validated, and reconfigured in an automated way. This makes it easier for organizations to govern changes
over resources and ensure that security measures are properly enforced in a distributed manner (e.g.
information security or compliance with PCI-DSS or HIPAA). This allows teams within an organization
to move at higher velocity since non-compliant resources can be automatically flagged for further
investigation or even automatically brought back into compliance.
87
Software Engineering (3161605)
wikis. This helps speed up communication across developers, operations, and even other
teams like marketing or sales, allowing all parts of the organization to align more closely
on goals and projects.
DevOps Tools
The DevOps model relies on effective tooling to help teams rapidly and reliably deploy
and innovate for their customers. These tools automate manual tasks, help teams manage
complex environments at scale, and keep engineers in control of the high velocity that is
enabled by DevOps. AWS provides services that are designed for DevOps and that are
built first for use with the AWS cloud. These services help you use the DevOps practices
described above.
Quiz:
1. What are the challenges with DevOps implementation?
Challenges in Implementing DevOps for the Mini Payroll System:
1. Cultural Resistance:
o Merging development and operations teams (e.g., developers and IT admins) can
lead to resistance due to differing priorities.
o Example: Developers might prioritize rapid feature releases, while operations
focus on system stability.
2. Tool Integration Complexity:
o Integrating tools like Jenkins (CI/CD), Ansible (Configuration
Management), and Prometheus (Monitoring) requires expertise.
o Example: Ensuring Jenkins pipelines automate payroll deployment without
disrupting existing workflows.
3. Security Compliance (DevSecOps):
o Embedding security into automated pipelines (e.g., encrypting payroll data, role-
based access control).
o Example: Automating vulnerability scans for the salary calculation module.
4. Infrastructure as Code (IaC) Management:
o Managing cloud resources (e.g., AWS/Azure) via code (Terraform) for
scalability.
o Example: Scaling server capacity during peak payroll processing times.
5. Monitoring Distributed Systems:
o Tracking performance of microservices (e.g., attendance, salary modules) in real-
time.
88
Software Engineering (3161605)
2. What is DevOps? How it works? What are the DevOps principles & best practices?
DevOps Definition:
A cultural and technical approach that combines software development (Dev) and IT operations
(Ops) to accelerate delivery through automation, collaboration, and continuous feedback.
89
Software Engineering (3161605)
4. Continuous Deployment:
o Automatically deploy to AWS after successful tests.
5. Continuous Monitoring:
o Track system uptime and errors using Prometheus + Grafana.
6. Continuous Feedback:
o Gather user input (e.g., HR team) to refine payroll report formats.
7. Continuous Operations:
o Ensure 24/7 availability during payroll processing cycles.
Suggested Reference:
1 Deepak Gaikwad, Viral Thakkar, DevOps Tools from Practitioner‟s ViewPoint, Wiley.
2 The DevOps Handbook - Gene Kim et. al.
References used by the students:
Rubrics 1 2 3 4 5 Total
90
Software Engineering (3161605)
Signature of Faculty:
91