0% found this document useful (0 votes)
7 views47 pages

Software Implementation and Testing Guide

Uploaded by

kzetsu12
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views47 pages

Software Implementation and Testing Guide

Uploaded by

kzetsu12
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SWE2301:

Software
Engineering

Lecture 05: Implementation & Testing


Venue : CIT Theatre
Presented by: M .I. Mukhtar
Lecture Outline
• Implementation
• Implementation ways
• Implementation issues
• Open source development

• Software Testing
• Why Test, Who Test and What to test
• Testing Goals
• Testing terminologies
• Stages of testing

8/31/2024 SWE2301: Introduction to software Engineering 2


Implementation
• After requirements analysis and design, the next activity in line
is the ‘implementation’.

• Software implementation is the process of translating a


software design or specification into a working software
system.

• This phase involves the creation of the actual product i.e. the
programming aspect phase of the software program.

8/31/2024 Implementation & Testing 3


Good Practices
• Some proven good practices to be adopted by during
implementation are:
• Modularity: A good programming practice is to group and code your
system as small manageable modules.

• Commenting & Documentation: Good commenting practice ensures


that each module or section of code is not misinterpreted, a
programmer would not get lost and makes the program easier to
maintain by another party.

• Consistent naming scheme: camelCase and usage of Underscores.

• Consistent Indentation: Easier to detected error, easier to


read/learn, provides proper understanding of the codes, easier to
maintain.

• Debugging: It is good to debug every module once you are done and
not the entire program. It helps detect faults/errors before the
modules are integrated as one system, therefore saves time.
8/31/2024 Implementation & Testing 4
Ways of System Implementation
• There are different ways by which a system can be implemented.
• Common ways include:

Using an Using Pre- Using Using Code


Using Using
Integrated Built Content Generators
Development Application Software
Development Software Management and
from Scratch Development Development
Environment Components Systems Automation
Platforms Frameworks
(IDE) or Libraries (CMS) Tools

• These methods can be combined depending on the project’s needs.


For example, you might start with an IDE and then use frameworks
and libraries for certain features.

• The choice of method depends on the project's complexity,


requirements, timeline, and the team's expertise.
8/31/2024 Implementation & Testing 5
Development from Scratch
•Description:
•Building a software system from the ground up, writing all code
manually using a programming language without relying on pre-built
templates or frameworks.
•There are several factors to consider when selecting a programming language to
implement a system such as familiarity, targeted platform, speed, development
cost and time.

•Advantages:
•Full control over the software’s design, architecture, and functionality;
•can be highly customized to meet specific requirements.

•Disadvantages:
•Time-consuming and requires extensive expertise;
•higher risk of bugs and longer development cycles.

•Best for:
•Projects with unique requirements where existing tools or frameworks
do not suffice.
8/31/2024 Implementation & Testing 6
Using an Integrated Development
Environment (IDE)
•Description:
•Developing software using an IDE, which is a software application
that provides comprehensive facilities to programmers for software
development. Examples include Visual Studio, Eclipse, IntelliJ IDEA,
and PyCharm.

•Advantages:
•Increased productivity with features like code completion, debugging
tools, version control, and integrated testing environments; supports
various programming languages and frameworks.

•Disadvantages:
•Requires learning the specific IDE’s functionalities; might be overkill
for very small projects.

•Best for:
•Projects where efficiency, code management, and debugging are
important, especially in larger teams or complex systems.
8/31/2024 Implementation & Testing 7
Using Application Development
Platforms
•Description:
•Utilizing platforms like Microsoft Visual Studio, Android Studio, or
Xcode that provide tools and libraries specific to certain types of
applications (e.g., mobile, desktop).
•Contains IDE + additional tools and services for building, deploying,
and managing applications

•Advantages:
•Tailored to specific application types, offering tools that streamline
the development process; often includes simulators and emulators for
testing.

•Disadvantages:
•Limited to the platform’s ecosystem; may require specific knowledge
of the platform’s tools and best practices.

•Best for:
•Developing platform-specific applications like Android apps, iOS
apps, or desktop applications.
8/31/2024 Implementation & Testing 8
Using Software Development
Frameworks
•Description:
•Leveraging pre-built frameworks that provide a foundation for
software development. Examples include Django (Python), Laravel
(PHP), and Spring (Java).

•Advantages:
•Speeds up development by providing reusable code, best practices,
and a defined structure; reduces the chance of errors and improves
maintainability.

•Disadvantages:
•Less flexibility compared to building from scratch; may require
learning the specific framework’s conventions and limitations.

•Best for:
•Projects that can benefit from established patterns, libraries, and
tools, allowing developers to focus on application-specific logic.

8/31/2024 Implementation & Testing 9


Using Pre-Built Software Components
or Libraries
•Description:
•Incorporating existing software components or libraries (e.g., React,
Bootstrap, or jQuery) into your development to add functionality
without building everything from scratch.

•Advantages:
•Saves time by reusing tested and optimized components; enhances
functionality with minimal effort.

•Disadvantages:
•Dependency on third-party code; may require adaptation to fit
specific project needs.

•Best for:
•Projects that can benefit from established, reusable components or
where time-to-market is critical.

8/31/2024 Implementation & Testing 10


Using Content Management Systems
(CMS)
•Description:
•Developing web applications, especially websites, using a CMS like
WordPress or Drupal, which provides pre-built templates and plugins.

•Advantages:
•Speeds up development with ready-made templates and plugins;
easy content management without extensive coding; large community
support.

•Disadvantages:
•Limited by the CMS’s structure; potential security vulnerabilities if
not properly managed.

•Best for:
•Websites and web applications where content management and rapid
deployment are priorities.

8/31/2024 Implementation & Testing 11


Using Code Generators and
Automation Tools
•Description:
•Using tools that automatically generate code based on specifications,
models, or templates. Examples include Yeoman (for web apps),
JHipster (for Java Spring Boot), and SQLAlchemy (for database
models).

•Advantages:
•Speeds up development by generating repetitive code; reduces the
chance of human error in boilerplate code; enforces best practices.

•Disadvantages:
•Generated code may need customization; limited flexibility compared
to hand-coded solutions.

•Best for:
•Projects with repetitive tasks or where consistency and adherence to
standards are important.

8/31/2024 Implementation & Testing 12


Implementation issues
Reuse Configuration management
Most modern software is During the development
constructed by reusing existing process, you have to keep track
components or systems. When of the many different versions
you are developing software, of each software component in
you should make as much use a configuration management
as possible of existing code. system.

Host-target development
Production software does not
usually execute on the same
computer as the software
development environment.
Rather, you develop it on one
computer (the host system) and
execute it on a separate
computer (the target system).
8/31/2024 SWE2301: Introduction to software Engineering 13
Reuse
• From the 1960s to the 1990s, most new software was
developed from scratch, by writing all code in a high-level
programming language.
• The only significant reuse or software was the reuse of
functions and objects in programming language libraries.

• Costs and schedule pressure mean that this approach became


increasingly unviable, especially for commercial and Internet-
based systems.

• An approach to development based around the reuse of


existing software emerged and is now generally used for
business and scientific software.

8/31/2024 SWE2301: Introduction to software Engineering 14


Reuse levels
The abstraction level: At this level, you don’t reuse
software directly but use knowledge of successful
abstractions in the design of your software.

The object level: At this level, you directly reuse


objects from a library rather than writing the code
yourself.

The component level: Components are collections of


objects and object classes that you reuse in
application systems.

The system level: At this level, you reuse entire


application systems.

8/31/2024 SWE2301: Introduction to software Engineering 15


Reuse costs
• The costs of the time spent in looking for software to reuse and
assessing whether or not it meets your needs.

• Where applicable, the costs of buying the reusable software. For


large off-the-shelf systems, these costs can be very high.

• The costs of adapting and configuring the reusable software


components or systems to reflect the requirements of the system
that you are developing.

• The costs of integrating reusable software elements with each


other (if you are using software from different sources) and with
the new code that you have developed.

8/31/2024 SWE2301: Introduction to software Engineering 16


Configuration management
• Configuration management is the name given to the general
process of managing a changing software system.

• The aim of configuration management is to:


• support the system integration process so that all
developers can access the project code and documents in a
controlled way,
• find out what changes have been made,
• compile and link components to create a system.

8/31/2024 SWE2301: Introduction to software Engineering 17


Configuration management activities

System integration,
Version management, where support is
Problem tracking, where
where support is provided to help
support is provided to
provided to keep track of developers define what
allow users to report
the different versions of versions of components
bugs and other problems,
software components. are used to create each
and to allow all
Version management version of a system. This
developers to see who is
systems include facilities description is then used
working on these
to coordinate to build a system
problems and when they
development by several automatically by
are fixed.
programmers. compiling and linking the
required components.

8/31/2024 SWE2301: Introduction to software Engineering 18


Host-target development
• Most software is developed on one computer (the host), but
runs on a separate machine (the target).

• Host System– Development environment:


• This is the development platform where the code is written, compiled,
and initially tested.
• The host system typically has a powerful processor, large amounts of
memory, and a full-featured operating system.
• Examples: A developer's PC or workstation running an IDE like Visual
Studio or Eclipse.

• Target System--- Execution Environment:


• This is the environment where the final software will be deployed and
executed.
• The target system may have limited resources, such as a
microcontroller, an embedded device, or a different operating system.
• Examples: A microcontroller in an IoT device, an ARM-based
embedded system, or a custom hardware platform.

8/31/2024 SWE2301: Introduction to software Engineering 19


Factors to Consider in Host-Target
Development
• Performance:
• The host (e.g., a server) should have sufficient processing power, memory, and
storage to handle the workload of the target (e.g., an application or service).
Performance can be assessed by measuring how well the host manages the
target's demands, including processing speed and response times under various
conditions.
• Compatibility:
• Ensure that the host (e.g., an operating system or hardware platform) is
compatible with the target (e.g., software application or hardware device). This
includes verifying that all necessary drivers, libraries, and dependencies are
supported, and that there are no conflicts between the host and the target.
• Security:
• Implement security measures on the host (e.g., firewalls, antivirus software) to
protect the target (e.g., sensitive data or application functions) from unauthorized
access and cyber threats. This includes setting up proper authentication,
encryption, and regular security updates to safeguard the integrity of the target.
• Scalability:
• Design the host (e.g., cloud infrastructure or server environment) to scale
effectively as the target (e.g., a web application or database) grows in usage or
complexity. This might involve adding more resources or optimizing resource
allocation to handle increased loads and future growth
8/31/2024 SWE2301: Introduction to software Engineering 20
Open Source Development
• Open source development is an approach to software development
in which the source code of a software system is published and
volunteers are invited to participate in the development process.

• The best-known open source product is, of course, the Linux


operating system which is widely used as a server system and,
increasingly, as a desktop environment.

• Other important open source products are Java, the Apache web
server and the mySQL database management system.

• Open source decision:


• Should the product that is being developed make use of open source
components?
• Should an open source approach be used for the software’s development?

8/31/2024 SWE2301: Introduction to software Engineering 21


Open source business
• More and more product companies are using an open source
approach to development.

• Their business model is not reliant on selling a software


product but on selling support for that product.

• They believe that involving the open source community will


allow software to be developed more cheaply, more quickly and
will create a community of users for the software.

8/31/2024 SWE2301: Introduction to software Engineering 22


Open source licensing
• A fundamental principle of open-source development is that
source code should be freely available, this does not mean that
anyone can do as they wish with that code.

• Legally, the developer of the code (either a company or an


individual) still owns the code.

• They can place restrictions on how it is used by including legally


binding conditions in an open source software license.

• Some open source developers believe that if an open source


component is used to develop a new system, then that system should
also be open source.

• Others are willing to allow their code to be used without this


restriction. The developed systems may be proprietary and sold as
closed source systems.

8/31/2024 SWE2301: Introduction to software Engineering 23


License models
• The GNU General Public License (GPL). This is a so-called
‘reciprocal’ license that means that if you use open source software
that is licensed under the GPL license, then you must make that
software open source.

• The GNU Lesser General Public License (LGPL) is a variant of the


GPL license where you can write components that link to open
source code without having to publish the source of these
components.

• The Berkley Standard Distribution (BSD) License. This is a non-


reciprocal license, which means you are not obliged to re-publish
any changes or modifications made to open source code. You can
include the code in proprietary systems that are sold.

8/31/2024 SWE2301: Introduction to software Engineering 24


SWE2301:
Software
Engineering

Lecture 06: Testing


Software Testing
• Testing is the process of executing a program with the
intent of finding errors.

• Testing is intended to show that a program does what it


is intended to do and to discover program defects before
it is put into use.
• When you test software, you execute a program using
artificial data.

SWE3203: System Testing, Integration and Quality


26
Assurance
Why Test
• Although software testing is itself an expensive activity,
yet launching of software without testing may lead to cost
potentially much higher than that of testing, specially in
systems where human safety is involved.

• In the software life cycle the earlier the errors are


discovered and removed, the lower is the cost of their
removal.

SWE3203: System Testing, Integration and Quality


27
Assurance
Who Test
• Testing requires the developers to find errors from their
software.
• It is difficult for software developer to point out errors
from own creations.

• Many organizations have made a distinction between


development and testing phase by making different
people responsible for each phase.

SWE3203: System Testing, Integration and Quality


28
Assurance
What to Test
• We should test the program’s responses to every possible
input(valid and invalid).
• Example if a program requires two 8 bit integers as inputs.
• Total possible combinations are 28x28.
• If only one second it required to execute one set of
inputs, it may take 18 hours to test all combinations.
• Practically, inputs are more than two and size is also
more than 8 bits.
• Hence, complete testing is just not possible, although, we
may wish to do so.

SWE3203: System Testing, Integration and Quality


29
Assurance
Testing Goals
• To demonstrate to the developer and the customer that
the software meets its requirements.
• This first goal leads to validation testing ("Are we
building the right product”).

• To discover situations in which the behavior of the


software is incorrect, undesirable or does not conform to
its specification.
• The second goal leads to defect testing (Verification)
• "Are we building the product right”.

SWE3203: System Testing, Integration and Quality


30
Assurance
Testing Goals..
• Validation is the process of evaluating a system or
component during or at the end of development process to
determine whether it satisfies the specified requirements .

• Verification is the process of evaluating a system or


component to determine whether the products of a given
development phase satisfy the conditions imposed at the
start of that phase.
Testing= Verification+Validation

• Aim of V & V is to establish confidence that the system is ‘fit


for purpose’.

SWE3203: System Testing, Integration and Quality


31
Assurance
Testing Terminologies
• Errors: People make errors. A good synonym is mistake.
This may be a syntax error or misunderstanding of
specifications. Sometimes, there are logical errors.

• Bug: When developers make mistakes while coding, we call


these mistakes “bugs”.

• Fault: A fault is the representation of an error, where


representation is the mode of expression, such as narrative
text, data flow diagrams, ER diagrams, source code etc.
Defect is a good synonym for fault.

• Failure: A failure occurs when a fault executes. A particular


fault may cause different failures, depending on how it has
been exercised.

SWE3203: System Testing, Integration and Quality


32
Assurance
Testing Terminologies
• Test data :are the inputs that have been devised to test a
system.

• Test case : describes an input description and an expected


output description.

• The set of test cases is called a test suite. Hence any


combination of test cases may generate a test suite.

SWE3203: System Testing, Integration and Quality


33
Assurance
Stages of testing
• Development testing: This is where the system is tested
during development to discover bugs and defects.

• Release testing: This is where a separate testing team


test a complete version of the system before it is released
to users.

• User testing: This is where users or potential users of a


system test the system in their own environment.

8/31/2024 Implementation & Testing 34


Development testing
• Development testing includes all testing activities that
are carried out by the team developing the system.

Development
Testing Types

Integration
Unit Testing System Testing
Testing

SWE2301-Testing and Evolution 35


Unit Testing
• Unit testing, where individual program units or object
classes are tested. Unit testing should focus on testing
the functionality of objects or methods.

SWE2301-Testing and Evolution 36


Integration Testing
• Integration testing, where several individual units are
integrated to create composite components.

• Component testing should focus on testing component


interfaces.

• Objectives are to detect faults due to interface errors or


invalid assumptions about interfaces.

SWE2301-Testing and Evolution 37


System Testing
• System testing is where all of the components in a system are
integrated and the system is tested as a whole.

• System testing tests the emergent behavior of a system.

• During system testing,


• reusable components that have been separately developed and off-
the-shelf systems may be integrated with newly developed
components. The complete system is then tested.
• Components developed by different team members or sub-teams may
be integrated at this stage.

SWE2301-Testing and Evolution 38


Release testing
• Release testing is the process of testing a particular release
of a system that is intended for use outside of the
development team.

• The primary goal of the release testing process is to convince


the supplier of the system that it is good enough for use.

Release Testing
Types

Requirement Scenario based Performance


based Testing Testing Testing

SWE2301-Testing and Evolution 39


Requirements based Testing
• Requirements-based testing: This involves examining each
requirement and developing a test or tests for it. Example:

Requirement
• If a patient is known to be allergic to any particular medication,
then prescription of that medication shall result in a warning
message being issued to the system user.

Requirement test
• Set up a patient record with no known allergies. Prescribe
medication for allergies that are known to exist. Check that a
warning message is not issued by the system.

• Set up a patient record with a known allergy. Prescribe the


medication to that the patient is allergic to, and check that the
warning is issued by the system.

SWE2301-Testing and Evolution 40


Scenario Based Testing
• Scenario testing: This involves devising typical scenarios of use
and use these to develop test cases for the system. Example

Aisha is a nurse who specializes in mental health care. One of her responsibilities
is to visit patients at home to check that their treatment is effective and that they
are not suffering from medication side -effects.

On a day for home visits, Aisha logs into the MHC-PMS and uses it to print her
schedule of home visits for that day, along with summary information about the
patients to be visited. She requests that the records for these patients be
downloaded to her laptop. She is prompted for her key phrase to encrypt the
records on the laptop.

Features Tested by Scenario: Authentication to the


system, Home visit scheduling, Downloading specified
patient records.
SWE2301-Testing and Evolution 41
Performance Testing
• Performance testing: This involves testing for emergent
properties such as performance and reliability.

• Performance tests usually involve planning a series of


tests where the load is steadily increased until the
system performance becomes unacceptable.

• Stress testing is a form of performance testing where the


system is deliberately overloaded to test its failure
behavior.

SWE2301-Testing and Evolution 42


User testing
• User or customer testing is a stage in the testing process
in which users or customers provide input and advice on
system testing.
• Influences from the user’s working environment have a
major effect on the reliability, performance, usability
and robustness of a system.

User Testing

Beta Acceptance
Alpha Testing
Testing Testing

SWE2301-Testing and Evolution 43


Types of user testing
• Alpha testing
• Users of the software work with the development team to
test the software at the developer’s site.

• Beta testing
• A release of the software is made available to users to allow
them to experiment and to raise problems that they
discover with the system developers.

• Acceptance testing
• Customers test a system to decide whether or not it is
ready to be accepted from the system developers and
deployed in the customer environment. Primarily for
custom systems.

SWE2301-Testing and Evolution 44


Agile methods and Acceptance
testing
• In agile methods, the user/customer is part of the
development team and is responsible for making
decisions on the acceptability of the system.

• Tests are defined by the user/customer and are


integrated with other tests in that they are run
automatically when changes are made.

• There is no separate acceptance testing process.

• Main problem is whether or not the embedded user is


‘typical’ and can represent the interests of all system
stakeholders.

SWE2301-Testing and Evolution 45


Summary
• During implementing phase, considering the different
implementation ways and selecting the best that fits the
business need must be done.
• Reuse, Configuration management and host target development are
implementation issues that needs to be considered during
implementation phase.
• Open source development involves making the source code of a system
publicly available. Understanding the different license model is
important to avoid sanctioning.

• Testing can only show the presence of errors in a program. It


cannot demonstrate that there are no remaining faults.
• Development testing includes all testing activities that are carried out
by the team developing the system.
• Release testing is the process of testing a particular release of a system
that is intended for use outside of the development team.
• User or customer testing is a stage in the testing process in which
users or customers provide input and advice on system testing.

8/31/2024 SWE2301: Introduction to software Engineering 46


Question ??

8/31/2024 SWE2301: Introduction to software Engineering 47

You might also like