software record
software record
SOFTWARE ENGINEERING
LABORATORY MANUAL & RECORD
NAME
ROLL No.
SEMESTER &
IV 2022-2023
ACADEMIC YEAR
MATURI VENKATA SUBBA RAO (MVSR) ENGINEERING COLLEGE
(An Autonomous Institution)
(Sponsored by Matrusri Education Society, Estd. 1980)
Affiliated to Osmania University & Recognized ay AICTE
Nadergul (PO), Ballarpur (M), RR Dist., Hyderabad - 501510
Certificate
Department of COMPUTER SCIENCE & ENGINEERING
HOD, CSE
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
VISION
● To impart technical education of the highest standards, producing competent and confident
engineers with an ability to use computer science knowledge to solve societal problems.
MISSION
● To make the learning process exciting, stimulating and interesting.
● To impart adequate fundamental knowledge and soft skills to students.
● To expose students to advanced computer technologies in order to excel in engineering
practices by bringing out the creativity in students.
● To develop economically feasible and socially acceptable software.
The Bachelor’s program in Computer Science and Engineering is aimed at preparing graduates who
will:-
PEO-1: Achieve recognition through demonstration of technical competence for successful
execution of software projects to meet customer business objectives.
PEO-2: Practice life-long learning by pursuing professional certifications, higher education
or research in the emerging areas of information processing and intelligent systems at a
global level.
PEO-3: Contribute to society by understanding the impact of computing using a
multidisciplinary and ethical approach.
At the end of the program the students (Engineering Graduates) will be able to:
1. Engineering knowledge: Apply knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering
problems.
2. Problem analysis: Identify, formulate, review research literature, and analyse complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet specified needs with appropriate
consideration for public health and safety, and the cultural, societal, and environmental
considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and
research methods including design of experiments, analysis and interpretation of data, and
synthesis of the information to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex engineering
activities with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and
need for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as being able to comprehend and
write effective reports and design documentation, make effective presentations, and give
and receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.
12. Lifelong learning: Recognize the need for, and have the preparation and ability to engage
in independent and life-long learning in the broadest context of technological change.
PSO1: Demonstrate competence to build effective solutions for computational real-world problems
using software and hardware across multi-disciplinary domains.
PSO2: Adapt to current computing trends for meeting the industrial and societal needs through a
holistic professional development leading to pioneering careers or entrepreneurship.
SOFTWARE ENGINEERING LAB
Course Objectives:
Course Outcomes:
SYLLABUS
I. FORWARD ENGINEERING
Students have to form a team with a batch size of two or three and take up a case study based
project to analyze, plan, design UML models and create a prototypical model (by identifying
deliverables) by coding the developed designs and finally document considering any one example
of the following domains:-
1. Academics (Eg: Course Registration System, Student marks analyzing system)
2. Health Care (Eg: Expert system to prescribe medicines for given symptoms, Remote
Diagnostics, Patient/Hospital Management System)
3. Finance (Eg: Banking:ATM/NetBanking, UPI:PayTM/PhonePay, Stocks:Zerodha)
4. E-Commerce (Eg: various online shopping portals like FlipKart/Amazon/Myntra)
5. Logistics (Eg. Postal/Courier:IndiaPost/DTDC/UPS/FedEx, Freight:Maersk)
6. Hospitality (Eg: Tourism Management:Telangana Tourism/Incredible India, Event
Management: MeraEvents/BookMyShow/Explara/EventBrite)
7. Social Networking (Eg: LinkedIn, FaceBook, Shaadi.com, BharatMatrimony, Tinder)
8. Customer Support (Eg. Banking Ombudsman,Indian Consumer Complaints Forum)
9. Booking/Ticketing (Eg. for Food:Zomato/Swiggy/BigBasket/Grofers/JioMart,
Hotel:OYO/Trivago or Travel: {Cars:Uber/OLA/Zoom, Railways:IRCTC,
Buses:OnlineTSRTC/RedBus/AbhiBus, Flights:MakeMyTrip/Goibibo, Ships:Lakport})
III. TESTING: Prepare Test Plan and develop Test Case Hierarchy to monitor or uncover/report
errors using manual/automated testing tools
10
11
12
13
14
15
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Model
A model is a simplified representation of a thing. The model captures the important aspects of
the thing being modeled and leaves out the rest of the details. The benefit of models is that they
can be represented in a medium (2D or 3D) we like.
A model of a software system can be developed using a modeling language like UML. The
model will have both semantics and notation and can take various forms that include both
pictures and text. The model is intended to be easier to use for certain purposes than the final
system.
UML is a pictorial language used to make software blueprints for non-software systems as well.
UML is NOT a programming language but tools used to draw models can generate code in various
languages.
UML has a direct relation with object oriented analysis, design and programming.
→ OO Analysis: identify objects and describe them in a proper way
→ OO Design: Making a design by identifying relationships among objects
→ OO Programming: implementation using OO languages
Fundamental concepts of the object-oriented world −
1. Objects − Objects represent an entity and the basic building block.
2. Class − Class is the blueprint of an object.
3. Abstraction − Abstraction represents the behavior of a real world entity.
4. Encapsulation − Encapsulation is the mechanism of binding the data together and hiding
them from the outside world.
5. Inheritance − Inheritance is the mechanism of making new classes from existing ones.
6. Polymorphism − It defines the mechanism to exists in different forms.
Goal of UML is to provide a standard notation that can be used by all object-oriented methods and
to select and integrate the best elements of precursor notations.
Page No. 1
SE Lab, BE (CSE), Dept. of CSE, MVSREC
History of UML
1993 Booch was working in Rational Corporation along with other members.
1994, Rumbaugh joined Rational. Unification to combine Booch and Rumbaugh’s concepts
1995, Jacobson joined Rational. Unification to combine Booch, Rumbaugh and Jacobson’s concepts
named as Unified Modeling Language (UML).
1996, Proposal to Object Management Group (OMG) for recognizing UML as standard language.
1997, OMG recognized UML as a standard language.
2000, ISO recognized UML as a standard language. The version of UML was 1.0.
2004, another major upgrade was made to UML’s specification which is known as UML 2.0.
Why UML?
The UML has a lot of different diagrams (models) to look at a system from many different
viewpoints. A software development will have many stakeholders playing a part; For Example:
Analysts, Designers, Coders, Testers, QA, The Customer and Technical Authors. All of these
people are interested in different aspects of the system, and each of them require a different level
of detail. For example, a coder needs to understand the design of the system and be able to convert
the design to a low level code. The UML attempts to provide a language so expressive that all
stakeholders can benefit from at least one UML diagram.
Complex applications need collaboration and planning from multiple teams and hence require a
clear and concise way to communicate amongst them. Businessmen do not understand the code. So
UML becomes essential to communicate with non-programmers essential requirements,
functionalities and processes of the system. A lot of time is saved down the line when teams are
able to visualize processes, user interactions and static structure of the system
Page No. 2
SE Lab, BE (CSE), Dept. of CSE, MVSREC
1.1. Things
Things are the most important building blocks of UML. Things can be −
1.1.1. Structural
1.1.2. Behavioral
1.1.3. Grouping
1.1.4. Annotational
Use case −Use case represents a set of actions performed by a system for a
specific goal.
Node − A node can be defined as a physical element that exists at run time.
Page No. 3
SE Lab, BE (CSE), Dept. of CSE, MVSREC
State machine − State machine is useful when the state of an object in its
life cycle is important. It defines the sequence of states an object goes
through in response to events. Events are external factors responsible for
state change
1.2. Relationship
Relationship is another most important building block of UML. It shows how the elements
are associated with each other and this association describes the functionality of an
application.
There are four kinds of relationships available.
Dependency
Dependency is a relationship between two things in which change in one element
also affects the other.
Association
Association is basically a set of links that connects the elements of a UML model.
It also describes how many objects are taking part in that relationship.
Generalization
Generalization can be defined as a relationship which connects a specialized
element with a generalized element. It basically describes the inheritance
relationship in the world of objects.
Page No. 4
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Realization
Realization can be defined as a relationship in which two elements are connected.
One element describes some responsibility, which is not implemented and the other
one implements them. This relationship exists in case of interfaces.
UML diagrams are the ultimate output of the entire discussion. All the elements,
relationships are used to make a complete UML diagram and the diagram represents a
system.
The visual effect of the UML diagram is the most important part of the entire process. All
the other elements are used to make it complete.
UML includes the following nine diagrams, the details of which are described in the
subsequent chapters.
UML makes the use of elements and forms associations between them to form diagrams.
Diagrams in UML can be broadly classified as:
➢ Structural Diagrams – Capture static aspects of a system
➢ Behavior Diagrams – Capture dynamic aspects of the system
Page No. 5
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 7
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 8
SE Lab, BE (CSE), Dept. of CSE, MVSREC
➢ Normal Order
Now the customer object (C) is associated with three order objects (O1, O2, and O3). These order
objects are associated with special order and normal order objects (S1, S2, and N1). The customer
has the following three orders with different numbers (12, 32 and 40) for the particular time
considered.
The customer can increase the number of orders in the future and in that scenario the object diagram
will reflect that. If order, special order, and normal order objects are observed then you will find
that they have some values.
For orders, the values are 12, 32, and 40 which implies that the objects have these values for a
particular moment (here the particular time when the purchase is made is considered as the
moment) when the instance is captured
The same is true for special order and normal order objects which have number of orders as 20,
30, and 60. If a different time of purchase is considered, then these values will change accordingly.
The following object diagram has been drawn considering all the points mentioned above
Page No. 9
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Class diagrams have a lot of properties to consider while drawing but here the diagram will be
considered from a top level view.
Class diagram is basically a graphical representation of the static view of the system and represents
different aspects of the application. A collection of class diagrams represent the whole system.
The following class diagram has been drawn considering all the points mentioned above.
Page No. 10
SE Lab, BE (CSE), Dept. of CSE, MVSREC
implementing a system, it is very important to clarify different states of an object during its lifetime
and state chart diagrams are used for this purpose. When these states and events are identified, they
are used to model it and these models are used during the implementation of the system.
If we look into the practical implementation of the Statechart diagram, then it is mainly used to
analyze the object states influenced by events. This analysis is helpful to understand the system
behavior during its execution.
The main usage can be described as −
➢ To model the object states of a system.
➢ To model the reactive system. Reactive system consists of reactive objects.
➢ To identify the events responsible for state changes.
➢ Forward and reverse engineering.
four activities are identified which are associated with conditions. One important point should be
clearly understood that an activity diagram cannot be exactly matched with the code. The activity
diagram is made to understand the flow of activities and is mainly used by the business users
Following diagram is drawn with the four main activities −
➢ Send order by the customer
➢ Receipt of the order
➢ Confirm the order
➢ Dispatch the order
After receiving the order request, condition checks are performed to check if it is normal or special
order. After the type of order is identified, dispatch activity is performed and that is marked as the
termination of the process.
Page No. 14
SE Lab, BE (CSE), Dept. of CSE, MVSREC
INTERACTION DIAGRAMS
The diagrams are used to describe some type of interactions among the different elements in the
model. This interaction is a part of dynamic behavior of the system.
This interactive behavior is represented in UML by two diagrams known as Sequence diagram and
Collaboration diagram. The basic purpose of both the diagrams are similar.
Sequence diagram emphasizes on time sequence of messages and collaboration diagram
emphasizes on the structural organization of the objects that send and receive messages.
Purpose of Interaction Diagrams
The purpose of interaction diagrams is to visualize the interactive behavior of the system.
Visualizing the interaction is a difficult task. Hence, the solution is to use different types of models
to capture the different aspects of the interaction.
Sequence and collaboration diagrams are used to capture the dynamic nature but from a different
angle.
The purpose of interaction diagram is −
● To capture the dynamic behavior of a system.
● To describe the message flow in the system.
● To describe the structural organization of the objects.
● To describe the interaction among objects.
How to Draw an Interaction Diagram?
As we have already discussed, the purpose of interaction diagrams is to capture the dynamic aspect
of a system. So to capture the dynamic aspect, we need to understand what a dynamic aspect is and
how it is visualized. Dynamic aspect can be defined as the snapshot of the running system at a
particular moment
We have two types of interaction diagrams in UML. One is the sequence diagram and the other is
the collaboration diagram. The sequence diagram captures the time sequence of the message flow
from one object to another and the collaboration diagram describes the organization of objects in
a system taking part in the message flow.
Following things are to be identified clearly before drawing the interaction diagram
● Objects taking part in the interaction.
● Message flows among the objects.
● The sequence in which the messages are flowing.
● Object organization.
Page No. 15
SE Lab, BE (CSE), Dept. of CSE, MVSREC
The main purpose of both the diagrams are similar as they are used to capture the dynamic behavior
of a system. However, the specific purpose is more important to clarify and understand.
Sequence diagrams are used to capture the order of messages flowing from one object to another.
Collaboration diagrams are used to describe the structural organization of the objects taking part
in the interaction. A single diagram is not sufficient to describe the dynamic aspect of an entire
system, so a set of diagrams are used to capture it as a whole.
Interaction diagrams are used when we want to understand the message flow and the structural
organization. Message flow means the sequence of control flow from one object to another.
Structural organization means the visual organization of the elements in a system.
Interaction diagrams can be used −
➢ To model the flow of control by time sequence.
➢ To model the flow of control by structural organizations.
➢ For forward engineering.
➢ For reverse engineering.
Page No. 17
SE Lab, BE (CSE), Dept. of CSE, MVSREC
After identifying the artifacts, the following points need to be kept in mind.
➢ Use a meaningful name to identify the component for which the diagram is to be drawn.
➢ Prepare a mental layout before producing using tools.
➢ Use notes for clarifying important points.
Following is a component diagram for order management system. Here, the artifacts are files. The
diagram shows the files in the application and their relationships. In actual, the component diagram
also contains DLLs, libraries, folders, etc.
In the following diagram, four files are identified and their relationships are produced. Component
diagram cannot be matched directly with other UML diagrams discussed so far as it is drawn for a
completely different purpose.
The following component diagram has been drawn considering all the points mentioned above.
Page No. 18
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 19
SE Lab, BE (CSE), Dept. of CSE, MVSREC
2. Rules to connect the building blocks (Mentioned as How to draw? Within each diagram)
Sometimes, the user might need to represent information through notations which are not available
in UML.
In such circumstances, we can use the extensibility mechanisms like stereotypes, tagged values and
constraints which are a part of common mechanisms in UML.
3.1.Specifications
3.2.Adornments
3.3.Common Divisions
3.4.Extensibility Mechanisms
3.1. Specifications
Specification provides a textual statement describing interesting aspects of a system
Note
A note is used to specify things like: requirements, observations, reviews,
explanations and constraints. A note may contain simple text or graphical symbols.
A note has no effect on the semantics of a model means it does not alter the meaning
of the model.
3.2. Adornments
➢ Textual/graphical items added to the basic notation of an element
➢ They are used for explicit visual representation of those aspects of an element that
are beyond the most important
Examples: The basic notation of association is line, but this could be adorned with
additional details, such as the role names and multiplicity of each end
Similarly, a class notation may highlight the most important aspects of a class, i.e.,
name, attributes and operations. To show access specifies for the attributes and
methods of a class adornments such as +, -, # are used.
Page No. 21
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Extensibility mechanisms can be classified into Stereotypes, Tagged values & Constraints.
Stereotypes
➢ Stereotypes are used to create new building blocks from existing blocks
➢ New building blocks are domain-specific
➢ Stereotypes are used to extend the vocabulary of a system
➢ Graphically represented as a name enclosed by guillemets (« »)
Tagged Values
➢ Tagged values are used to add to the information of the element (not of its
instances)
➢ Stereotypes help to create new building blocks, whereas tagged values help
to create new attributes
➢ These are commonly used to specify information relevant to code
generation, configuration management and so on
Constraints
➢ Constraints are used to create rules for the model
➢ Rules that impact the behavior of the model, and specify the conditions that
must be met
➢ Can apply to any element in the model, i.e., attributes of a class,
relationship
➢ Graphically represented as a string enclosed by braces {....} and placed
near the associated elements or connected to that elements by dependency
relationships
Page No. 22
SE Lab, BE (CSE), Dept. of CSE, MVSREC
NOTATIONS
Graphical notations used in structural things are most widely used in UML. These are considered
as the nouns of UML models.
Structural Things
Class Notation
UML class is represented by the following figure. The diagram is divided into four parts.
➢ The top section is used to name the class.
➢ The second one is used to show the attributes of the class.
➢ The third section is used to describe the operations performed by the class.
➢ The fourth section is optional to show any additional components.
Classes are used to represent objects. Objects can be anything having properties and
responsibility.
Object Notation
The object is represented in the same way as the class. The only difference is the name
which is underlined as shown in the following figure.
Interface Notation
Interface is represented by a circle as shown in the following figure. It has a name which is
generally written below the circle.
Page No. 23
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Interface is used to describe the functionality without implementation. Interface is just like
a template where you define different functions, not the implementation. When a class
implements the interface, it also implements the functionality as per requirement.
Collaboration Notation
Collaboration is represented by a dotted eclipse as shown in the following figure. It has a
name written inside the eclipse.
Actor Notation
An actor can be defined as some internal or external entity that interacts with the system.
An actor is used in a use case diagram to describe the internal or external entities.
Page No. 24
SE Lab, BE (CSE), Dept. of CSE, MVSREC
The usage of Initial State Notation is to show the starting point of a process.
The usage of Final State Notation is to show the termination point of a process.
Component Notation
A component in UML is shown in the following figure with a name inside. Additional
elements can be added wherever required.
Component is used to represent any part of a system for which UML diagrams are made.
Node Notation
A node in UML is represented by a square box as shown in the following figure with a
name. A node represents the physical component of the system.
Node is used to represent the physical part of a system such as the server, network, etc.
Page No. 25
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Behavioral Things
Interaction Notation
Interaction is basically a message exchange between two UML components. The following
diagram represents different notations used in an interaction.
State machine is used to describe different states of a system component. The state can be
active, idle, or any other depending upon the situation.
Page No. 26
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Grouping Things
Organizing the UML models is one of the most important aspects of the design. In UML,
there is only one element available for grouping and that is package.
Package Notation
Package notation is shown in the following figure and is used to wrap the components of a
system.
Annotational Things
Note Notation
This notation is shown in the following figure. These notations are used to provide
necessary information of a system.
Relationships
Dependency Notation
Dependency is an important aspect in UML elements. It describes the dependent elements
and the direction of dependency.
Dependency is represented by a dotted arrow as shown in the following figure. The arrow
head represents the independent element and the other end represents the dependent
element.
Association Notation
Association describes how the elements in a UML diagram are associated. In simple words,
it describes how many elements are taking part in an interaction.
Association is represented by a dotted line with (without) arrows on both sides. The two
ends represent two associated elements as shown in the following figure. The multiplicity
is also mentioned at the ends (1, *, etc.) to show how many objects are associated.
Page No. 27
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Generalization Notation
Generalization describes the inheritance relationship of the object-oriented world. It is a
parent and child relationship.
Generalization is represented by an arrow with a hollow arrow head as shown in the
following figure. One end represents the parent element and the other end represents the
child element.
Extensibility Notation
All the languages (programming or modeling) have some mechanism to extend its
capabilities such as syntax, semantics, etc. UML also has the following mechanisms to
provide extensibility features.
➢ Stereotypes (Represents new elements)
➢ Tagged values (Represents new attributes)
➢ Constraints (Represents the boundaries)
Extensibility notations are used to enhance the power of the language. It is basically
additional elements used to represent some extra behavior of the system. These extra
behaviors are not covered by the standard available notations.
Page No. 28
SE Lab, BE (CSE), Dept. of CSE, MVSREC
CLASS DIAGRAM
Page No. 29
SE Lab, BE (CSE), Dept. of CSE, MVSREC
COMPONENT DIAGRAM
DEPLOYMENT DIAGRAM
Page No. 30
SE Lab, BE (CSE), Dept. of CSE, MVSREC
USE-CASE DIAGRAM
CLASS DIAGRAM
Page No. 31
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 32
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 33
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 34
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 35
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 36
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 37
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 38
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 39
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Title: __________________________________________
(Domain: _____________________)
Page No. 40
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 41
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 42
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 43
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Title: __________________________________________
(Domain: _____________________)
Page No. 44
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 45
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 46
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 47
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Pseudo Code:-
Page No. 48
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 49
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 50
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Pseudo Code:-
Page No. 51
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Title:
Description:
Page No. 52
SE Lab, BE (CSE), Dept. of CSE, MVSREC
TESTING
Apache JMeter can be used as a load testing tool for analyzing and measuring the performance of
a variety of services, with a focus on web applications.
JMeter can be used as a unit-test tool for JDBC database connections, FTP, LDAP, Web Services,
JMS, HTTP, generic TCP connections and OS native processes. One can also configure JMeter as
a monitor, although this is typically considered ad hoc rather than advanced monitoring. It can be
used for some functional testing as well.
JMeter architecture is based on plugins. Most of its "out of the box" features are implemented with
plugins.
The test plan will simulate making requests against a website. For this example, jMeter will test
an instance of localhost. The instance URL is
Open JMeter
Page No. 53
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Page No. 54
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Click on Start to play the test case (Green Arrow Play Button in the top)
Page No. 55
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Get to know about the importance of the listener through a google search
Try the various Listeners in the menu and also get to know their importance
Page No. 56
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Selenium is a portable framework for testing web applications. Selenium provides a playback
(formerly also recording) tool for authoring functional tests without the need to learn a test scripting
language (Selenium IDE).
Break point can be added by right clicking on any step recorded in selenium.
Control Flow
Selenium IDE comes with commands that enable you to add conditional logic and looping to your
tests.
Page No. 57
SE Lab, BE (CSE), Dept. of CSE, MVSREC
This enables you to execute commands (or a set of commands) only when certain conditions in your
application are met. Or execute command(s) repeatedly based on predefined criteria.
JavaScript Expressions
Conditions in your application are checked by using JavaScript expressions.
You can use the execute script or execute async script commands to run a snippet of JavaScript at
any point during your test and store the result in a variable. This variable can be used in a control
flow command.
You can also use JavaScript expressions directly in the control flow commands.
Available Commands
Control Flow commands work by specifying opening and closing commands to denote a set (or
block) of commands.
Here are each of the available control flow commands accompanied by their companion and/or
closing commands.
● if, else if, else, end
● times, end
● do, repeat if
● while, end
Following are examples of each.
Conditional Branching
Conditional branching enables you to change the behavior in your test.
If
This is the opening command for a conditional block.
Along with it you provide a JavaScript expression you would like to evaluate. This can consist of
variables created from prior JavaScript expressions in your test. This all goes in the target input
field of the if command.
If the expression evaluates to true then the test will execute the commands that follow it up until
the next conditional control flow command (e.g., else if, else, or end).
If the expression evaluates to false it will skip the commands that follow and jump to the next
relevant conditional control flow command (e.g., else if, else, or end).
Else if
This command is used within an if command block.
Page No. 58
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Just like with if it takes a JavaScript expression in the target input field to evaluate, executing either
the command branch that follows it, or skips to the next relevant control flow command (e.g., else
or end).
else
else is the final condition you can have in an if block. When none of the prior conditions are met,
this command branch will be executed.
After it's done it will jump to the end command.
end
This command terminates the conditional command block. Without it the command block is
incomplete and you'll receive a helpful error message letting you know when trying to run your test.
Looping
Looping enables you to iterate over a given set of commands.
times
With times you can specify a number of iterations you would like to perform a set of commands.
The number goes into the target input field of the times command.
To close the times command block be sure to use the end command.
do
You start this loop with the do command, followed by the command(s) that you want executed, and
end with the repeat if command. Repeat if takes a JavaScript expression you would like to evaluate
in the target input field.
The commands after the do will be executed first and then the expression in the repeat if will be
evaluated. If the expression returns true then the test will jump back to the do command and repeat
the sequence.
Page No. 59
SE Lab, BE (CSE), Dept. of CSE, MVSREC
This will continue until either the condition returns false or the infinite loop protection is triggered
-- which defaults to 1000 attempts. You can override this default by specifying a number in the
value input field of the repeat if command.
while
With while you provide a JavaScript expression you would like to evaluate in the target input field.
If it evaluates to true the command block that follows will execute until it reaches the end command.
Once done the test will jump back to the while command and repeat the same sequence over
(checking first to see if the condition evaluates to true or false).
To close the while command block use the end command.
The loop will retry until either the condition returns false or the infinite loop protection is triggered
-- which defaults to 1000 attempts. You can override this default by specifying a number in the
value input field of the while command.
Nesting Commands
You can nest control flow commands as necessary (e.g., an if block can go inside of a while block,
and vice versa).
Page No. 60
SE Lab, BE (CSE), Dept. of CSE, MVSREC
Syntax Validation
If you're not sure if your control flow syntax is correct try running your test to see. The IDE will
spot errors in the control flow syntax and call out the specific command that is incorrect or missing.
Page No. 61
SE Lab, BE (CSE), Dept. of CSE, MVSREC
time to carry out some behavior. State chart Visibility: A modifier to an Attribute or
diagram - A diagram that shows all possible Operation that indicates what code has access to
object states. the member. Visibility levels include Public,
State: In a State Diagram, this represents one Protected, and Private.
state of a system or subsystem: what it is doing Workflow - A set of activities that produces
at a point in time, as well as the values of its some specific results
data.
State Diagram: A diagram that shows States of
a system or subsystem, Transitions between
States, and the Events that cause the
Transitions. References
Static: A modifier to an Attribute to indicate
that there's only one copy of the Attribute
shared among all instances of the Classifier. A
modifier to an Operation to indicate that the 1. OMG (Object Management Group) -
Operation stands on its own and doesn't operate https://www.omg.org/
on one specific instance of the Classifier. 2. https://developer.ibm.com/articles/an-
Stereotype: A modifier applied to a Model introduction-to-uml/
element indicating something about it which
can't normally be expressed in UML. In 3. https://www.visual-paradigm.com/guide/uml-
essence, Stereotypes allow you to define your unified-modeling-language/what-is-uml/
own "dialect" of UML. 4. https://www.tutorialspoint.com/uml/index.htm
Subclass: A Class which inherits Attributes and
Operations that are defined by a Subclass via a
Generalization relationship.
Swimlane: An element of an Activity Diagram
that indicates what parts of a system or a
domain perform particular Activities. All
Activities within a Swimlane are the
responsibility of the Object, Component, or
Actor represented by the Swimlane.
Time Boxing - Each iteration will have a time
limit with specific goals.
Transition: In an Activity Diagram, represents
a flow of control from one Activity or Branch
or Merge or Fork or Join to another. In a State
Diagram, represents a change from one State to
another.
Transition Phase - The last phase of the
Rational Unified Process during which users
are trained on using the new system and the
system is made available to users.
UML - Unified Modeling Language utilizes
text and graphic documents to enhance the
analysis and design of software projects by
allowing more cohesive relationships between
objects.
Use Case: In a Use Case Diagram, represents
an action that the system takes in response to
some requests from an Actor.
Use Case Diagram: A diagram that shows
relations between Actors and Use Cases.
Page No. 64