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

Software Engineering

Uploaded by

davidbasra.seo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Software Engineering

Uploaded by

davidbasra.seo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Software Engineering

[Document subtitle]

[Date]

Allan Herrera
London school of international business
Table of Contents
Software Engineering................................................................................2
Software development Lifecycle............................................................2
Approaches and Functions of the Software Development Lifecycle.......2
Software Development.............................................................................3
Concept and processes..........................................................................3
Software Development Techniques and Tools........................................4
Software Deployment and Review.........................................................5
Software Planning and Implementation.................................................6
Software Monitoring Methods................................................................6
Software Engineering and Testing.............................................................7
Role of modelling languages..................................................................7
Benefits and Limitations of UML’s..........................................................8
Unified Modelling Language Tools..........................................................8
Class Diagrams Role in UML’s................................................................9
Making an Application in Microsoft Visio´s UML.....................................9
Software Testing and Validation...........................................................10
Software testing tools and benefits.....................................................11
Code Validation Techniques.................................................................12
Demonstration of Software Testing......................................................12
Bibliography............................................................................................14
Software Engineering
Software development Lifecycle
The software life cycle encompasses the stages a software product
undergoes from its inception to retirement. It begins with the initial
concept or requirements gathering, where the needs and objectives of
the software are identified and analyzed. This stage is critical as it lays
the foundation for what the software must achieve. Following this, the
design phase translates these requirements into a blueprint, detailing
how the software will be structured and how different components will
interact.

Once the design is set, the development phase begins, where the actual
coding takes place. This is where the abstract ideas are transformed into
executable code. Development is often iterative, involving cycles of
coding, testing, and refining to ensure the software meets the specified
requirements.

Testing is integral throughout the development phase but also stands as


a distinct phase where the software is rigorously evaluated to detect and
fix defects. Testing ensures that the software functions correctly, meets
the user’s needs, and maintains the required quality standards.

After successful testing, the software is deployed to the user


environment. Deployment might involve installation, configuration, and
user training. However, the life cycle doesn't end with deployment;
maintenance follows, addressing any issues that arise post-deployment,
adding new features, or making necessary updates to keep the software
relevant and operational in a changing environment.

Eventually, the software reaches a point where it is either replaced or


deemed obsolete, leading to its retirement. Throughout its life cycle, the
software is continuously monitored, improved, and adapted, ensuring it
remains useful and functional until the decision is made to retire it,
completing the cycle.

Approaches and Functions of the Software


Development Lifecycle
The software life cycle outlines the structured process through which
software is developed, deployed, and maintained. Guide the
development process, ensuring that software evolves through structured
phases, whether in a linear or iterative manner, to meet user needs
effectively. There are several approaches to this life cycle, each with
distinct steps and methodologies.

The Waterfall model is a linear approach, where each phase—


requirements, design, development, testing, deployment, and
maintenance—follows sequentially. It is straightforward, but its rigidity
makes it less adaptable to changes once a phase is complete. For
instance, in developing a payroll system, all requirements must be fully
understood and documented before design begins. Once coding starts,
any major changes would require revisiting earlier phases, which can be
costly.

In contrast, Agile methodology emphasizes flexibility and iterative


progress. Development occurs in small, incremental cycles called
sprints. Each sprint delivers a potentially shippable product increment,
allowing continuous feedback and adaptation. For example, in an e-
commerce platform, Agile allows features like user authentication or
payment processing to be developed, tested, and improved iteratively,
accommodating changes based on user feedback.

The V-Model, or Verification and Validation model, is an extension of the


Waterfall, but with more emphasis on testing at each development
stage. As an example, when building an embedded system for a medical
device, the V-Model ensures that each design and development phase is
paired with a corresponding testing phase, ensuring rigorous verification
at every step.

The spiral model combines iterative development with the systematic


aspects of the Waterfall model, focusing on risk assessment. In large-
scale projects, such as a government health database system, the spiral
model allows for repeated refinement of the system through continuous
risk evaluation and iterative development, ensuring a robust and well-
tested product.
Software Development
Concept and processes
Software development is a systematic process that transforms ideas
into functional software. It involves a series of well-defined stages, each
critical to producing reliable and efficient software.

The process begins with requirements analysis, where the software’s


purpose and functionalities are meticulously defined. Developers
collaborate with stakeholders to understand the problem and outline
what the software needs to accomplish. This leads to system design,
where the architecture is planned. Here, developers decide on the
software’s structure, including data flow, user interfaces, and the choice
of programming languages and tools.

Following design, the coding phase starts. This is where developers


write the actual software, translating the design into a working program.
Various approaches can be employed, such as object-oriented
programming, which organizes code into reusable objects, or functional
programming, which treats computation as the evaluation of
mathematical functions.

After coding, the software undergoes testing. This phase is crucial for
identifying and fixing bugs or inconsistencies. Testing can be conducted
at multiple levels, from unit tests that check individual components to
system tests that validate the software as a whole.

Once testing confirms the software's functionality, it moves to


deployment, where it is released to users. Deployment may involve
installing the software on various systems, configuring it for specific
environments, and ensuring it integrates smoothly with other systems.

Finally, maintenance begins. As the software is used, new bugs may be


discovered, or changes in user needs might require updates or
enhancements. Maintenance ensures the software remains functional
and relevant over time.

Throughout this process, methodologies like Agile or DevOps may be


applied to enhance flexibility and collaboration, ensuring that the
software development process is efficient, adaptable, and aligned with
user requirements.
Software Development Techniques and Tools
Software development employs various techniques and tools to
streamline the creation, testing, and maintenance of software. Key
techniques include Agile development and DevOps. Agile emphasizes
iterative progress through short development cycles, or sprints,
promoting flexibility and frequent feedback. DevOps integrates
development and operations, enabling continuous delivery and
deployment, enhancing collaboration, and accelerating release cycles.

In terms of tools, Integrated Development Environments (IDEs) like


Visual Studio Code and IntelliJ IDEA are essential. These tools offer a
comprehensive environment for writing, testing, and debugging code,
supporting multiple programming languages and enhancing productivity.

Version control systems like Git are crucial for managing changes to
the codebase. They track revisions, facilitate collaboration among
developers, and help resolve conflicts in code integration.

Continuous Integration/Continuous Deployment (CI/CD) tools like


Jenkins and GitLab CI automate the testing and deployment process,
ensuring that code changes are automatically tested and deployed to
production, reducing manual intervention and errors.

Testing frameworks such as JUnit for Java or pytest for Python are
used to write and run automated tests, ensuring that individual
components function correctly and that new changes do not introduce
bugs.

Finally, containerization tools like Docker and Kubernetes are


increasingly popular. They allow developers to package applications and
their dependencies into containers, ensuring consistency across different
environments, from development to production. These techniques and
tools collectively enhance the efficiency, reliability, and scalability of the
software development process.

Software Deployment and Review


Deployment techniques in software development focus on transitioning
software from a development environment to a production environment,
ensuring it functions correctly for end users. Key techniques include
Continuous Deployment (CD), where code changes are automatically
released to production, reducing manual intervention. This is often
paired with Continuous Integration (CI), which ensures code is
consistently tested before deployment. Blue-Green Deployment is
another approach, involving two identical environments—one active
(blue) and one idle (green). New versions are deployed to the green
environment, and once verified, traffic is switched from blue to green,
minimizing downtime and risk. Canary Deployment gradually
introduces new versions to a small subset of users before a full rollout,
reducing potential impact from undetected issues.

Reviewing system performance is crucial post-deployment to ensure the


software meets performance criteria. This involves monitoring tools like
Prometheus or New Relic, which track key metrics such as response
time, throughput, and error rates. Load testing with tools like Apache
JMeter assesses how the system behaves under heavy use, identifying
potential bottlenecks. Profiling tools like YourKit help analyze
performance at the code level, pinpointing inefficiencies. Logging and
tracing through systems like ELK Stack or Jaeger provide detailed
insights into system operations, enabling swift identification and
resolution of issues. These deployment techniques and performance
review strategies ensure the software is not only functional but also
reliable and efficient in real-world conditions.

Software Planning and Implementation


In software development, planning and implementation methods are
crucial for successful project execution.

Planning begins with defining the project scope and objectives. It


involves creating a detailed project plan that outlines milestones,
deliverables, and timelines. Requirements gathering is essential to
understand user needs and constraints. Risk assessment and resource
allocation are performed to anticipate potential challenges and ensure
the availability of necessary tools and personnel.

During the implementation phase, the project plan is put into action.
Development typically follows an iterative or incremental approach, such
as Agile or Scrum, where work is divided into manageable sprints or
cycles. Each iteration involves coding, unit testing, and integration of
new features. Regular reviews and stand-up meetings help track
progress and adapt to changes.

Continuous integration and continuous deployment (CI/CD) practices are


employed to automate the building, testing, and deployment of code,
ensuring consistent quality and faster delivery. Testing phases include
unit testing, integration testing, and user acceptance testing to identify
and resolve issues.

Effective communication and documentation throughout both phases are


essential for coordination and clarity among team members and
stakeholders. Regular feedback loops and adjustments ensure the
project aligns with evolving requirements and delivers value efficiently.

Software Monitoring Methods


In organizations, software development monitoring is pivotal for ensuring
smooth progress and maintaining quality. One prominent method is
performance monitoring, which involves tracking application metrics
such as response times, error rates, and system resource usage. Tools
like Prometheus and Grafana provide real-time insights, helping teams
identify and address performance issues promptly.

Code quality monitoring is another crucial method. This involves


analyzing code for adherence to standards, detecting bugs, and ensuring
maintainability. Static code analysis tools, like SonarQube, evaluate the
codebase for vulnerabilities and technical debt, which helps in
maintaining high-quality standards throughout development.

Continuous integration and continuous deployment (CI/CD)


monitoring ensures that automated pipelines are functioning correctly.
It tracks the success or failure of builds, tests, and deployments,
allowing for rapid detection of integration issues and ensuring that the
latest code is always in a deployable state.

Additionally, user feedback and error tracking tools capture real-


world issues and user experiences. Services like Sentry and Rollbar help
in logging and analyzing runtime errors, providing valuable data for
debugging and improving the application.

Together, these monitoring methods enable organizations to maintain


software quality, address issues proactively, and align development with
user expectations.

Case Study:
Software Engineering and Testing
Role of modelling languages
Modeling languages in software engineering are essential for creating
abstract representations of software systems, facilitating understanding,
design, and communication throughout the development process. These
languages offer standardized ways to visualize complex systems, making
it easier to plan, design, and manage software projects.

Unified Modeling Language (UML) is one of the most widely used


modeling languages. It provides a suite of diagram types—such as class
diagrams, sequence diagrams, and use case diagrams—that help in
capturing various aspects of a system, from its structure to its behavior.
UML helps in clarifying requirements, specifying designs, and
documenting systems, ensuring that all stakeholders share a common
understanding.

Domain-Specific Languages (DSLs), on the other hand, are tailored


for specific problem domains. Unlike general-purpose languages like
UML, DSLs are designed to address particular types of problems within a
given context. For instance, SQL is a DSL for database querying, and
BPMN (Business Process Model and Notation) is used for modeling
business processes. DSLs streamline development by providing
constructs that are directly aligned with domain-specific requirements.

Model-Driven Engineering (MDE) leverages these modeling


languages to automate various stages of software development. By
creating high-level models, developers can use tools to generate code,
test cases, and documentation automatically. This approach enhances
productivity, reduces errors, and ensures consistency between design
and implementation.

In essence, modeling languages play a crucial role in software


engineering by providing structured methods to represent and analyze
systems. They facilitate communication among stakeholders, support
comprehensive design and planning, and enable automation in the
development lifecycle, ultimately leading to more effective and efficient
software development.
Benefits and Limitations of UML’s
Benefits of modeling languages in software development include
enhanced clarity and communication. By providing standardized
representations of systems, they facilitate a shared understanding
among stakeholders, including developers, designers, and clients. This
reduces ambiguity and helps align expectations. Modeling languages
also support structured design and planning, allowing for thorough
analysis and validation of system requirements before implementation
begins. They enable early detection of potential issues and
inconsistencies, which can be addressed before they escalate into more
significant problems. Additionally, tools that use modeling languages can
automate code generation and testing, improving development
efficiency and consistency.

Limitations include the potential for complexity and overhead. Detailed


models can become cumbersome and difficult to manage, particularly in
large projects, leading to increased maintenance efforts. Over-reliance
on modeling languages may result in an excessive focus on
documentation rather than practical implementation, potentially
delaying progress. Furthermore, not all stakeholders may be proficient in
interpreting models, which can hinder effective communication. Models
may also become outdated as requirements evolve, necessitating
ongoing updates to reflect changes accurately.

Unified Modelling Language Tools


The Unified Modeling Language (UML) is a standardized visual language
used in software development to specify, visualize, and document the
structure and behavior of systems. UML provides a comprehensive set of
diagrams that cover various aspects of a software system. These include
structural diagrams like class diagrams, which depict the system's static
structure through classes and their relationships, and behavioral
diagrams like sequence diagrams, which illustrate interactions between
system components over time. Use case diagrams capture functional
requirements and interactions between users and the system, while
activity diagrams model workflows and processes. By offering these
diverse perspectives, UML helps developers and stakeholders
understand complex systems, align their expectations, and ensure that
the design aligns with requirements.
UML tools are software applications that support the creation and
management of UML diagrams. Tools like Microsoft Visio and
Lucidchart offer user-friendly interfaces for drawing UML diagrams,
making it easier to produce and share visual representations of system
designs. StarUML and Enterprise Architect provide more advanced
features, including support for complex modeling, code generation, and
integration with other development tools. IBM Rational Rose and
Visual Paradigm are also notable for their comprehensive support for
UML and their ability to facilitate model-driven development practices.
These tools streamline the process of creating accurate and consistent
UML diagrams, aiding in communication, documentation, and analysis
throughout the software development lifecycle.

Class Diagrams Role in UML’s


Class diagrams in UML tools play a pivotal role in defining the static
structure of a software system. They represent the system's classes,
their attributes, methods, and the relationships between classes, such as
inheritance, associations, and dependencies. By visualizing this
structure, class diagrams provide a clear overview of how different
components of the system interact and relate to each other. This clarity
is essential for both understanding the system's design and
communicating it to stakeholders.

UML tools facilitate the creation of class diagrams by offering intuitive


interfaces for defining and organizing classes and their properties. These
tools enable developers to create detailed and accurate diagrams, which
can be updated as the design evolves. Advanced UML tools also support
code generation from class diagrams, allowing for a seamless transition
from design to implementation. This integration ensures consistency
between the design model and the actual codebase, reducing the
likelihood of discrepancies and improving overall development efficiency.
By leveraging class diagrams, developers can ensure that their system’s
architecture is well-structured and aligns with both functional and non-
functional requirements.

Making an Application in Microsoft Visio´s UML


To create an application using Microsoft Visio with UML, start by defining
the application's requirements. For example, let’s consider a simple
library management system. Begin by opening Visio and selecting the
UML template to access the UML diagram tools.
Start with a use case diagram to capture the system's functional
requirements. Create actors like "Librarian" and "Member" and use ovals
to represent use cases such as "Borrow Book" and "Return Book."
Connect these use cases to the actors to show interactions.

Next, use a class diagram to detail the system's static structure. Define
classes such as "Book," "Member," and "Loan." Specify attributes like
"title" and "author" for the "Book" class, and methods like "borrow()" and
"return()" for the "Loan" class. Draw relationships between these classes
to depict associations, such as "Book" being associated with "Loan."

Once the class diagram is complete, move on to a sequence diagram to


illustrate how objects interact over time during specific use cases. For
instance, in the "Borrow Book" use case, show the sequence of
interactions between the "Member," "Library System," and "Book"
objects as the borrowing process unfolds.

Visio enables you to adjust and refine these diagrams as needed,


ensuring that your application design is both comprehensive and aligned
with user requirements.

Software Testing and Validation


Software testing is a critical phase in the software development lifecycle
aimed at ensuring that applications function correctly and meet user
requirements. The primary goal of testing is to identify defects or issues
before the software is released, thereby enhancing its reliability and
performance.

The process begins with test planning, where the scope, objectives,
and resources for testing are defined. This includes creating a test
strategy that outlines the overall approach, including the types of testing
to be employed, such as functional, non-functional, integration, and
system testing.

Following planning, test design involves creating detailed test cases


and scenarios based on requirements and specifications. Test cases are
designed to validate different aspects of the application, including user
interactions, data processing, and system integrations.

Test execution is the phase where test cases are run against the
software. During this phase, the actual outcomes are compared against
expected results to identify discrepancies. Various testing techniques are
employed, such as manual testing, where testers execute test cases
manually, and automated testing, where scripts and tools are used to
perform tests.

Quality Assurance (QA) testing plays a crucial role in this process.


QA focuses on ensuring that the software not only functions correctly but
also meet the highest quality standards. QA encompasses a broad range
of activities, including defect management, where identified issues are
logged, prioritized, and tracked until resolved. Additionally, QA involves
process improvements to enhance testing practices and ensure
consistent quality.

Test closure involves evaluating the test process, documenting results,


and providing feedback. This phase helps in understanding the
effectiveness of the testing efforts and identifying areas for
improvement. By thoroughly executing these steps, software testing
ensures that applications are robust, functional, and aligned with user
expectations before they reach the end user.

Software testing tools and benefits


In software engineering, Quality Assurance (QA) relies heavily on a
variety of tools to ensure that applications meet required standards.
Testing tools are designed to enhance the effectiveness and efficiency of
the testing process. Tools like Selenium and JUnit are pivotal in
automated testing, allowing for the execution of test scripts to verify
functionality across different scenarios. Selenium supports web
application testing by automating browser interactions, while JUnit is
widely used for unit testing in Java applications, ensuring that individual
components work as expected. JIRA and TestRail are utilized for test
management, aiding in the organization of test cases, tracking test
execution, and managing defects. These tools streamline the testing
process, facilitate collaboration among teams, and provide valuable
metrics for assessing software quality.

The benefits of software testing tools are substantial. Automated testing


tools accelerate the testing process by running tests quickly and
repetitively, which is particularly useful for regression testing in
continuous integration environments. Test management tools improve
coordination and documentation, ensuring that all aspects of testing are
systematically addressed and tracked. This enhances test coverage,
reduces manual effort, and increases overall productivity.
However, limitations also exist. Automated tests can be complex to set
up and maintain, especially when dealing with dynamic or frequently
changing applications. They may not always catch issues related to user
experience or visual defects, which require manual testing. Additionally,
reliance on tools can sometimes lead to an overemphasis on quantitative
metrics rather than qualitative aspects of software quality. This can
result in missed nuances in the user experience or functional behavior.
Balancing tool use with manual testing and human judgment remains
essential for achieving comprehensive software quality.

Code Validation Techniques


In software engineering, testing techniques and code validation are
fundamental to ensuring software quality and reliability. Testing
techniques are employed to identify and address issues before the
software reaches users. One common technique is unit testing, which
focuses on individual components or functions of the software to ensure
they perform correctly in isolation. This type of testing helps catch issues
early in the development cycle, making it easier to address bugs in
individual units of code.

Integration testing follows, where the interactions between different


components are tested to ensure they work together as intended. This
technique is crucial for uncovering issues that may not be evident when
testing components in isolation but could arise when they interact.

System testing evaluates the complete and integrated software to


ensure it meets the specified requirements. It encompasses functional
testing, which verifies that the software performs its intended functions,
and non-functional testing, which assesses performance attributes such
as scalability and security.

Acceptance testing is conducted to confirm that the software meets


the end user's requirements and is ready for deployment. This can
involve user acceptance testing (UAT) where real users validate the
system against their needs and expectations.

Code validation, on the other hand, ensures that the code adheres to
defined standards and practices. Techniques such as static code
analysis are used to examine the code without executing it, identifying
potential issues like code smells, security vulnerabilities, and deviations
from coding standards. Code reviews involve peers examining code
changes to provide feedback and catch errors that automated tools
might miss. Additionally, dynamic code analysis involves running the
code to detect issues related to runtime behavior, such as memory leaks
and performance problems.

Together, these testing techniques and validation methods ensure that


software is not only functional and reliable but also adheres to quality
standards, enhancing its robustness and user satisfaction.

Demonstration of Software Testing


This simple demo illustrates how to create a basic Java application and
apply unit testing to verify its functionality:

public class Calculator {


// Adds two numbers
public int add(int x, int y) {
return x + y;
}
// Subtracts two numbers
public int subtract(int x, int y) {
return x - y;
}
}

We can use JUnit to create a series of tests for Software Testing:


import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
public class CalculatorTest {
// Open the calculator
private final Calculator calculator = new Calculator();
// Test addition
@Test
public void testAdd() {
assertEquals(17, calculator.add(8, 9), "Return the sum of two
numbers");
assertEquals(1, calculator.add(-5, 6), "Negative numbers sum
test”);
assertEquals(0, calculator.add(0, 0), "Zero plus zero is
zero”);
}
// Test subtraction
@Test
public void testSubtract() {
assertEquals(47, calculator.subtract(50, 3), "Subtraction should
return the difference of two numbers");
assertEquals(-10, calculator.subtract(-9, 1), "Subtraction with
negative numbers should return correct result");
assertEquals(0, calculator.subtract(0, 0), "Zero minus zero is
zero");
}
}

Compile the source code:


javac Calculator.java CalculatorTest.java

Then we run the tests in a console:


java -cp /opt/junit/junit.jar org.junit.runner.JUnitCore
CalculatorTest

The test is successful!


Bibliography

You might also like