Software Testing: Time: 2 HRS.) (Marks: 75
Software Testing: Time: 2 HRS.) (Marks: 75
Software Testing: Time: 2 HRS.) (Marks: 75
V
Software Testing
Time : 2 Hrs.] Prelim Question Paper Solution [Marks : 75
1
Ac : T.Y. B.Sc. (IT)ST
(2) Exhaustive testing is not possible. Testing everything is not feasible except for trivial
cases, instead of exhaustive testing, we use risks & priorities to focus testing efforts.
(3) Testing activities should start as early as possible testing activities should start as
early as possible in the software of or system development life cycle & should be
focused on defined objectives.
(4) Defects tend to cluster together. A small number of modules contain most of the
defects discovered during prerelease testing or show the most operational failures.
(5) The pesticide paradox, If the test are repeated over & over again, eventually the same
set of test cases will no longer find any new bugs. To overcome this pesticide paradox
the test cases need to be regularly reviewed & revised & new & different tests need to
be written to exercise different parts of the software or system to potentially find
more defects.
(6) Test is context dependent, Testing is done differently in different dependent
context. e.g. safety critical software in tested differently from as e-commerce site.
(7) The fallacy of assuming that no failures means a useful system. Finding & fixing defects
does not help if the system build is unusable & does not fulfill the users needs &
expectations.
2
Prelim Question Paper Solution
Regression Testing :
Regression testing involves executing test cases that have been executed before. For
regression testing, the test cases probably passed the last time they were executed.
The fix may have introduced or uncovered a different defects elsewhere in software. The
way to detect these unexpected side effects of fixes is to do regression testing.
Regression tests are executed whenever the software changes, either as a result of fixes
or new or changed functionality. It is also a good idea to execute them when some aspect of
the environment changes, for example when a new version of a database management system
is introduced or a new version of a source code compiler is used.
V Model
3
Ac : T.Y. B.Sc. (IT)ST
4
Prelim Question Paper Solution
1. Planning :
The review process for a particular review begins with a request for review by the
author to the moderator (or inspection leader). The leader is often assigned to take
care of the scheduling (date, time, place and invitation) of the review.
During overall planning, the management must decide which documents in the software
development process are subject to which review technique.
During planning of the individual review, the review leader selects technically competent
staff and assembles a review team. In cooperation with the author of the document to
be reviewed, he makes sure that the document is in a reviewable state. i.e. it is complete
enough and the work on it has been finished.
5
Ac : T.Y. B.Sc. (IT)ST
3. Preparation :
In this stage, intensive study of the review object happens.
The members of the review team must prepare individually for the review meeting. A
successful review meeting is only possible with adequate preparation. The reviewer
intensively studies the review object and checks it against the document given as a basis
for it. They note deficiencies, questions or comments.
The annotated document is to be given to the author at the end. Using checklist during
this phase can make reviews more effective. For eg. A specific checklist based on
perspectives such as user, maintainer, tester or a checklist for typical coding problems.
A critical success factor for a thorough preparation is the number of pages checked per
hour. This is called as checking rate. The optimum checking rate is the result of multiple
factors such as type of document, its complexity, the number of related documents and
the experience of the reviewer.
Usually the checking rate is 5 to 10 pages per hour. But may be much less for the
formal inspection one page per hour.
4. Review meeting :
The review meeting is led by a review leader or moderator. Managing and participating in
the review requires good people management skills in order to protect the participating
people and motivate them to best contribute to the review.
The review leader must ensure that all experts will be able to express their opinion
without fear that the product will be evaluated and not the author, and conflicts will be
prevented.
The objective of the review meeting is to decide if the review object has met the
requirements and complies with the standards, as well as to find defects. The result is a
recommendation to accept repair. All the reviewers should agree upon the findings of
this evaluation and the general result.
The meeting consists of the following elements
> Logging phase
> Discussion phase
> Decision phase
Logging phase during this phase, the issues e.g. defects that have been identified
during the preparation are mentioned page by page, reviewer by reviewer and are logged
either by the author or a scribe.
> If an issue needs discussion, the item is logged and then handled in the discussion phase.
> A detailed discussion on whether an issue is a fault or not is very meaningful. In
spite of the opinion of the team, a discussed and discarded defect may well turn out
to be a real one during rework.
> Every defect and its severity should be logged.
Critical defect will cause downstream damage, the scope and the impact of
the defect is beyond the document under inspection.
Major defects could cause a downstream effect (e.g fault in a design can
result in a n error in the implementation)
Minor defects are not likely to cause downstream damage (e.e. non-
compliance with the standards)
> During the logging phase, the focus is on logging as many defects as possible within
a certain time. To ensure this, the moderator tries to keep a good logging rate.
Discussion phase :
> The issue classified as discussion items will be handled during this meeting phase.
> Reviewers who do not need to be in the discussion phase may leave or stay a learning
exercise. The outcome of the discussion is documented for future reference.
Decision phase :
> At the end of the meeting, a decision on the document under review has to be made
by the participants, based on the exit criteria.
6
Prelim Question Paper Solution
> The most important exit criteria is the average number of critical and /or major
defects found per page. If the number of defects found per page exceeds a certain
level, the document must be reviewed again, after it has been reworked.
> If the document complies with the exit criteria, the document will be checked during
follow-up by the moderator. Subsequently, the document can leave the review process.
5. Rework :
Based on the defects detected, the author will improve the document under review step
by step.
Not every defect that is found leads to rework. it is the authors responsibility to judge
if a defect has to be fixed. If nothing is done about an issue for a certain reason, it
should be reported to at least indicate that the author has considered the issue.
Changes that are made to the document should be easy to identify during follow-
up. Therefore the author has to indicate where changes are made.
6. Follow-up :
The moderator is responsible for ensuring that satisfactory actions have been taken
on all defects, process improvements suggestions.
Although the moderator checks to make sure that the author has taken action on all known
defects, it is not necessary for the moderator to check all the corrections in detail.
If it is decided that all the participants will check the updated document, the
moderator takes care of the distribution and collects the feedback.
Recurring defect types point to deficiencies in the software development process.
Such defect types should be included in the checklist.
Find a 'champion'
A champion is needed, one who will lead the process on a project or organizational level.
He needs expertise, enthusiasm and a practical mindset in order to guide moderators
and participants.
The authority of this champion should be clear to the entire organization.
Management support is also essential for success.
He should, amongst other things, incorporate adequate time for review activities in
project schedules.
7
Ac : T.Y. B.Sc. (IT)ST
The engineers involved are prompted to schedule time for preparation and, very
importantly, rework.
Tracking these hours will improve planning of the next review.
As stated earlier, management plays an important part in planning of review activities.
Train participants
It is important that training is provided in review techniques, especially the more formal
techniques, such as inspection.
Otherwise the process is likely to be impeded by those who don't understand
the process and the reasoning behind it.
Special training should be provided to the moderators to prepare them for their critical
role in the review process.
Report results
Report quantified results and benefits to all those involved as soon as possible, and
discuss the consequences of defects if they had not been found this early.
Costs should of course be tracked, but benefits, especially when problems don't occur in
the future, should be made visible by quantifying the benefits as well as the costs.
Just do it!
The process is simple but not easy.
Each step of the process is clear, but experience is needed to execute them correctly.
So, try to get experienced people to observe and help where possible. But most
importantly, start doing reviews and start learning from every review.
8
Prelim Question Paper Solution
Q.3(d) Define exit criteria in software testing. What is its purpose? Write few [5] examples
of exit criteria.
(A) Exit criteria : For formal reviews the moderator & always performs an entry check &
defines the formal exit criteria.
Once the document passes the entry criteria check the moderator & author decide which
part of the document to review. The human mind can comprehend a limited set of pages at
one time, the number should not be too high. The maximum number of pages depends on the
objective, review type & document type & should be derived from practical experiences
within the organization. For a review, the maximum size is usually between 10 & 20 pages.
In formal inspection, only a page or two may be looked at in depth in order to find the most
serious defects that are not obvious.
After the document size has been set & the pages to be checked have been selected,
the moderator determines the composition of the review team.
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."
e.g.
9
Ac : T.Y. B.Sc. (IT)ST
(b) If number of values should be entered then create one valid (all possible correct
values) and two invalid (less and more than the correct number) equivalence classes
are defined.
Input Range : Specific value x = 5
Valid x 5
Invalid x<5
x>5
(c) If a set of values are specified where ach value may possibly be treated differently
then create one valid equivalence class for each value of the set (containing exactly
these values) and one addition invalid equivalence class (containing all possible other
values) are defined.
Input : Member of set
x = {a, e, i, o, u}
Valid x {a, e, i, o, u}
Invalid x {a, e, i, o, u}
(d) If there is a condition that must be fulfilled then create one valid and one
invalid equivalence class to test the condition fulfilled or not.
Input : Boolean value
Valid : True
Invalid : False
in a = 3, b = 2, c = 5
if (a + b = = c && b < c)
(vii) Test completion criteria for equivalence class portioning can be defined as equivalence
class coverage.
Number of Tested EC
EC coverage = 100
Total number of EC
(iii) It test with boundary value usually discovers the failure. On the boundary condition
because BVA checks the borders of an equivalence class and on every border exact
boundary value and both nearest adjacent values (Inside or Outside equivalence class) are
tested.
(iv) If the input condition for program is the range within the closed interval
i.e. [a, b] then using BVA we have 6 possible test cases as
a 1, a+b, b 1, b+1. Where valid a, a + 1, b 1, b
invalid a b, b + 1
(v) An input file has restricted number of data records between 1 to 100, the test value
should be 1, 2, 99, 100.
(vi) If permitted number of output values is to be tested, then proceed same as the number
of input values. Say if output of 1 to 4 data values are allowed than test cases are 0, 1,
4, 5.
(vii) Test completion criteria for BVA :
Number of tested value boundary
Boundary Value Coverage =
100 Total number of boundary value
10
Prelim Question Paper Solution
Q.4(b) Compare Black Box Testing and White Box Testing. [5]
(A)
Black box testing White box testing
(i) Here internal structure Here internal
design/implementation of the item being structure/design/implementation of the
tested is NOT known to the tester. item being tested is known to the tester.
(ii) Mainly applicable to higher levels of Mainly applicable to lower levels of
testing : Acceptance testing, system testing : Unit testing, Integration
testing. testing.
(iii) Generally independent software testers. Generally software developers.
(iv) Knowledge of programming is not Knowledge of programming is required.
necessary.
(v) Focus on functionality of the system. Focus on structure i.e. program/code of
the system.
(vi) Mostly done by testers. Mostly done by developers.
(vii) Also known as specification based testing. Also known as structured based testing.
(i) State
Communication ends
(a) In many cases not only the current input but also the history of execution or events or
inputs influences the output and how the test object will behave to illustrate the
depends on history, state transition diagram is sued.
(b) State transition diagrams are the basis of designing test cases during state transition
technique. The system or test object start from initial state and can then came into
different states. Events trigger state transition where an event normally is a function
invocation.
(c) State transition diagram can invoke action, resides the initial state the other special
state is an end state which is optional for state transition diagram.
(d) Finite state machine or state transition diagram shows behavior of the system. State
transition diagram is a diagram which depicts the states that the system or component
can assume and shows the event or circumstances that cause or result for a change of
state from one to another.
11
Ac : T.Y. B.Sc. (IT)ST
(e) Consider state transition diagram for stack operation, the test cases can be given as
pre-condition.
(1) Stack is initialized Stack is empty.
(2) Input Push an element into stack (push Hello).
(3) Expected result Stack contains Hello
Q.4(d) Explain the testing technique which is used when there is no specification, or if [5]
the specification is inadequate or out of date.
(A) Test technique used when there is no specification is the experienced base
technique : It is of two types :
(i) Error guessing : It is a testing technique based on guessing. It depends on skill of
tester. The tester acquires this skill from his prior experience. Error guessing mainly
depends on the skills and understanding of the tester.
It is considered as an effective test case design technique as it covers all possible test cases.
(ii) Exploratory testing : It is hands on approach in which testers are involved in minimum
planning & maximum text execution. The planning includes the creation of a test cases, a
short declaration of the scope of a short time-boxed test efforts, the objectives &
possible approaches to be used.
The test design & test execution activities are performed in parallel typically
without formally documenting the test conditions, test cases of test scripts.
Test logging is undertaken as test execution is performed, documenting the key
aspects of what is tested any defects found and any thoughts about possible further
testing. It can also serve to complement other formal testings.
12
Prelim Question Paper Solution
Sometimes test leader wear different titles such as test manager, or test coordinator.
Alternatively, the test leader role may wind up assigned to a project manager, a
development manager or a quality assurance manager.
Q.5(c) Explain incident report life cycle with help of an example. [5]
(A) Incident report life cycle :
Incident report describes some situation, behavior or event that occurred during
testing that requires further investigation.
Incident report are managed through a life cycle from discovery to resolution. The
incident report life cycle is often shown by transition diagram.
All incident reports more through a series of clearly identified states after being reported.
Some of these state transitions occur when a member of the project team completes some
assigned task related to closing an incident report & so on.
The path taken by incident reports which are ultimately fixed, After an incident is
reported, a peer or test manager reviews the report. If successful in the review, the
incident report becomes opened. If the defect is to be repaired, a program is assigned to
repair it.
13
Ac : T.Y. B.Sc. (IT)ST
for
Reported Opened Repair Assigned Fixed
rep. Rewritten
Bad
Once the programmer believes the repairs are complete the incident report returns to the
tester for confirmation testing. If the confirmation test fails, the incident report is re-opened
& then re-assigned. Once the tester confirms a good repair, the incident report is closed.
No further work remains to be done the owner is responsible for transitioning the incident
into an allowed subsequent state. The arrows in the diagram show these allowed transitions.
Q.5(d) Explain risk based testing and project v/s product risk [5]
(A) Risk Based testing
Testing oriented towards exploring and providing information about product risks.
Testing efforts can be organized in a way that reduces level of product risk when the
system ships.
Risk based testing uses risk to prioritize and emphasize the appropriate tests during
test execution.
Risk-based testing starts early in the project, identifying risks to system quality and
using that knowledge of risk to guide testing planning, specification, preparation and
execution.
Risk based testing also involves measuring how well we are doing at finding and removing
defects on critical areas.
It starts with product risk analysis.
One technique for risk analysis is reading the requirements specification,
design specifications, user documentation and other items.
Risk analysis is performed by asking , What should we worry about?.
When we talk about specific risks, we mean a particular kind of defect or failure what
might occur. For ex, if you were testing the calculator utility that is bundled with
Microsoft Windows, you might identify incorrect calculation as a specific risk with the
category of functionality.
Product Risks (factors relating to what is produced by the work, i.e the thing we are
testing)
It is a risk to product quality.
Product risks is a risk directly related to the test object.
The delivered product has inadequate functional quality or is nonfunctional. The product
is not fit for its intended use and is thus unusable.
Product risk can be thought of as the possibility that the system or software might fail
to satisfy some reasonable customer, user expectation.
Unsatisfactory software might omit some key functions- that the customer specified.
Unsatisfactory software might fail in ways that cause financial or other damage to a
user or the company that user works for.
Project Risks
A risk related to management and control of the project.
14
Prelim Question Paper Solution
There are direct risks such as the late delivery of the test items to the test team
or availability issues with the test environment.
There are indirect risks such as excessive delays in repairing defects found in testing
or problems with getting professional system admin support for the test environment. To
discover risks, ask yourself and other project participants , What could go wrong on
the project to delay or invalidate the test plan, the test strategy and test estimate?. What
are unacceptable outcomes of testing or in testing? What are the likelihoods and
impacts of each of these risks?
Q.6(b) Explain Dynamic analysis tools used for Performance Monitoring. [5]
(A) Dynamic analysis tools
Detecting memory leaks;
Identifying pointer arithmetic errors such as null pointer;
Identifying time dependencies.
15
Ac : T.Y. B.Sc. (IT)ST
Monitoring tools :
Monitoring tools used to continuously keep track of the status of the system in use, in
order to have the earlier warning of problems and to improve service.
These are monitoring tools for servers, networks, databases, security etc
Identifying problems and sending an alert message to the admin.
Logging real-time and historical information.
Finding optimal settings
Monitoring the number of users on a network.
Monitoring network traffic.
Q.6(d) Describe the features of Test design of test execution tools. [5]
(A) Features of test execution tools include support for :
Capturing (recording) test inputs while tests are executed manually.
Storing an expected result in the form of a screen or object to compare to, the next
time the test is run.
Executing tests from stored scripts and optionally data files accessed by the script
(if data-driven or keyword-driven scripting is used).
Dynamic comparison (while the test is running) of screens, elements, links, controls,
objects and values.
Ability to initiate post-execution comparison.
Logging results of tests run 9pass/fail, differences between expected and
actual results).
Masking or filtering of subsets of actual and expected results, for example excluding
the screen-displayed current date and time which is not of interest to a particular test.
Measuring timings for tests.
Synchronizing inputs with the application under test, e.g. wait until the application is ready to
accept the next input, or insert a fixed delay to represent human interaction speed.
Sending summary results to a test management tool.
16
Prelim Question Paper Solution
Q.7(b) Explain Alpha & beta testing with reference to acceptance testing. [5]
(A) Alpha Testing
This test is the first stage of testing and will be performed amongst the teams (developer
and QA teams). Unit testing, integration testing and system testing when combined are
known as alpha testing. During this phase, the following will be tested in the application:
Spelling Mistakes
Broken Links
Cloudy Directions
The Application will be tested on machines with the lowest specification to test loading
times and any latency problems.
Beta Testing
This test is performed after Alpha testing has been successfully performed. In beta
testing a sample of the intended audience tests the application. Beta testing is also known
as pre-release testing. Beta test versions of software are ideally distributed to a wide
audience on the Web, partly to give the program a "real-world" test and partly to provide a
preview of the next release. In this phase the audience will be testing the following:
Users will install, run the application and send their feedback to the project team.
Typographical errors, confusing application flow, and even crashes.
Getting the feedback, the project team can fix the problems before releasing the
software to the actual users.
The more issues you fix that solve real user problems, the higher the quality of your
application will be.
Having a higher-quality application when you release to the general public will increase
customer satisfaction.
Q.7(c) Explain roles of responsibilities of moderator, reviewer of author in review [5] process.
(A) The Following are the members and there responsibilities in the review process.
(1) Moderator
(a) He is a chairperson of the entire review process.
(b) Moderator determines inco operation with author, the type of review, approach and
composition of review team.
17
Ac : T.Y. B.Sc. (IT)ST
(c) The moderator is responsible for scheduling of review process ie. date, time, venue,
agenda of review process will be determined by review.
(d) Moderator prepare policy, plan and objectives of review process.
(e) The training of reviewer can be conducted by moderator.
(f) Moderator performs entry check and exit criteria.
(g) Moderator can keep a track of follow up during rework in order to control the
quality of inputs and outputs of the review process.
(2) Author
(a) Author is a writer of document under review.
(b) The author's goals should be to learn as much as possible with regards to improving the
quality of the document, but also to improve his or her ability to write future documents.
(c) The author's task is to illuminate unclear areas and to understand the defects
found.
(d) Author must be present physically during the review process of his own document.
(e) If Author document exceeds exist criteria then author must be involved in the
rework phase.
(3) Reviewer
(a) The task of the reviewer is to check authors document for defects.
(b) The levels of domain knowledge or technical expertise needed by the reviewer will
depends on the type of review and type of document which is under review.
(d) The Reviewers should be chosen to represent different perspectives and roles in the
review process. In addition to the document under review, the material reviewer
receives includes source documents, standards, checklists,
(c) The soul responsibility of reviewer is to review authors document and try to find as
many defects as present in the document.
Q.7(e) Postal rates of light letters are 25p up to 10g, 35p up to 50g plus an extra [5]
10p for each additional 25g up to 100g. Design test case for weight of the
letters using equivalence partitioning.
(A) Postal rates
light letters 25p 10 g
35p 50 g
+ 10 + 25 g
100 g
0 10 gm 11 gm 50 gm 51 gm 75 gm 76 gm 100 gm
25 35 45 55
18
Prelim Question Paper Solution
Test Cases
Input gm Remark Output
1) 20 Valid Charge 35 p
2) 8 valid Charge 25 p
3) 56 Valid Charge 45 p
4) 80 Valid Charge 55 p
5) 110 Invalid enter valid data
Q.7(f) Define test scripts. Explain briefly advanced scripting techniques for test [5]
execution tools.
(A) Test Scripts
Test script are written in scripting languages. Scripting languages are programming
language.
Test execution tools use a scripting language. The advantage is that tests can repeat actions for
different data values. They can take different router depending on the outcome of a test and
they can be called from other scripts giving some structure to the set of tests.
Characteristics are :
1) Capturing test inputs while tests are executed manually.
2) Storing an expected result in the form of a screen or object to compare to, the next
time the test in run.
3) Executing tests from stored scripts and optionally data files accessed by the script.
4) Dynamic comparison.
5) Ability to initialize post execution comparison.
6) Logging results of test run.
7) Making or filtering of subsets of actual & expected results.
8) Measuring timings for tests.
9) Synchronizing inputs with the application under test.
10) Sending summary results.
19