DESIGN PATTERN
In software engineering, a software design pattern is a general, reusable
solution of how to solve a common problem when designing an application
or system. Design patterns are used to support object-oriented
programming (OOP).
Why Use Design Patterns?
They save time (you don’t have to solve the problem from scratch).
They help you write clean, understandable, and reusable code.
They are used by many programmers, so they make your code easier
to understand.
Types of Design Patterns
1. Creational Patterns
Singleton: Only one object is allowed. (e.g. one printer manager in a
computer)
Factory: A method decides which object to create. (like a pizza
factory that makes different pizzas)
Builder: Step-by-step object creation. (like building a house room by
room)
2. Structural Patterns
Adapter: Connects two things that don’t fit together. (like a charger
adapter)
Decorator: Add features to something without changing it. (like
decorating a cake)
Facade: Simple interface hiding complex system. (like TV remote
instead of handling internal circuits)
3. Behavioral Patterns
Observer: One changes, others are notified. (like YouTube
subscribers get notifications)
Strategy: Change behavior at runtime. (like choosing different routes
in Google Maps)
Command: Turn requests into objects. (like undo/redo commands in
Word)
Software Testing
Software testing is an important process in the Software Development
Lifecycle(SDLC). It involves verifying and validating that a Software
Application is free of bugs, meets the technical requirements set by
its Design and Development, and satisfies user requirements efficiently and
effectively.
Software testing mainly divides into the two parts, which is used in
the Software Development Process:
1. Verification: This step involves checking if the software is doing what
is supposed to do. Its like asking, "Are we building the product the
right way?"
2. Validation: This step verifies that the software actually meets the
customer's needs and requirements. Its like asking, "Are we building
the right product?"
Types of Software Testing
There are two types of software testing broadly:-
1. Manual Testing
2. Automation Testing
Manual Testing
It is a way of physically testing the software without utilizing automated
tools like coded test scripts. Exclusive test cases (i.e., a set of conditions to
test the application's functionality and verify expected results) are written
and implemented to test their pass or fail status. It guarantees whether the
application is working, as referenced in the product requirement document
or not.
Types of Manual Testing
Manual testing will be divided into further types which is following:
1. White Box Testing
White Box Testing is a software testing technique that involves testing the
internal structure and workings of a software application. The tester has
access to the source code and uses this knowledge to design test cases that
can verify the correctness of the software at the code level.
2. Black Box Testing
Black-Box Testing is a type of software testing in which the tester is not
concerned with the internal knowledge or implementation details of the
software but rather focuses on validating the functionality based on the
provided specifications or requirements.
3. Gray Box Testing
Gray Box Testing is a software testing technique that is a combination of
the Black Box Testing technique and the White Box Testing technique. In
the Black Box Testing technique, the tester is unaware of the internal
structure of the item being tested and in White Box Testing the internal
structure is known to the tester.
Types of Black Box Testing
Black Box Testing will be divided into further types which is following:
1. Functional Testing
Functional Testing is a type of Software Testing in which the system is
tested against the functional requirements and specifications. Functional
testing ensures that the requirements or specifications are properly
satisfied by the application.
2. Non-Functional Testing
Non-Functional Testing is a type of Software Testing that is performed to
verify the non-functional requirements of the application. It verifies
whether the behavior of the system is as per the requirement or not. It
tests all the aspects that are not tested in functional testing.
Types of Functional Testing
Functional Testing will be divided into further types which is following:
1. Unit Testing
Unit Testing is a method of testing individual units or components of a
software application. It is typically done by developers and is used to
ensure that the individual units of the software are working as intended.
2. Integration Testing
Integration Testing is a method of testing how different units or
components of a software application interact with each other. It is used to
identify and resolve any issues that may arise when different units of the
software are combined.
3. System Testing
System Testing is a type of software testing that evaluates the overall
functionality and performance of a complete and fully integrated software
solution. It tests if the system meets the specified requirements and if it is
suitable for delivery to the end-users.
Types of Non-functional Testing
Here are the Types of Non-Functional Testing
1. Performance Testing
Performance Testing is a type of software testing that ensures software
applications perform properly under their expected workload. It is a testing
technique carried out to determine system performance in terms of
sensitivity, reactivity, and stability under a particular workload.
2. Usability Testing
Usability Testing in software testing is a type of testing, that is done from
an end user’s perspective to determine if the system is easily usable.
Usability testing is generally the practice of testing how easy a design is to
use on a group of representative users.
3. Compatibility Testing
Compatibility Testing is software testing that comes under the non
functional testing category, and it is performed on an application to check
its compatibility (running capability) on different platforms/environments.
This testing is done only when the application becomes stable.
Automation Testing
In automation testing, test scripts are executed rather than running tests
and searching for bugs on your own. for the bugs. With the assistance of
automated testing techniques, we can handle the test execution and
analyze the derived output and expected result.
1. GUI testing
Users interact with the application or software through a user interface. It
can include display screens, keyboards, or a mouse.
The purpose of GUI(i.e. Graphical User Interface) testing is to guarantee
the ease of functionalities of applications by checking the smooth
operation of screens and controls like buttons, menus, images, links, and
so on.
2. Code driven
In this strategy, the engineer will fundamentally focus on the execution of
the test cases to analyze whether all the functions of the code are
producing desired output or not.
3. Test Automation Framework
Using a framework for automated testing, will speed up the team’s testing
and efficiency, further develop test accuracy, and will decrease the
maintenance cost for tests. A framework sets guidelines that incorporate
coding standards, test-data handling processes, or data on how to access
resources.
Advantages of Software Testing
Testing saves money
Notably, the longer the bug goes undetected in your product, the more
troublesome and costly it is to fix it. It also costs you, clients, and
customers. By implementing software testing all through the development
phase of the product, you can save money and time after the product is
deployed.
Prevents Emergencies
Errors in corporate software can prompt system failures, missing
information, and server breakdowns. The possibility of such cases can be
ruled out by implementing specific tests to ensure proper backup channels
and secure data during such failures.
Secures the product
Nowadays, there are many situations where customers' personal data is
leaked and used to their advantage. This is a grave threat to any individual.
As a particular application goes through testing, the client can be
guaranteed that they will get a reliable item. The personal data of the
client can be protected. Clients can get safe and protected items from
malicious attacks by outsiders with the help of software testing.
Ensures quality
Software testing ensures that your product or application's quality is high,
which is significant for the client. With higher quality, the customers will
pay more. Considerably more significant is that with selling top-notch
items, you build a solid reputation and brand picture, things that are
significant in the long haul.
Easy to make changes
As a new developer, changing parts of the older code structure can be
difficult, but with suitable tests, you’ll essentially know if you’ve led to
failure in the functionality. As the addition part becomes simpler, the
product remains ahead and more advanced.
Increased coordination and efficiency
Nobody wants chaos of defective applications and hurried fixes of bugs.
Coordinated with testing at each step from the start of the development
phase of your application brings in more organization and productivity with
time. The testing and development teams work in parallel to increase the
efficiency of the application.
Disadvantages of Software Testing
Time-Consuming
Comprehensive testing can be time-consuming, especially for large and
complex software systems. Testing each aspect thoroughly may extend the
overall development timeline.
Costly
The resources required for testing, including personnel, tools, and
infrastructure, can contribute to the overall project cost. Additionally,
fixing defects found during testing may incur additional expenses.
Infeasibility of Exhaustive Testing
It's practically impossible to test all possible input combinations and
scenarios for complex software systems. Therefore, exhaustive testing to
guarantee complete coverage is often infeasible.
Dependence on Testers' Skills
The effectiveness of testing depends on the skills and experience of the
testing team. Inexperienced or inadequately trained testers may overlook
critical issues, leading to a false sense of security.
Limited Scope of Testing
Some aspects of software, such as performance under extreme conditions
or security vulnerabilities, may not be fully addressed in regular testing.
Specialized testing efforts may be required to address these aspects.
Software Quality Assurance
Software Quality Assurance (SQA) is simply a way to assure quality in the
software. It is the set of activities that ensure processes, procedures as well
as standards are suitable for the project and implemented correctly. It is a
process that works parallel to Software Development. It focuses on
improving the process of development of software so that problems can be
prevented before they become major issues. Software Quality Assurance is
a kind of Umbrella activity that is applied throughout the software process.
Quality
Quality in a product or service can be defined by several measurable
characteristics. Each of these characteristics plays a crucial role in
determining the overall quality.
Focus of Software Quality Assurance (SQA)
Software's Portability: Software's portability refers to its ability to
be easily transferred or adapted to different environments or
platforms without needing significant modifications. This ensures
that the software can run efficiently across various systems,
enhancing its accessibility and flexibility.
Software's Usability: Usability of software refers to how easy and
intuitive it is for users to interact with and navigate through the
application. A high level of usability ensures that users can
effectively accomplish their tasks with minimal confusion or
frustration, leading to a positive user experience.
Software's Reusability: Reusability in software development
involves designing components or modules that can be reused in
multiple parts of the software or in different projects. This promotes
efficiency and reduces development time by eliminating the need to
reinvent the wheel for similar functionalities, enhancing productivity
and maintainability.
Software's Correctness: Correctness of software refers to its ability
to produce the desired results under specific conditions or inputs.
Correct software behaves as expected without errors or unexpected
behaviors, meeting the requirements and specifications defined for
its functionality.
Software's Maintainability: Maintainability of software refers to
how easily it can be modified, updated, or extended over time. Well
maintained software is structured and documented in a way that
allows developers to make changes efficiently without introducing
errors or compromising its stability.
Software's Error Control: Error control in software involves
implementing mechanisms to detect, handle, and recover from
errors or unexpected situations gracefully. Effective error control
ensures that the software remains robust and reliable, minimizing
disruptions to users and providing a smoother experience overall.
Benefits of Software Quality Assurance (SQA)
SQA produces high quality software.
High quality application saves time and cost.
SQA is beneficial for better reliability.
SQA is beneficial in the condition of no maintenance for a long time.
High quality commercial software increase market share of
company.
Improving the process of creating software.
Improves the quality of the software.
It cuts maintenance costs. Get the release right the first time, and
your company can forget about it and move on to the next big thing.
Release a product with chronic issues, and your business bogs down
in a costly, time consuming, never-ending cycle of repairs.
Disadvantage of Software Quality Assurance (SQA)
There are a number of disadvantages of quality assurance.
Cost: Some of them include adding more resources, which cause the
more budget its not, addition of more resources for betterment of
the product.
Time Consuming: Testing and Deployment of the project taking
more time which cause delay in the project.
Overhead : SQA processes can introduce administrative overhead,
requiring documentation, reporting, and tracking of quality metrics.
This additional administrative burden can sometimes outweigh the
benefits, especially for smaller projects.
Resource Intensive : SQA requires skilled personnel with expertise in
testing methodologies, tools, and quality assurance practices.
Acquiring and retaining such talent can be challenging and
expensive.
Resistance to Change : Some team members may resist the
implementation of SQA processes, viewing them as bureaucratic or
unnecessary. This resistance can hinder the adoption and
effectiveness of quality assurance practices within an organization.
Differences
Difference Between Black Box, White Box, And Grey Box Testing
Black Box Testing White Box Testing Grey Box Testing
Tester does not have any The internal structure is The Internal structure
knowledge and completely known. is partially known.
information for the
internal structure.
Also known as Closed Also known as Glass, Clear Also known as Gray
box, Functional testing, box, Structural testing, or box testing or
and Data-driven testing Code-based testing. translucent testing.
Done by testers, Done by testers and Done by testers,
developers, and the end- developers only. developers, and the
users. end-users.
Not suitable for algorithm Suitable for Algorithm Not suitable for
Black Box Testing White Box Testing Grey Box Testing
testing testing algorithm testing
Tester has nothing to do Tester has complete Tester has partial
with the internal working knowledge of the internal knowledge of the
of the system. working of the system. internal working of the
system
Hidden errors cannot be Hidden errors can be Not easily found but
found easily. found very easily as can be found at the
internal working is well user level.
known to the tester.
Black box testing is the White box testing is a Grey box testing takes
least time-consuming time-consuming process less time than white
process box testing
Less exhaustive than the Most exhaustive process. Partially exhaustive
white box and grey box process.
testing