0% found this document useful (0 votes)
30 views

Se Lab Notes

Use case diagrams are used to gather functional requirements of a system by identifying use cases, actors, and relationships. They provide an outside view of a system and its interactions. To create a use case diagram, you identify the functionalities as use cases, external factors as actors, and relationships among them. The diagram is then drawn following guidelines like meaningful use case names and clear relationships.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Se Lab Notes

Use case diagrams are used to gather functional requirements of a system by identifying use cases, actors, and relationships. They provide an outside view of a system and its interactions. To create a use case diagram, you identify the functionalities as use cases, external factors as actors, and relationships among them. The diagram is then drawn following guidelines like meaningful use case names and clear relationships.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Software Engineering Principles and Practices LAB

Purpose of Use Case Diagrams


The purpose of use case diagram is to capture the dynamic aspect of a system.
However, this definition is too generic to describe the purpose, as other four
diagrams (activity, sequence, collaboration, and Statechart) also have the same
purpose. We will look into some specific purpose, which will distinguish it from other
four diagrams.
Use case diagrams are used to gather the requirements of a system including
internal and external influences. These requirements are mostly design
requirements. Hence, when a system is analyzed to gather its functionalities, use
cases are prepared and actors are identified.
When the initial task is complete, use case diagrams are modelled to present the
outside view.
In brief, the purposes of use case diagrams can be said to be as follows −
​ Used to gather the requirements of a system.
​ Used to get an outside view of a system.
​ Identify the external and internal factors influencing the system.
​ Show the interaction among the requirements are actors.

How to Draw a Use Case Diagram?


Use case diagrams are considered for high level requirement analysis of a system.
When the requirements of a system are analyzed, the functionalities are captured in
use cases.
We can say that use cases are nothing but the system functionalities written in an
organized manner. The second thing which is relevant to use cases are the actors.
Actors can be defined as something that interacts with the system.
Actors can be a human user, some internal applications, or may be some external
applications. When we are planning to draw a use case diagram, we should have the
following items identified.
​ Functionalities to be represented as use case
​ Actors
​ Relationships among the use cases and actors.

Use case diagrams are drawn to capture the functional requirements of a system.
After identifying the above items, we have to use the following guidelines to draw an
efficient use case diagram
​ The name of a use case is very important. The name should be chosen
in such a way so that it can identify the functionalities performed.
​ Give a suitable name for actors.
​ Show relationships and dependencies clearly in the diagram.
​ Do not try to include all types of relationships, as the main purpose of
the diagram is to identify the requirements.
​ Use notes whenever required to clarify some important points.

Following is a sample use case diagram representing the order management


system. Hence, if we look into the diagram then we will find three use cases (Order,
SpecialOrder, and NormalOrder) and one actor which is the customer.
The SpecialOrder and NormalOrder use cases are extended from Order use case.
Hence, they have extended relationship. Another important point is to identify the
system boundary, which is shown in the picture. The actor Customer lies outside the
system as it is an external user of the system.

In forward engineering, use case diagrams are used to make test cases and in
reverse engineering use cases are used to prepare the requirement details from the
existing application.
Use case diagrams can be used for −
​ Requirement analysis and high level design.
​ Model the context of a system.
​ Reverse engineering.
​ Forward engineering.
Sample Use Case Diagrams for Practise
ER (Entity Relationship) Diagram in DBMS

○ ER model stands for an Entity-Relationship model. It is a high-level data


model. This model is used to define the data elements and relationship for a
specified system.
○ It develops a conceptual design for the database. It also develops a very
simple and easy to design view of data.
○ In ER modeling, the database structure is portrayed as a diagram called an
entity-relationship diagram.

For example, Suppose we design a school database. In this database, the student
will be an entity with attributes like address, name, id, age, etc. The address can be
another entity with attributes like city, street name, pin code, etc and there will be a
relationship between them.
Component of ER Diagram

1. Entity:
An entity may be any object, class, person or place. In the ER diagram, an entity can
be represented as rectangles.

Consider an organization as an example- manager, product, employee, department


etc. can be taken as an entity.

a. Weak Entity

An entity that depends on another entity called a weak entity. The weak entity
doesn't contain any key attribute of its own. The weak entity is represented by a
double rectangle.

2. Attribute

The attribute is used to describe the property of an entity. Eclipse is used to


represent an attribute.

For example, id, age, contact number, name, etc. can be attributes of a student.

a. Key Attribute
The key attribute is used to represent the main characteristics of an entity. It
represents a primary key. The key attribute is represented by an ellipse with the text
underlined.

b. Composite Attribute

An attribute that composed of many other attributes is known as a composite


attribute. The composite attribute is represented by an ellipse, and those ellipses
are connected with an ellipse.

c. Multivalued Attribute

An attribute can have more than one value. These attributes are known as a
multivalued attribute. The double oval is used to represent multivalued attribute.

For example, a student can have more than one phone number.
d. Derived Attribute

An attribute that can be derived from other attribute is known as a derived attribute.
It can be represented by a dashed ellipse.

For example, A person's age changes over time and can be derived from another
attribute like Date of birth.

3. Relationship

A relationship is used to describe the relation between entities. Diamond or rhombus


is used to represent the relationship.

Types of relationship are as follows:


a. One-to-One Relationship

When only one instance of an entity is associated with the relationship, then it is
known as one to one relationship.

For example, A female can marry to one male, and a male can marry to one female.

b. One-to-many relationship

When only one instance of the entity on the left, and more than one instance of an
entity on the right associates with the relationship then this is known as a
one-to-many relationship.

For example, Scientist can invent many inventions, but the invention is done by the
only specific scientist.

c. Many-to-one relationship

When more than one instance of the entity on the left, and only one instance of an
entity on the right associates with the relationship then it is known as a many-to-one
relationship.

For example, Student enrolls for only one course, but a course can have many
students.
d. Many-to-many relationship

When more than one instance of the entity on the left, and more than one instance of
an entity on the right associates with the relationship then it is known as a
many-to-many relationship.

For example, Employee can assign by many projects and project can have many
employees.

Notation of ER diagram

Database can be represented using the notations. In ER diagram, many notations are
used to express the cardinality. These notations are as follows:
TRAVEL AGENCY EXAMPLE

STUDENT DETAILS EXAMPLE

ER Diagrams Symbols & Notations

Entity Relationship Diagram Symbols & Notations mainly contains three basic
symbols which are rectangle, oval and diamond to represent relationships between
elements, entities and attributes. There are some sub-elements which are based on
main elements in ERD Diagram. ER Diagram is a visual representation of data that
describes how data is related to each other using different ERD Symbols and
Notations.
Following are the main components and its symbols in ER Diagrams:
● Rectangles: This Entity Relationship Diagram symbol represents entity types
● Ellipses : Symbol represent attributes
● Diamonds: This symbol represents relationship types
● Lines: It links attributes to entity types and entity types with other relationship
types
● Primary key: attributes are underlined
● Double Ellipses: Represent multi-valued attributes

ER Diagram Symbols

ER Diagrams Symbols & Notations

Entity Relationship Diagram Symbols & Notations mainly contains three basic
symbols which are rectangle, oval and diamond to represent relationships between
elements, entities and attributes. There are some sub-elements which are based on
main elements in ERD Diagram. ER Diagram is a visual representation of data that
describes how data is related to each other using different ERD Symbols and
Notations.
Following are the main components and its symbols in ER Diagrams:
● Rectangles: This Entity Relationship Diagram symbol represents entity types
● Ellipses : Symbol represent attributes
● Diamonds: This symbol represents relationship types
● Lines: It links attributes to entity types and entity types with other relationship
types
● Primary key: attributes are underlined
● Double Ellipses: Represent multi-valued attributes
ER Diagram Symbols

Components of the ER Diagram

This model is based on three basic concepts:


● Entities
● Attributes
● Relationships
ER Diagram Examples
For example, in a University database, we might have entities for Students, Courses,
and Lecturers. Students entity can have attributes like Rollno, Name, and DeptID.
They might have relationships with Courses and Lecturers.
WHAT IS ENTITY?

A real-world thing either living or non-living that is easily recognizable and


nonrecognizable. It is anything in the enterprise that is to be represented in our
database. It may be a physical thing or simply a fact about the enterprise or an event
that happens in the real world.
An entity can be place, person, object, event or a concept, which stores data in the
database. The characteristics of entities are must have an attribute, and a unique
key. Every entity is made up of some ‘attributes’ which represent that entity.
Examples of entities:
● Person: Employee, Student, Patient
● Place: Store, Building
● Object: Machine, product, and Car
● Event: Sale, Registration, Renewal
● Concept: Account, Course
Notation of an Entity
Entity set:
Student
An entity set is a group of similar kind of entities. It may contain entities with
attribute sharing similar values. Entities are represented by their properties, which
also called attributes. All attributes have their separate values. For example, a
student entity may have a name, age, class, as attributes.

Example of Entities:
A university may have some departments. All these departments employ various
lecturers and offer several programs.
Some courses make up each program. Students register in a particular program and
enroll in various courses. A lecturer from the specific department takes each course,
and each lecturer teaches a various group of students.
Relationship

Relationship is nothing but an association among two or more entities. E.g., Tom
works in the Chemistry department.
Entities take part in relationships. We can often identify relationships with verbs or
verb phrases.
For example:
● You are attending this lecture
● I am giving the lecture
● Just loke entities, we can classify relationships according to
relationship-types:
● A student attends a lecture
● A lecturer is giving a lecture.

Weak Entities

A weak entity is a type of entity which doesn’t have its key attribute. It can be
identified uniquely by considering the primary key of another entity. For that, weak
entity sets need to have participation.

In above ER Diagram examples, “Trans No” is a discriminator within a group of


transactions in an ATM.
Let’s learn more about a weak entity by comparing it with a Strong Entity
Strong Entity Set Weak Entity Set

Strong entity set always has a primary It does not have enough attributes to
key. build a primary key.

It is represented by a rectangle symbol. It is represented by a double rectangle


symbol.
It contains a Primary key represented by It contains a Partial Key which is
the underline symbol. represented by a dashed underline
symbol.

The member of a strong entity set is The member of a weak entity set called
called as dominant entity set. as a subordinate entity set.

Primary Key is one of its attributes In a weak entity set, it is a combination


which helps to identify its member. of primary key and partial key of the
strong entity set.

In the ER diagram the relationship The relationship between one strong


between two strong entity set shown by and a weak entity set shown by using
using a diamond symbol. the double diamond symbol.

The connecting line of the strong entity The line connecting the weak entity set
set with the relationship is single. for identifying relationship is double.

Attributes

It is a single-valued property of either an entity-type or a relationship-type.


For example, a lecture might have attributes: time, date, duration, place, etc.
An attribute in ER Diagram examples, is represented by an Ellipse

Types of Attributes Description


Simple attribute Simple attributes can’t be divided any
further. For example, a student’s contact
number. It is also called an atomic
value.

Composite attribute It is possible to break down composite


attribute. For example, a student’s full
name may be further divided into first
name, second name, and last name.

Derived attribute This type of attribute does not include in


the physical database. However, their
values are derived from other attributes
present in the database. For example,
age should not be stored directly.
Instead, it should be derived from the
DOB of that employee.

Multivalued attribute Multivalued attributes can have more


than one values. For example, a student
can have more than one mobile number,
email address, etc.
Cardinality

Defines the numerical attributes of the relationship between two entities or entity
sets.
Different types of cardinal relationships are:
● One-to-One Relationships
● One-to-Many Relationships
● May to One Relationships
● Many-to-Many Relationships
1.One-to-one:
One entity from entity set X can be associated with at most one entity of entity set Y
and vice versa.
Example: One student can register for numerous courses. However, all those courses
have a single line back to that one student.

2.One-to-many:
One entity from entity set X can be associated with multiple entities of entity set Y,
but an entity from entity set Y can be associated with at least one entity.
For example, one class is consisting of multiple students.
3. Many to One
More than one entity from entity set X can be associated with at most one entity of
entity set Y. However, an entity from entity set Y may or may not be associated with
more than one entity from entity set X.
For example, many students belong to the same class.

4. Many to Many:
One entity from X can be associated with more than one entity from Y and vice versa.
For example, Students as a group are associated with multiple faculty members, and
faculty members can be associated with multiple students.

How to Create an Entity Relationship Diagram (ERD)

Now in this ERD Diagram Tutorial, we will learn how to create an ER Diagram.
Following are the steps to create an ER Diagram:

Step 1) Entity Identification

We have three entities


● Student
● Course
● Professor

Step 2) Relationship Identification

We have the following two relationships


● The student is assigned a course
● Professor delivers a course

Step 3) Cardinality Identification

For them problem statement we know that,


● A student can be assigned multiple courses
● A Professor can deliver only one course

Step 4) Identify Attributes

You need to study the files, forms, reports, data currently maintained by the
organization to identify attributes. You can also conduct interviews with various
stakeholders to identify entities. Initially, it’s important to identify the attributes
without mapping them to a particular entity.
Once, you have a list of Attributes, you need to map them to the identified entities.
Ensure an attribute is to be paired with exactly one entity. If you think an attribute
should belong to more than one entity, use a modifier to make it unique.
Once the mapping is done, identify the primary Keys. If a unique key is not readily
available, create one.
Entity Primary Key Attribute
Student Student_ID StudentName

Professor Employee_ID ProfessorName

Course Course_ID CourseName

For Course Entity, attributes could be Duration, Credits, Assignments, etc. For the
sake of ease we have considered just one attribute.

Step 5) Create the ERD Diagram

A more modern representation of Entity Relationship Diagram Example


EXAMPLES OF ER DIAGRAMS
Lucidchart
Lucidchart is a web-based diagramming application that allows users to visually
collaborate on drawing, revising and sharing charts and diagrams, and improve
processes, systems, and organizational structures.It is produced by Lucid Software
Inc., based in Utah, United States and co-founded by Ben Dilts and Karl
Sun.Lucidchart is used by companies such as Google, GE, NBC Universal, and
Amazon.

Lucidchart is entirely browser-based, running on browsers that support HTML5. This


means it does not require plugins or updates of a third-party software like Adobe Flash.
The platform supports real-time collaboration, allowing all users to work
simultaneously on projects and see each user’s additions reflected in real time. All data
is encrypted and stored in secure data centers.
Additional features include:
● A drag-and-drop interface
● Real-time co-authoring, shape-specific comments, and collaborative cursors
● Data linking
● Auto-visualization to generate org charts and ERDs
● SQL import and export capabilities
Lucidchart also supports importing files from draw.io, Gliffy, OmniGraffle, and
Microsoft Visio. The platform is integrated with Google Workspace and Drive,
Microsoft Teams and other Office products, Atlassian’s Jira and Confluence,
Salesforce, GitHub, Slack, and others.
What is a Test Case?
A test case refers to the actions required to verify a specific feature or functionality in
software testing. The test case details the steps, data, prerequisites, and postconditions
necessary to verify a feature.
It will lay out particular variables that QAs need to compare expected and actual results
to conclude if the feature works. Test case components mention input, execution, and
expected output/response. It tells engineers what to do, how to do it, and what results
are acceptable.

The Objective of Writing Test Cases


● To validate specific features and functions of the software.
● To guide testers through their day-to-day hands-on activity.
● To record a catalog of steps undertaken, which can be revisited in the event of a
bug popping up.
● To provide a blueprint for future projects and testers so they don’t have to start
work from scratch.
● To help detect usability issues and design gaps early on.

● To help new testers and devs quickly pick up testing, even if they join in the
middle of an ongoing project.

Standard Test Case Format


● Test Case ID
● Test Scenario
● Test Steps
● Prerequisites
● Test Data
● Expected/Intended Results
● Actual Results

● Test Status – Pass/Fail


While writing test cases, remember to include:

❖ A reasonable description of the requirement


❖ A description of the test process
❖ Details related to testing setup: version of the software under test, data points,
OS, hardware, security clearance, date, time, prerequisites, etc.
❖ Any related documents or attachments testers will require

❖ Alternative to prerequisites, if they exist

How to write Test Cases (Test Case


Example)
1. Let’s build a test case example based on a specific scenario. Here is a sample
case.

2. Test Case ID: #BST001


3. Test Scenario: To authenticate a successful user login on Gmail.com
4. Test Steps:
a. The user navigates to Gmail.com.
b. The user enters a registered email address in the’ email’ field.
c. The user clicks the ‘Next’ button.
d. The user enters the registered password.

e. The user clicks ‘Sign In.’


5. Prerequisites: A registered Gmail ID with a unique username and password.
6. Browser: Chrome v 86. Device: Samsung Galaxy Tab S7.
7. Test Data: Legitimate username and password.
8. Expected/Intended Results: Once username and password are entered, the web
page redirects to the user’s inbox, displaying and highlighting new emails at the top.
9. Actual Results: As Expected

10. Test Status – Pass/Fail: Pass

How to Create a Test Case Using JIRA


This task offers an example of how to create a test case, and it highlights important aspects
of the creation process.

1. Select a project and click Tests.

2.
3. In the Folders panel, click Create Folder, name the folder, then click the check.

4.
5. The new folder is saved.
– OR –
Click an existing folder in which you want to create a new test case.
6. Click New to create a new test case.

7.
8. The Create Test Case screen appears.
9. On the Details tab, add your desired information.

Click the image to enlarge it.


● Folder is the destination of your test case. You specified a folder in Step 2.
● Status is not related to an execution result. It’s the status of the readiness of the test to
be planned and executed.
● Components are obtained from Jira and can be added/managed on the Jira project’s
administration page.
10. Click the Test Script tab, and fill in the test-case steps.

Add and delete options appear when focus is on a step. You can drag-and-drop to reorder
steps, as well.
11. Fill out the information on the remaining tabs.
● On the Traceability tab, use to link an existing issue from Jira to the test case, or use +
to create and link a new issue to the test case. You can also link Web URLs.
● On the Execution tab, you can track previous test-execution results.
● On the Attachments tab, you can attach files to the test case.
12. Click Save.
The test case saves, and a notification appears on the screen.
EXAMPLE TEST CASE SCENARIO
What is GitHub?

GitHub is a code hosting platform for collaboration and version control.

GitHub lets you (and others) work together on projects.

Sign up for GitHub at https://github.com/:

GitHub is a Git repository hosting service. GitHub also facilitates with many of its
features, such as access control and collaboration. It provides a Web-based
graphical interface.

GitHub is an American company. It hosts source code of your project in the form of
different programming languages and keeps track of the various changes made by
programmers.
Benefits of GitHub
GitHub can be separated as the Git and the Hub. GitHub service includes access
controls as well as collaboration features like task management, repository hosting,
and team management.

The key benefits of GitHub are as follows.

○ It is easy to contribute to open source projects via GitHub.

○ It helps to create an excellent document.

○ You can attract recruiter by showing off your work. If you have a profile on
GitHub, you will have a higher chance of being recruited.

○ It allows your work to get out there in front of the public.

○ You can track changes in your code across versions

You might also like