Unit 1_testing (Autosaved)
Unit 1_testing (Autosaved)
Engineering is the application of scientific and practical knowledge to invent, design, build, maintain, and
improve frameworks, processes, etc.
A Discipline whose aim is the production of quality software, s/w that is delivered
on time, within budget and that satisfies its requirements.
Software Characteristics:-
Therefore, software has characteristics that are considerably different than
those of hardware:
paradigm.
Time and effort for software development are hard to estimate.
o
Software does not wear out.
Software construction is human intensive.
It has discontinuous operational nature.
Software components should be manufactured in such a way that is can be reused for various
application.
7. Usability:
It refers to the extent to which the software can be used with ease. the amount of effort or
time required to learn how to use the software
8. Portability:
A set of attributes that bears on the ability of software to be transferred from one
environment to another, without minimum changes.
What is Testing?
1. Testing is the process of demonstrating that errors are not present.
2. The purpose of testing is to show that a program performs its intended functions correctly.
3. Testing is the process of establishing confidence that a program does what it is supposed to do.
These definitions are incorrect.
Testing presents an interesting anomaly for the software engineer. During earlier software engineering
activities, the engineer attempts to build software from an abstract concept to a tangible product. Now
comes testing. The engineer creates a series of test cases that are intended to "demolish" the software that
has been built. In fact, testing is the one step in the software process that could be viewed as destructive
rather than constructive.
testing: The practice of investigating a software / system under test so as to
ensure that it is of the highest quality.
Software testing is a process of identifying the correctness of software by
considering its all attributes (Reliability, Scalability, Portability, Re-usability,
Usability) and evaluating the execution of software components to find the software
bugs or errors or defects.
Software Testing is a method to check whether the actual software product matches expected
requirements and to ensure that software product is Defect free. It involves execution of
software/system components using manual or automated tools to evaluate one or more
properties of interest. The purpose of software testing is to identify errors, gaps or missing
requirements in contrast to actual requirements.
Some prefer saying Software testing definition as a White Box and Black Box Testing. In simple
terms, Software Testing means the Verification of Application Under Test (AUT)
Testing Objectives
1. Testing is a process of executing a program with the intent of finding an error.
2. A good test case is one that has a high probability of finding an as-yet undiscovered error.
3. A successful test is one that uncovers an as-yet-undiscovered error.
Testing Principles
Before applying methods to design effective test cases, a software engineer must understand the basic
principles that guide software testing.
• All tests should be traceable to customer requirements. As we have seen, the objective of software
testing is to uncover errors. It follows that the most severe defects (from the customer’s point of view) are
those that cause the program to fail to meet its requirements.
• Tests should be planned long before testing begins. Test planning can begin as soon as the
requirements model is complete. Detailed definition of test cases can begin as soon as the design model
has been solidified. Therefore, all tests can be planned and designed before any code has been generated.
• The Pareto principle applies to software testing. Stated simply, the Pareto principle implies that 80
percent of all errors uncovered during testing will likely be traceable to 20 percent of all program
components. The problem, of course, is to isolate these suspect components and to thoroughly test them.
• Testing should begin “in the small” and progress toward testing “in the large.” The first tests
planned and executed generally focus on individual components. As testing progresses, focus shifts in an
attempt to find errors in integrated clusters of components and ultimately in the entire system .
• Exhaustive testing is not possible. The number of path permutations for even a moderately sized
program is exceptionally large . For this reason, it is impossible to execute every combination of paths
during testing. It is possible, however, to adequately cover program logic and to ensure that all conditions
in the component-level design have been exercised.
• To be most effective, testing should be conducted by an independent third party. By most effective,
we mean testing that has the highest probability of finding errors (the primary objective of testing). the
software engineer who created the system is not the best person to conduct all tests for the software.
Software Quality
Different people understand different meanings of quality like:
_ conformance to requirements
_ fitness for the purpose
_ level of satisfaction
quality as “a characteristic or attribute of something.” As an attribute of an item, quality refers to
measurable characteristics—
things we are able to compare to known standards such as length, color, electrical properties, and
malleability. However, software, largely an intellectual entity, is more challenging to characterize
than physical objects.
two kinds of quality may be encountered: quality of design and quality of conformance.
Quality of design refers to the characteristics that designers specify for an item. The grade of
materials, tolerances, and performance specifications all contribute to the quality of design. As
higher-grade materials are used, tighter tolerances and greater levels of performance are specified,
the design quality of a product increases, if the product is manufactured according to
specifications.
Quality of conformance is the degree to which the design specifications are followed during
manufacturing. Again, the greater the degree of conformance, the higher is the level of quality of
conformance.
In software development, quality of design encompasses requirements, specifications, and the
design of the system. Quality of conformance is an issue focused
User satisfaction = compliant product + good quality + delivery within budget and schedule
Quality control involves the series of inspections, reviews, and tests used throughout the software
process to ensure each work product meets the requirements placed upon it. Quality control
includes a feedback loop to the process that created the work product. The combination of
measurement and feedback allows us to tune the process when the work products created fail to
meet their specifications. This approach views quality control as part of the manufacturing
process.
Quality control activities may be fully automated, entirely manual, or a combination of automated
tools and human interaction.
Quality assurance consists of the auditing and reporting functions of management. The goal of
quality assurance is to provide management with the data necessary to be informed about product
quality, thereby gaining insight and confidence that product quality is meeting its goals
So, programmers, architects, business analysts depend on others to help test their work. This other person
might be some other developer from the same team or the Testing specialists or professional testers.
Giving applications to the testing specialists or professional testers allows an independent test of the
system.As this type of testing is mainly performed by individuals, who are not related to the project
directly or are from a different organization, they are hired mainly to test the quality as well as the
effectiveness of the developed product. Test independence, therefore, helps developers and other
stakeholders get more accurate test results, which helps them build a better software product, with
innovative and unique features and functionality.
There are several levels of independence in software testing which is listed here from the lowest level of
independence to the highest:
To achieve successful testing it’s important for the software engineers to consider the psychological
aspects of testing, as they can interrupt the result of testing and can impact the performance of the end
product. The importance of these technological aspects is similar to any other tool or technique adopted for
the process of testing.The mindset of the team members, the communication between them, and most
importantly the test independence while performing the testing is crucial and needs great consideration.
Therefore, if you want your software testing to be free of any hurdles, do consider the psychological
aspects stated above.
CODE Verification:
The development of any software application/product goes through SDLC (Software Development Life
Cycle) where each and every phasis are very important and needs to follow accordingly to develop a
quality software product. Inspection is such an important element which have a great impact on the
software development process.
The software development team not only develops the software application rather during the coding
phase of software development they check for any error in the code of the software which is called code
verification. This code verification actually checks the software code in all aspects and finds out the
errors that exist in the code. Generally, there are two types of code verification techniques available i.e.
1. Dynamic technique – It is performed by executing some test data and the outputs of the program
are monitored to find errors in the software code.
2. Static technique – It is performed by executing the program conceptually and without any data.
Code reading, static analysis, symbolic execution, code inspection, and reviews, etc. are some of
the commonly used static techniques.
1. Informal review (Peer Review)(first review) - One on one with peers, no agenda or
preparation time Informal reviews do not have the rigor of a formal review. The reviews may not be
planned, or metrics may not be captured to measure review effectiveness. They are typically used to
confirm understanding, test ideas,brainstorm, etc.
Here Meeting is planned in advance, facilitated by a moderator, follows a proper process, participants
come prepared for the meeting. Reviewers are selected based on skill and knowledge.
Inspection:
-Formal, planned and structured meeting
-Pre review preparation is done by all participants
-Roles of all are defined
-Led by moderator
-Team includes: moderator, author, presenter=reader, inspectors=reviewers, recorder
-Objective: to find defects, collect data and communicate important information about the work product
-Process/phases: Planning- selecting people and documents to be reviewed, defining roles, deciding entry
and exit criteria
Kick Off- distributing documents and explaining them to all, checking entry
criteria fulfilled or not
Individual preparation- is done by all members before meeting
Review meeting- includes discussion and logging results (results are documented), taking decisions about
defects
Rework- author fixes the defects
Follow up- metrics (that is measurement of different software attributes) and checking if exit from
meeting/phase criteria is fulfilled
Different checklist is also prepared for various programming languages i.e. checklist for source code
are given separately for different source languages. There are some of the items of checklist that are
general and therefore require good deal of human judgment. Some possible checks that can be made
during the inspection process are given below:
1. Data Faults :
Check Are all of the variables of program initialized before their values are used?
Has all constant been given name?
Is there any chance of buffer overflow? Etc.
2. Control Faults :
Is the condition correct for each conditional statement?
Is each loop certain to terminate?
Are compound statements bracketed correctly or not?
3. Input/Output (I/O) Faults :
Are all of the input variables used or not?
Are all of the output variables assigned to a value before they are output?
Can input that are unexpected causes of corruption? Etc.
4. Interface Faults :
Does all method and functions have the correct number of parameters?
Do the type of parameters i.e. actual and formal matches?
Are the parameters present in the correct order?
Do they have the same model of shared memory structure, if all of the components access
shared memory?
5. Storage Management Faults :
Have all links been reassigned correctly, if a linked structure is modified?
Has space been correctly allocated, if dynamic storage is used?
Does the space get de-allocated explicitly after it is no longer required? Etc.
6. Exception Management Faults :
Do all possible error conditions been taken into account or consideration?
Example :
1. Requirement Inspection Checklist :
Do requirements exhibit a clear distinction among functions and data?
Do requirements exactly define all the information that is needed to be displayed to users?
Do requirements address system and user response to all conditions of error?
Is each of the requirements stated clearly, concisely, and unambiguously?
Is each of the requirements testable?
Are there any ambiguous or implied requirements present?
Are there any conflicting requirements?
Are there areas that are not addressed in the Software Requirements Specification (SRS) that is
needed to be?
Are performance requirements like response time, data storage requirements, etc. stated?
Technical review:
It is less formal review
It is led by the trained moderator but can also be led by a technical expert
It is often performed as a peer review without management participation
Defects are found by the experts (such as architects, designers, key users) who focus on the
content of the document.
In practice, technical reviews vary from quite informal to very formal
The goals of the technical review are:
1.To ensure that an early stage the technical concepts are used correctly
2.To access the value of technical concepts and alternatives in the product
3. To have consistency in the use and representation of technical concepts
4.To inform participants about the technical content of the document
Defect When the application is not working as per the Test Engineer
requirement.
1. QA Engineer:
This position generally covers more than testing processes. A software quality assurance engineer
constantly monitors each and every phase of the software development process and makes sure that the
developed software meets quality standards. Additionally, they make sure that the software products work
seamlessly without errors before they are pushed into production.
2. Test Manager
A test manager acts as a project manager. This is a management position within the QA or test team,
which is very common for custom software outsourcing organizations.
3. Test Engineer
This is generally used as an umbrella term to cover many capabilities. It can refer to many engineers
specialized in various testing approaches, such as manual testing, exploratory testing, performance
testing, etc. It is also widely used to infer a testing position that minimally relies on automation.
4. Test Analyst
This is a position that, rather than being more technical, focuses on business problems. Test analysts
ensure the functional readiness of the application is acceptable before it is pushed into production. They
generally design, develop, run, and troubleshoot tests to catch any defects or errors in the code in pre-
production environments.
Software testing job titles or positions are typically called “QA” or “test engineer”, but the technology
they use, the business domain they are in, the expertise they have, or even the type of testing they make
will differ.In the table below, you can review a summary of the core functions, responsibilities, required
overall skills, and knowledge of required tools of some common software testing roles.
What is SDLC?
SDLC is a systematic process for building software that ensures the quality and correctness of the
software built. SDLC process aims to produce high-quality software that meets customer
expectations. The system development should be complete in the pre-defined time frame and
cost. SDLC consists of a detailed plan which explains how to plan, build, and maintain specific
software. Every phase of the SDLC life Cycle has its own process and deliverables that feed into
the next phase. SDLC stands for Software Development Life Cycle and is also referred to as the
Application Development life-cycle.
Here, are prime reasons why SDLC is important for developing a software system.
It offers a basis for project planning, scheduling, and estimating
Provides a framework for a standard set of activities and deliverables
It is a mechanism for project tracking and control
Increases visibility of project planning to all involved stakeholders of the development
process
Increased and enhance development speed
Improved client relations
Helps you to decrease project risk and project management plan overhead
SDLC Phases
The entire SDLC process divided into the following SDLC steps:
SDLC Phases
This stage gives a clearer picture of the scope of the entire project and the anticipated issues,
opportunities, and directives which triggered the project.
Requirements Gathering stage need teams to get detailed and precise requirements. This helps
companies to finalize the necessary timeline to finish the work of that system.
This design phase serves as input for the next phase of the model.There are two kinds of design
documents developed in this phase:
Phase 4: Coding
Once the system design phase is over, the next phase is coding. In this phase, developers start
build the entire system by writing code using the chosen programming language. In the coding
phase, tasks are divided into units or modules and assigned to the various developers. It is the
longest phase of the Software Development Life Cycle process.
Phase 5: Testing
Once the software is complete, and it is deployed in the testing environment. The testing team
starts testing the functionality of the entire system. This is done to verify that the entire
application works according to the customer requirement.
During this phase, QA and testing team may find some bugs/defects which they communicate to
developers. The development team fixes the bug and send back to QA for a re-test. This process
continues until the software is bug-free, stable, and working according to the business needs of
that system.
Phase 6: Installation/Deployment
Once the software testing phase is over and no bugs or errors left in the system then the final
deployment process starts. Based on the feedback given by the project manager, the final
software is released and checked for deployment issues if any.
Phase 7: Maintenance
Once the system is deployed, and customers start using the developed system, following 3
activities occur
Bug fixing – bugs are reported because of some scenarios which are not tested at all
Upgrade – Upgrading the application to the newer versions of the Software
Enhancement – Adding some new features into the existing software
The main focus of this SDLC phase is to ensure that needs continue to be met and that the system
continues to perform as per the specification mentioned in the first phase.
First, Requirement gathering and analysis is done. Once the requirement is freeze then
only the System Design can start. Herein, the SRS document created is the output for
the Requirement phase and it acts as an input for the System Design.
In System Design Software architecture and Design, documents which act as an input
for the next phase are created i.e. Implementation and coding.
In the Implementation phase, coding is done and the software developed is the input for
the next phase i.e. testing.
In the testing phase, the developed code is tested thoroughly to detect the defects in the
software. Defects are logged into the defect tracking tool and are retested once fixed.
Bug logging, Retest, Regression testing goes on until the time the software is in go-live
state.
In the Deployment phase, the developed code is moved into production after the sign off
is given by the customer.
Any issues in the production environment are resolved by the developers which come
under maintenance.
Deliverables of each phase are well defined, and this leads to no complexity and
makes the project easily manageable.
Waterfall model is time-consuming & cannot be used in the short duration projects as
in this model a new phase cannot be started until the ongoing phase is completed.
Waterfall model cannot be used for the projects which have uncertain requirement or
wherein the requirement keeps on changing as this model expects the requirement
to be clear in the requirement gathering and analysis phase itself and any change in
the later stages would lead to cost higher as the changes would be required in all the
phases.
2 .Prototype Model
The prototype model requires that before carrying out the development of actual software, a
working prototype of the system should be built. A prototype is a toy implementation of the
system. A prototype usually turns out to be a very crude version of the actual system,
possible exhibiting limited functional capabilities, low reliability, and inefficient performance
as compared to actual software. In many instances, the client only has a general view of
what is expected from the software product. In such a scenario where there is an absence of
detailed information regarding the input to the system, the processing needs, and the
output requirement, the prototyping model may be employed.
–
A spiral model phase has 4 sector described below:
1. Planning phase
2. Risk analysis phase
3. Engineering phase
4. Evaluation phase.
Activities which are performed in the spiral model phases are shown below:
Phase
Activities performed Deliverables / Output
Name
Risk Requirements are studied and brain storming Document which highlights all the
Analysis sessions are done to identify the potential risks risks and its mitigation plans.
Evaluation Customers evaluate the software and provide their Features implemented document
Phase
Activities performed Deliverables / Output
Name
4) Agile Model
Agile Model is a combination of the Iterative and incremental model. This model focuses
more on flexibility while developing a product rather than on the requirement.In Agile, a
product is broken into small incremental builds. It is not developed as a complete product in
one go. Each build increments in terms of features. The next build is built on previous
functionality.
In agile iterations are termed as sprints. Each sprint lasts for2-4 weeks. At the end of each
sprint, the product owner verifies the product and after his approval, it is delivered to the
customer.
Customer feedback is taken for improvement and his suggestions and enhancement are
worked on in the next sprint. Testing is done in each sprint to minimize the risk of any
failures.
Advantages of Agile Model:
It allows more flexibility to adapt to the changes.
The new feature can be added easily.
Customer satisfaction as the feedback and suggestions are taken at every stage.
Disadvantages:
Lack of documentation.
Agile needs experienced and highly skilled resources.
If a customer is not clear about how exactly they want the product to be, then the
project would fail.
What are the differences between the Incremental and Evolutionary Software
Development Process?
In an incremental model, all the requirements are gathered before starting the incremental
development process. In the Software Requirement Specification (SRS) document, the scope is
defined and fixed based on the requirements. The entire development contract will be defined.
However, the minor deviation is possible in the scope but not entirely.
In the evolutionary model, it is not the case. After an overall understanding of the system, the
development team does not really capture all the requirements but starts with some core or riskier
modules. Here the prescribed scope is not defined. Sometimes, the project never converges as the
project manager does not know how much time and effort are required if the company signs this
project or project contract for the first time.
Incremental Model
1. The requirements are clear to the development team.
2. The requirements are split into slices, and one by one, slices are picked based on selection
criteria.
3. The development of each slice goes into multiple iterations for the refinement of functionality,
and in the end, a deliverable product is released.
4. It is called an increment, and in each increment, a deliverable product is given to the user.
5. In this model, requirements do change. But to a certain extend, like the addition and removal
of certain functionalities.
6. The development team knows how much has been completed and how much needs to be
complete soon.
7. Picking criteria for the incremental model: when the requirements are more or less fixed and
clearer to the customer. However, to mitigate risk, the development team involves the
customer for feedback, and after each increment, the product is given to the customer for
feedback. And feedback is incorporated in the subsequent increments to achieve the final
product which satisfies the customer’s requirements.
Evolutionary Model
1. The requirements are not clear, and it evolves during the development cycle.
2. At the initial stage, based on their understanding of the customer’s requirements, they
developed the core modules and functionalities and delivered them to the customer for
feedback.
3. This is called an iteration. In each iteration, they release a working software after performing
integration and level of testings.
4. The development team does not know how much has been completed and how much needs
to be complete in the near future.
5. Picking criteria for the evolutionary model: when the requirements are not clear.
Advantages:
In evolutionary model, a user gets a chance to experiment partially developed system.
It reduces the error because the core modules get tested thoroughly.
Disadvantages:
Sometimes it is hard to divide the problem into several versions that would be acceptable to the
customer which can be incrementally implemented and delivered.
Evolutionary models are iterative type models.
They allow to develop more complete versions of the software.
Test Plan
Test Scenarios
Test Cases
Priority
Severity
Verification
Validation
SDLC & STLC
1. Test Plan
A Test Case mentions the detailed inputs, execution conditions, steps to reproduce, test data,
the actual & expected results. Different test cases are designed and noted-down during the Test
Case Development phase of STLC which the testers later refer to, to check the application
performance.
Test Scenario is to Test the login functionality whereas Test Cases that are included in this Test
Scenario .
Test cases can be broadly classified into Functional & Non-functional or Positive & Negative.
People often get confused amongst – Test Scenarios and Test Cases. Here is a simple
example to quickly comprehend the difference between the two,
Test Case 1: Check results on entering valid User Id & valid Password
Test Case 2: Check results on entering Invalid User ID & valid Password
Test Case 3: Check results on entering valid User ID & Invalid Password
Test Case 4: Check results on entering Invalid User ID & Invalid Password
Test Case 5: Check response when fields are Empty & Login Button is pressed.
Priority specifies the level of urgency under which the bug needs to get resolved. Whereas
severity illustrates how critical the bug is, it basically describes the magnitude of impact if the
bug is not resolved. There are different levels of priority and severity, which are depicted in the
image below,
Verification is a static routine involving checking documents, structure, code, and program. It
incorporates activities involved in creating fantastic programming, including, assessment,
structure investigation, and detail examination. It is a moderate target process.
Validation is assessing the last item to check whether the product meets the clients’ desires
and prerequisites. It is a dynamic tool of approving and testing the real item.
It’s essential for a tester to possess a clear understanding of the process followed to develop
the product in their organization. Similar to SDLC, a proper process is followed to perform
software testing which is called STLC or Software Testing Life Cycle. Let’s catch some more
details about these processes.
5:SDLC vs STLC
SDLC
Software Development Life Cycle (SDLC) explains the journey of Software
Development. According to Wikipedia, SDLC is a process followed for software
development. It consists of a detailed strategy outlining how to develop, maintain,
replace, alter and enhance a specific software.
STLC
STLC illustrates a systematic and well-planned testing process which includes different
stages to make the testing process quick, effective and accountable. Unlike SDLC,
STLC – software testing life cycle identifies how test cases will be implemented and how
the testing would be conducted successfully.