SE Unit-6 Notes
SE Unit-6 Notes
Software Testing
Software Testing –
- Software testing is a procedure to verify whether the actual results are same as of
the expected results.
- Software testing is performed to provide assurance that the software system does
not contain any defects.
- Defects mean errors which are detected by tester when actual result of our
software module is not identical as expected result.
- Software testing helps us to find out whether all user requirements are fulfilled by
our software or not.
- Software quality depends on; at what extend software fulfils user requirements and
number of defects occurred in software.
- Software testing is used to give assurance that we deliver quality product to
customer.
- To perform software testing we create test cases and test data.
- Test Case is a collection of actions which applied on our software product to check
specific feature or functionality of it.
- Collection of test cases is called as test suit.
- Test data is the input provided to modules which are present in our software
product.
- Test data represents the data which effects execution of the particular module.
- Sometime test data is used for positive testing.
- That means it is used to check that a provided set of input for given function
generate expected result or not.
- Sometime test data is used for negative testing. That means test data is used to test
the capability of our software modules to handle unexpected input.
1. Finding defects which can be generated by the programmer while doing coding of
software.
2. Report the detected defects to developer for correction and after correction retest
the software product to give assurance that software does not contain any defect.
3. Software testing is done to give assurance that our software product fulfills all
requirements of end user.
4. To give assurance that we deliver quality software to our end user.
5. To make sure that it satisfies requirements present in the BRS (Business
Requirement Specification) and SRS (System Requirement Specifications).
6. To get the confidence of the customers by giving them a quality software product
which must be user friendly and fulfils all the requirements and expectations of
customer.
- Software testing life cycle is a sequence of various activities which helps to certify
software system.
- Software testing process activities are: Requirement analysis Test planning Test
case development environment up Test execution Test cycle closures.
- Each of the activity of software testing process has defined entry and exit criteria.
- Entry criteria: Entry criterions of testing are prerequisite conditions that must be
satisfied before testing begins.
- Exit criteria: An Exit criterion of testing describes the conditions that must be
satisfied before testing is concluded.
3. Understand the users of the software and develop a profile for each user
category
- Use-cases that describe the interaction scenario for each class of user can
reduce overall testing effort by focusing testing on actual use of the product.
7. Conduct formal technical reviews to assess the test strategy and test cases
themselves
- Formal technical reviews can uncover inconsistencies omissions and outright
errors in the testing approach.
- This saves time and also improves product quality.
8. Develop a continuous improvement approach for the testing process
- The test strategy should be measured. The metrics collected during testing
should be used as part of a statistical process control approach for software
testing.
1. Unit Testing
- In unit testing the main focus is on assessment of smallest unit of the product
design like component of the software or module. The unit testing has limited
scope and it emphasises on internal processing and data structures. Multiple
modules and components can be tested in parallel Unit test
- Unit Testing is a level of software testing
where individual units/components of a
software are tested. The purpose is to
validate that each unit of the software
performs as designed.
- A unit is the smallest testable part of any
software. It usually has one or a few
inputs and usually a single output.
- When is it performed? -- Unit Testing is
the first level of software testing and is performed prior to Integration Testing
- Who performs it? -- It is normally performed by software developers themselves
or their peers. In rare cases it may also be performed by independent software
testers.
- Stubs and Drivers In Unit Testing-
(1) Stubs- Assume we have 3 modules Module A Module B and Module C
Module A is ready and we need to test it but module A calls functions from
Module B and C which are not ready so developer will write a dummy
module which simulates B and C and returns values to module A. This
dummy module code is known as stub..
(2) Drivers- Now suppose we have Modules B and C ready but Module A which
calls functions from Module B and C is not ready so developer will write a
dummy piece of code for Module A which will return values to Module B
and C. This dummy piece of code is known as driver.
2. Integration Testing
- Integration testing is used for constructing the
software architecture.
- It is a systematic approach for conducting tests
to uncover interfacing errors.
- The main objective behind integration testing is
to accept all the unit tested components and
integrate into a program structure as given by
the design.
- Integration testing is a method of software testing in which all units of software
under test are integrated and tested as a single group
- It is always done after unit testing is applied.
- It mainly focuses on testing data communication among all units of system.
- It makes use of mythologies as Big bang approach and incremental approach
- Incremental approach can be either top-down bottom-up or combination of
both
- The main objective of integration testing is to determine faults in
communication between integrated units
Validation Testing ensures that the product actually meets the client's
needs. It can also be defined as to demonstrate that the product fulfills its
intended use when deployed on appropriate environment.
verification testing can be best demonstrated using V-Model. The artefacts such as test Plans requirement
specification design code and test cases are evaluated.
Activities:
1. Reviews
2. Walkthroughs
3. Inspection
Difference between verification and validation testing
Verification Validation
We check whether we are developing the We check whether the developed product
right product or not. is right.
Verification includes different methods like Validation includes testing like functional
Inspections, Reviews, and Walkthroughs. testing, system testing, integration, and
User acceptance testing.
The execution of code does not happen in In validation testing, the execution of code
the verification testing. happens.
In verification testing, we can find the In the validation testing, we can find those
bugs early in the development phase of bugs, which are not caught in the
the product. verification process.
Verification is done before the validation After verification testing, validation testing
testing. takes place.
In this type of testing, we can verify that In this type of testing, we can validate that
the inputs follow the outputs or not. the user accepts the product or not.
Differences between the Alpha testing and Beta testing are:
2. Alpha testing performed at the Beta testing doesn't need any lab
developer's site; it always needs a environment or the testing
testing environment or lab environment; it is performed at a
environment. client's location or end-user of the
product.
4. Alpha testing involves both white box Beta testing uses only black-box
and black-box techniques. testing.
5. Long execution cycles maybe require Only a few weeks are required for the
for alpha testing. execution of beta testing.
9. Alpha testing performed nearly the end Beta testing is a final test before
of the software development. shipping a product to the customers.
10. Alpha testing is conducting in the Beta testing reversed of alpha testing.
presence of developers and the
absence of end-users.
2 Black Box Testing is also White Box Testing is Grey Box Testing is
known as functional testing, also known as also known as
data-driven testing, and structural testing, translucent testing as
closed box testing. clear box testing, the tester has limited
code-based testing, knowledge of coding.
and transparent
testing.
4 The testing space of tables The testing space of The testing space of
for inputs (inputs to be used tables for inputs tables for inputs
for creating test cases) is (inputs to be used for (inputs to be used for
pretty huge and largest creating test cases) is creating test cases) is
among all testing spaces. less as compared to smaller than Black
Black Box testing. Box and White Box
testing.
8 Tester, developer and the Only tester and Tester, developer and
end user can be the part of developer can be a the end user can be
testing. part of testing; the end the part of testing.
user can not involve.
11 The base of this testing is The base of this Testing based on high-
external expectations testing is coding which level database
internal behavior is is responsible for diagrams and
unknown. internal working. dataflow diagrams.
Object Oriented testing can be performed at different levels to detect the issues. At the
algorithmic level, a single module of every class should be tested. As discussed earlier, testing
of classes is the main concern of the Object Oriented program. Every class gets tested as an
individual entity at the class level. Generally, programmers who are creating the classes are
involved in testing. Test cases for Object-Oriented Testing in Software Testing can be
constructed based on the requirement specifications, programming language, and models.
Once class-level testing is done, Cluster level testing will be performed. Cluster-level testing is
the integration of individual classes. The main purpose of doing integration testing is to verify
the interconnection between classes and how well they perform interclass interactions. Thus,
Cluster level testing can be viewed as integration testing of classes.
Once Cluster level testing is performed, system-level testing begins. At this level, integration
between clusters can be taken care of. Also, at each level regression testing is a must after
every new release.