Unit 1:basic of Software Testing
Unit 1:basic of Software Testing
Unit 1:basic of Software Testing
Test Case
A test case is a specific procedure of testing a particular requirement.
It will include:
• Identification of specific requirement tested
• Test case success/failure criteria
• Specific steps to execute test
• Test Data
ENTRY CRITERIA
Entry Criteria for QA testing is defined as “Specific conditions or on-going activities that must be present
before a process can begin”. In the Systems Development Life Cycle it also specifies which entry criteria are
required at each phase. Additionally, it is also important to define the time interval or required amount of lead
time that an entry criteria item is available to the process. Input can be divided into two categories. The first is
what we receive from development. The second is what we produce that acts as input to later test process
steps.
The type of required input from development includes:
1.Technical Requirements/Statement of Need
2.Design Document
3.Change Control
4.Turnover Document
The type of required input from test includes:
5.Evaluation of available software test tools
6.Test Strategy
7.Test Plan
8.Test Incident Reports
By referencing the Entry Exit Criteria matrix, we get the clarity of the deliverables expected from each phase.
The matrix should contain “date required” and should be modified to meet the specific goals and
requirements of each test effort based on size and complexity.
EXIT CRITERIA
Exit Criteria is often viewed as a single document concluding the end of a life cycle phase. Exit Criteria
is defined as “The specific conditions or on-going activities that must be present before a life cycle
phase can be considered complete. The life cycle specifies which exit criteria are required at each
phase”. This definition identifies the intermediate deliverables, and allows us to track them as
independent events.
• Verification
• Are you building the product right?
• Software must conform to its specification
• Validation
• Are you building the right product?
• Software should do what the user really requires
What is Verification?
• Definition : The process of evaluating software to determine whether the
products of a given development phase satisfy the conditions imposed at the
start of that phase.
• Verification is a static practice of verifying documents, design, code and program.
It includes all the activities associated with producing high quality software:
inspection, design analysis and specification analysis. It is a relatively
objective process.
• Verification will help to determine whether the software is of high quality, but it
will not ensure that the system is useful. Verification is concerned with whether
the system is well-engineered and error-free.
• Methods of Verification : Static Testing
• Walkthrough
• Inspection
• Review
What is Validation?
4. Verification uses methods like inspections, reviews, 4. Validation uses methods like black box (functional)
testing, gray box testing, and white box (structural) testing
walkthroughs, and Desk-checking etc.
etc.
5. Verification is to check whether the software conforms 5. Validation is to check whether software meets the
to specifications. customer expectations and requirements.
6. It can catch errors that validation cannot catch. It is low 6. It can catch errors that verification cannot catch. It is High
level exercise. Level Exercise.
7. Target is requirements specification, application and
7. Target is actual product-a unit, a module, a bent of
software architecture, high level, complete design, and
database design etc. integrated modules, and effective final product.
8. Verification is done by QA team to ensure that the 8. Validation is carried out with the involvement of testing
software is as per the specifications in the SRS document. team.
9. It generally comes first-done before validation. 9. It generally follows after verification.
In the V-Model software development life cycle different steps are
followed however here we will taking a most common type of V-
model example. The V-model typically consist of the following
phases:
1. Static Testing :
Static testing is the testing of the software work products manually,
or with a set of tools, but they are not executed.
It starts early in the Life cycle and so it is done during the
verification process.
It does not need computer as the testing of program is done without
executing the program. For example: reviewing, walk through,
inspection, etc.
Static testing consists of following methods
1) Walkthrough 2) Inspection 3) Technical Review
Advantages of Static Testing
Since static testing can start early in the life cycle, early feedback
on quality issues can be established.
By detecting defects at an early stage, rework costs are most often
relatively low.
Since rework effort is substantially reduced, development
productivity figures are likely to increase.
The evaluation by a team has the additional advantage that there is
an exchange of information between the participants.
Static tests contribute to an increased awareness of quality issues.
Disadvantages of Static Testing
Demand great amount of time when done manually
Automated tools works with only few programming languages
Automated tools may provide false positives and false negatives
Automated tools only scan the code
Automated tools cannot pinpoint weak points that may create troubles in run-time
2. Dynamic Testing
Dynamic testing (or dynamic analysis) is a term used in software engineering to describe
the testing of the dynamic behavior of code.
That is, dynamic analysis refers to the examination of the physical response from the
system to variables that are not constant and change with time.
In dynamic testing the software must actually be compiled and run.
Advantages of Dynamic Testing
Dynamic testing could identify the weak areas in the runtime environment.
Dynamic testing supports application analysis even if the tester does not have an
actual code.
Dynamic testing could identify some vulnerabilities that are difficult to find by static
testing.
Dynamic testing also could verify the correctness of static testing results.
Dynamic testing could be applied to any application.
Reviewers - The reviewers evaluate the document under test to determine if it is technically
accurate.
Scribe - The scribe is the recorder of the structured walkthrough outcomes who records the
issues identified and any other technical comments, suggestions, and unresolved questions.
Benefits of Structured Walkthrough
Saves time and money as defects are found and rectified very early in the lifecycle.
This provides value-added comments from reviewers with different technical backgrounds and
experience.
It notifies the project management team about the progress of the development process.
It creates awareness about different development or maintenance methodologies which can
provide a professional growth to participants.
2) Inspection
The trained moderator guides the Inspection. It is most formal type of
review.
The reviewers are prepared and check the documents before the meeting.
In Inspection, a separate preparation is achieved when the product is
examined and defects are found. These defects are documented in issue log.
In Inspection, moderator performs a formal follow-up by applying exit
criteria.
Goals of Inspection
Assist the author to improve the quality of the document under inspection.
Efficiently and rapidly remove the defects.
Generating the documents with higher level of quality and it helps to
improve the product quality.
It learns from the previous defects found and prohibits the occurrence of
similar defects.
Generate common understanding by interchanging information.
3) Technical Review
Technical review is a discussion meeting that focuses on technical content of the
document. It is a less formal review.
It is guided by a trained moderator or a technical expert.
i. The most straightforward form of code coverage is called statement coverage or line
coverage.
ii. If you‘re monitoring statement coverage while you test your software, your goal is to make
sure that you execute every statement in the program at least once.
iii. With line coverage the tester tests the code line by line giving the relevant output.
For example
1. #include
2. void main()
3. {
4. int i , fact= 1, n;
5. printf(―enter the number ―);
6. scanf(―%d‖, &n);
7. for(i =1 ;i <=n; i++)
8. fact = fact * i;
9. printf(“\n Factorial of number is %d”,fact);
10. }
Black Box Testing
Black Box Testing, also known as Behavioral Testing, is a software testing method in which the
internal structure/ design/ implementation of the item being tested is not known to the tester. These
tests can be functional or non-functional, though usually functional
Tester need not know programming languages or how the software has been implemented.
Disadvantages of black box testing
Only a small number of possible inputs can be tested and many program paths will be left
untested.
Without clear specifications, which is the situation in many projects, test cases will be difficult to
design.
Tests can be redundant if the software designer/ developer has already run a test case.
Ever wondered why a soothsayer closes the eyes when foretelling events? So is almost the case in
Black Box Testing.
Requirements-based testing is a testing approach in which test cases, conditions and data are derived from requirements. It
includes functional tests and also non-functional attributes such as performance, reliability or usability.
2) Boundary Value Analysis
3) Equivalence Partitioning
The set of input values that generate one single expected output is
called a partition.