Unit II Test Case Design
Unit II Test Case Design
• Test case ID
• Test scenario
• Test case description
• Test steps
• Test data
• Expected result
• Test parameters
• Actual result
• Environment information
• Comments.ets
Testing Strategies:
Basic testing strategies,
1. Black Box Testing (BBT)
2. White Box Testing (WBT)
Types:
1. Explicit requirement – as a part of requirement specification
2. Implicit requirement – not documented
It checks,
• Consistency
• Correctness
• Completeness
• Traceability
RTM: Requirement Traceability Matrix
Requirements
Deliverables
Testing
Sample requirement specification format
S.No Requirement Description Priority (high, med,
identifier low)
. . . . . . . . . . . . 0 1 2 3 . . . . . . . . . . . . . . . . . . . . . . . . .99 100 . . . . . . . . . .
Boundary value conditions
Min - pass
Min – 1 - fail
Min + 1 - pass
Max - pass
Max +1 - fail
Max – 1 - pass
In above example,
Min= 1
Max = 99
• The rationale behind boundary value analysis is that errors tend to occur
near the extreme values of an input variables
• Programs written in non strongly typed language are more appropriate
candidate for BVA
• In our discussion we assume a program p accepting 2 inputs,
• Boundary in equalities of ‘n’ input variables define an n-dimensional input
space
• BVA is to select input variables values for min, above min, normal value,
below max, max.
• Variables are program dependent, language dependant, bounded discrete
unbounded discrete and logical variables
State Based Testing
• State Transition is based on the concepts of states and finite-state machines.
Use
• A set of arrows between nodes indicate what inputs or events will cause a
or arrow.
Simple state transition
graph
• S1 , S2 - two states of interest.
• Black dot – is a pointer to the initial state from outside the machine.
• The arrows display inputs/actions that cause the state transformations in the
arrow directions
• The STG developer must ensure that this new state has the proper connections
to the unchanged states from the original STG.
• Another way to simplify the STG is to use a state table representation which
may be more concise
State Table
• The state table lists the inputs or events that cause state transitions.
• For each state and each input the next state and action taken are listed.
• Therefore, the tester can consider each entity as a representation of a state
transition
A state
table
Review
s
• We will assume that the STGs have been prepared by developers or analysts as
a part of the requirements specification.
• TheSTGs should be subject to a formal inspection when
the requirement/specification is reviewed.
• This step is required for organization assessed at TMM level 3 and higher
Points to be analyzed in
reviews
• It is essential that testers be present at the reviews.
• From the tester’s view point the review should ensure that
– the proper number of states are represented,
• Input A in S2
• Input B in S1
• Input B in S2
• Input C in S1
• Input C in S2
Cause-and-effect
graphing
Cause-and-effect
graphing
Weakness with equivalence class partitioning is
• Advantages
– development of the rules and the graph from the specification allows a
thorough inspection of the specification.
Compatibility Testing
•Compatibility is the ability of living and work together without any
discrepancy.
•Compatible software applications also work on same setups. For example, if
Google.com site is compatible, then it should open in all browsers
and
operating system.
•Compatibility is a non- functional testing to ensure customer satisfaction.
•It is to determine whether your software application or product is proficient
enough to run in different browsers, database, hardware, operating system,
mobile devices and networks.
•Application could also impact due to different versions, resolution, internet
speed and configuration etc.
•Hence it’s important to test the application in all possible manners to reduce
failures and overcome from embarrassments of bug’s leakage.
Parameters of Software
compatibility testing:
Hardware :
It checks software to be compatible with different hardware configurations .
Operating Systems:
It checks your software to be compatible with different Operating Systems like
Windows , Unix , Mac OS etc.
Software:
It checks your developed software to be compatible with other software's.
For example: MS Word application should be compatible with other software like
MS Outlook,MS Excel , VBA etc.
Network:
Evaluation of performance of system In network with varying parameters such as
Bandwidth, Operating speed, Capacity.
It also checks application in different networks with all parameters mentioned earlier.
Browser:
It checks compatibility of your website with different browsers like Firefox ,
Google Chrome , Internet Explorer etc.
Devices :
It checks compatibility of your software with different devices like USB port
Devices, Printers and Scanners, Other media devices and Blue tooth.
Mobile:
Checking you software is compatible with mobile platforms like Android , iOS
etc.
• Versions of the software:
7 SP 2 , Windows 7 SP 3.
• Backward compatibility Testing
Horizontal combination
Intelligent Sampling
Compatibility matrix for a mail
application
Tools for compatibility testing
Adobe Browser Lab - Browser Compatibility Testing:
• Improves usability
– Not all software was written for the Mac :-)
• Improves reliability
– Testing the documentation is part of black-box testing.
Static testing tool takes application code as input generates a varity of data
in the test process.
Static Testing:
1. Humans
2. Tools
Methods- human
3. Desk checking of the code
4. Code walkthrough
5. Code review
6. Code inspection
•The meeting is usually led by the author of the document under review and
attended by other members of the team
•Before walkthrough meeting, the preparation by reviewers and then review report
with a list of findings
Formal inspection
• Inspection is the most formal form of reviews, strategy adopted during static
testing phase
• It helps to find all faults, violation and defects
• This inspection plan helps to,
•Statement purpose
•Work product to be inspected
•Team formation, roles and tasks to be done.
Steps :
• Inspection team assembles at the agreed time of the inspection meeting
• Moderator asks the team to look the code , find any defect
1. Minor / Major
2. Systematic / Misexecution
• A scribe / recorder will document the defects found in an inspection meeting
2. Static Analysis By Tools:
It reduces the manual work , errors like
• If any unreachable code is available or not
• Variables declared but not used
• Mismatch in definition and assignment of values to variables.
• Use of non portable programming constructs
• Memory allocated
• Calculation of cyclomatic complexity
It is a white box testing technique which takes into account the internal structure
of a system or components and ensures that each program statement performs its
intended function.
Code Functional Testing:
Several methods,
For example,
(iii) conditions (expressions that evaluate to true/false, and do not contain any
other true/false-valued expressions);
• The value of V(G) is used to approximate the testing time and resources required to test
a software module.
• The cyclomatic complexity value and the control flow graph give the tool for
developing test cases using the concept of a path.
• A path is a sequence of control flow nodes usually beginning from the entry node of a
graph through to the exit node.
• A path may go through a given segment of the control flow graph one or more times.
We usually designate a path by the sequence of nodes it encompasses.
1-2-3-4-5-7-4-8
• 1-2-3-4-8
(i) 1-2-3-4-8
(ii) 1-2-3-4-5-6-7-4-8
(iii)1-2-3-4-5-7-4-8
• The number of independent paths in a basis set is equal to the
cyclomatic complexity of the graph.
• Every path (as distinguished from independent paths) in a module
must be exercised by the test set at least once.
• It is the strongest program-based testing criterion, and it calls for
of paths.