Module 3
Module 3
MODULE 3
Understanding Requirements
➢Understanding the requirements of a problem is among the most difficult tasks that
you’ll face as a software engineer.
➢When you first think about it, developing a clear understanding of requirements
doesn’t seem that hard.
➢ Ralph Young’s book - “It’s your worst nightmare. A customer walks into your office,
sits down, looks you straight in the eye, and says, “I know you think you understand
what I said, but what you don’t understand is what I said is not what I meant.”
➢Invariably, this happens late in the project, after deadline commitments have been
made, reputations are on the line, and serious money is at stake.
Understanding Requirements
➢The broad spectrum of tasks and techniques that lead to an understanding of
requirements is called requirements engineering.
➢From a software process perspective, requirements engineering is a major software
engineering action that begins during the communication activity and continues into
the modeling activity.
➢It must be adapted to the needs of the process, the project, the product, and the
people doing the work.
2. Use case diagrams, which show the interactions between a system and its
environment.
3. Sequence diagrams, which show interactions between actors and the system and
between system components.
4. Class diagrams, which show the object classes in the system and the associations
between these classes.
5. State diagrams, which show how the system reacts to internal and external
events.
Types of Models
1. Context models
2. Interaction models
3. Structural models
4. Behavioural models
➢Social and organizational concerns may mean that the position of a system boundary
may be determined by non-technical factors. For example, a system boundary may be
deliberately positioned so that the analysis process can all be carried out on one site; or it
may be chosen so that a particularly difficult manager need not be consulted.
➢Once some decisions on the boundaries of the system have been made, part of the
analysis activity is the definition of that context and the dependencies that a system has
on its environment. Normally, producing a simple architectural model is the first step in
this activity.
Figure 1 is a simple context model that shows the patient
information system MHC-PMS and the other systems in
its environment.
You can see that the MHC-PMS is connected to an
appointments system and a more general patient record
system with which it shares data.
The system is also connected to systems for management
reporting and hospital bed allocation and a statistics
system that collects
information for research.
Figure 1: The context of the patient Finally, it makes use of a prescription system to generate
management system – MHC_PMS
prescriptions for patients’ medication.
➢Context models normally show that the environment includes several other
automated systems.
➢However, they do not show the types of relationships between the systems in the
environment and the system that is being specified.
➢External systems might produce data for or consume data from the system. They
might share data with the system, or they might be connected directly, through a
network or not connected at all. They might be physically co-located or located in
separate buildings.
➢All of these relations may affect the requirements and design of the system being
defined and must be taken into account.
➢Therefore, simple context models are used along with other models, such as
business process models.
➢These describe human and automated processes in which particular software
systems are used.
Figure 2: Process model of involuntary detention (It is a model of an important system
process that shows the processes in which the MHC-PMS is used)
➢Figure 2 is a UML activity diagram.
➢Activity diagrams are intended to show the activities that make up a system process and the flow of
control from one activity to another.
➢The start of a process is indicated by a filled circle; the end by a filled circle inside another circle.
➢Rectangles with round corners represent activities, that is, the specific sub-processes that must be
carried out.
➢The arrows represent the flow of work from one activity to another.
➢ When the flow from more than one activity leads to a solid bar then all of these activities must be
complete before progress is possible.
➢When the flow from a solid bar leads to a number of activities, these may be executed in
parallel.
➢ Therefore, in Figure 2, the activities to inform social care and the patient’s next of kin, and
to update the detention register may be concurrent.
➢ Arrows may be annotated with guards that indicate the condition when that flow is taken.
➢ In Figure 2, you can see guards showing the flows for patients who are dangerous and not
dangerous to society.
➢However, patients who are suicidal and so are a danger to themselves may be detained in an
appropriate ward in a hospital.
Interaction models
➢All systems involve interaction of some kind.
➢This can be user interaction, which involves user inputs and outputs, interaction between the
system being developed and other systems or interaction between the components of the system.
➢Modeling system to system interaction highlights the communication problems that may arise.
➢ Use case models and sequence diagrams present interaction at different levels of
detail and so may be used together.
➢ The details of the interactions involved in a high level use case may be documented in
a sequence diagram.
➢ The UML also includes communication diagrams that can be used to model
interactions which is not discussed here as they are an alternative representation of
sequence charts.
➢ In fact, some tools can generate a communication diagram from a sequence diagram.
Use Case Modelling
➢Use case modeling was originally developed by Jacobson et al. (1993) in the 1990s.
➢It was then incorporated into the first release of the UML (Rumbaugh et al., 1999).
➢A use case can be taken as a simple scenario that describes what a user expects from a system.
➢Each use case represents a discrete task that involves external interaction with a system.
➢In its simplest form, a use case is shown as an ellipse with the actors involved in the use case
represented as stick figures.
➢Figure 3 shows a use case from the MHC-PMS that represents the task of uploading data from the
MHC-PMS to a more general patient record system.
➢This more general system maintains summary data about a patient rather than the data about
each consultation, which is recorded in the MHC-PMS.
Figure 3: Transfer data use case
➢Notice that there are two actors in this use case: the operator who is transferring the data
and the patient record system.
➢The stick figure notation was originally developed to cover human interaction but it is also
now used to represent other external systems and hardware.
➢Formally, use case diagrams should use lines without arrows as arrows in the UML indicate
the direction of flow of messages.
➢Obviously, in a use case messages pass in both directions.
➢However, the arrows in Figure 3 are used informally to indicate that the medical receptionist
initiates the transaction and data is transferred to the patient record system.
➢Use case diagrams give a fairly simple overview of an interaction so you have to provide
more detail to understand what is involved.
➢This detail can either be a simple textual description, a structured description in a table, or
a sequence diagram.
➢You chose the most appropriate format depending on the use case and the level of detail
that you think is required in the model.
➢Figure 4 shows
a tabular description
of the
‘Transfer data’ use case.
The requirements document should be formulated and organized according to the standards of the organization.
The organizational standards are specified standards followed by the organization according to which the
system is to be developed.
The agreed actions is a list that displays the actions to be performed to resolve the problems
depicted in the problem list.
Requirements Review
Requirements validation determines whether the requirements are substantial to design
the system.
The problems encountered during requirements validation are listed below.
1.Unclear stated requirements
2.Conflicting requirements are not detected during requirements analysis
3.Errors in the requirements elicitation and analysis
4.Lack of conformance to quality standards.
To avoid the problems stated above, a requirements review is
conducted, which consists of a review team that performs a
systematic analysis of the requirements.
The review team consists of software engineers, users, and
other stakeholders who examine the specification to ensure that
the problems associated with consistency, omissions, and
errors are detected and corrected.
In the review meeting check list are:
1. Is the initial state of the system defined?
2. Is there a conflict between one requirement and the other?
3. Are all requirements specified at the appropriate level of abstraction?
4. Is the requirement necessary or does it represent an add-on feature that may not be essentially
implemented?
5. Is the requirement bounded and has a clear defined meaning?
6. Is each requirement feasible in the technical environment where the product or system is to be
used?
7. Is testing possible once the requirement is implemented?
8. Are requirements associated with performance, behavior, and operational characteristics clearly
stated?
9. Are requirements patterns used to simplify the requirements model?
10.Are the requirements consistent with the overall objective specified for the system/product?
11.Have all hardware resources been defined?
12.Is the provision for possible future modifications specified?
13.Are functions included as desired by the user (and stakeholder)?
14.Can the requirements be implemented in the available budget and technology?
15.Are the resources of requirements or any system model (created) stated clearly?
Other Requirements Validation Techniques
A number of other requirements validation techniques are used either individually or in
conjunction with other techniques to check the entire system or parts of the system. The
selection of the validation technique depends on the appropriateness and the size of the
system to be developed. Some of these techniques are listed below.
1. Test case generation: The requirements specified in the SRS document should be testable. The
test in the validation process can reveal problems in the requirement. In some cases test becomes
difficult to design, which implies that the requirement is difficult to implement and requires
improvement.
2. Automated consistency analysis: If the requirements are expressed in the form of structured or
formal notations, then CASE tools can be used to check the consistency of the system. A
requirements database is created using a CASE tool that checks the entire requirements in
the database using rules of method or notation. The report of all inconsistencies is identified and
managed.
3. Prototyping: Prototyping is normally used for validating and eliciting new requirements of the
system. This helps to interpret assumptions and provide an appropriate feedback about the
requirements to the user. For example, if users have approved a prototype, which consists of
graphical user interface, then the user interface can be considered validated.
Requirements Elicitation techniques
https://www.softwaretestinghelp.com/requirements-elicitation-techniques/
Requirements management in Agile
Agile requirements management is built on the principle of flexibility, so any
potential challenges are identified and resolved much earlier in
the process, minimizing expensive and costly rework. A few benefits of the agile
approach include:
Improved product design and delivery. A recent report suggests that best-in-class
RM solutions can significantly improve product design and delivery
for agile development teams.
products for the internet of things (IoT), and scaling Agile practices, AD&D
[application development and delivery] leaders long for something to bring
Outline the most important requirements. Identify what requirements are most essential
based on the high-level business strategy. These requirements may be supported by user
stories, functional requirements and more based on the specific client goals.
Transform to product features. This stage is about fine-tuning and translating the details
that any requirements are easily understood by anyone working to implement them. User
stories are linked to features and tasks, so that developers understand what they need to
do but also why they are doing it.
Collaboration and Buy-In
By integrating requirements management best practices into their quality assurance process,
companies can help teams increase efficiency and eliminate rework. According to the Carnegie
Mellon Software Engineering Institute, 60 to 80 percent of the cost of software development is in
rework. In other words, development teams are wasting the majority of their budgets on efforts
simple concept. It helps teams answer the question: Does everyone from business leaders to
product managers and project leaders to developers, QA managers and testers understand
what is being built and why?
When everyone is collaborating and has full context and visibility into the discussions, decisions
and changes involved in product development, they maintain high quality and almost always
ensure success.