Friday, 25 July 2008

Sample Paper

1 Which of the following is a major task of test planning?
A Determining the test approach.
B Preparing test specifications.
C Evaluating exit criteria and reporting.
D Measuring and analyzing results.


2 Which of the following statements is MOST OFTEN true?
A Source-code inspections are often used in component testing.
B Component testing searches for defects in programs that are separately testable.
C Component testing is an important part of user acceptance testing.
D Component testing aims to expose problems in the interactions between software and hardware components.


3 In a system designed to work out the tax to be paid: An employee has £4000 of salary tax free.
The next £1500 is taxed at 10%.
The next £28000 after that is taxed at 22%.
Any further amount is taxed at 40%.
To the nearest whole pound, which of these groups of numbers fall into three DIFFERENT equivalence classes?


A £4000; £5000; £5500.
B £32001; £34000; £36500.
C £28000; £28001; £32001.
D £4000; £4200; £5600.


4 Which of the following will NOT be detected by static analysis?
A Parameter type mismatches.
B Errors in requirements.
C Undeclared variables.
D Uncalled functions.


5 Which of the following test activities can be automated? i Reviews and inspections.
ii Metrics gathering.
iii Test planning.
iv Test execution.
v Data generation.


A i, iii, iv.
B i, ii, iii.
C ii, iv, v.
D ii, iii, v.


6 Which of the following is an objective of a pilot project for the introduction of a testing tool?
A Evaluate testers’ competence to use the tool.
B Complete the testing of a key project.
C Assess whether the benefits will be achieved at reasonable cost.
D Discover what the requirements for the tool are.


7 What is the MAIN purpose of a Master Test Plan?
A To communicate how incidents will be managed.
B To communicate how testing will be performed.
C To produce a test schedule.
D To produce a work breakdown structure.


8In a REACTIVE approach to testing when would you expect the bulk of the test design work to be begun?
A After the software or system has been produced.
B During development.
C As early as possible.
D During requirements analysis.


9 What is the objective of debugging? i To localise a defect.
ii To fix a defect.
iii To show value.
iv To increase the range of testing.


A i, iii.
B ii, iii, iv.
C ii, iv.
D i, ii.


10 Given the following decision table

What is the expected result for each of the following test cases?A.TC1: Fred is a 32 year old smoker resident in London
B.TC3: Jean-Michel is a 65 year non-smoker resident in Paris


A A – Insure, 10% discount, B – Insure, no discount.
B A – Don’t insure, B – Don’t insure.
C A – Insure, no discount, B – Don’t insure.
D A – Insure, no discount, B – Insure with 10% discount.


11 Which of the following are valid objectives for testing?
i.To find defects.
ii.To gain confidence in the level of quality.
iii.To identify the cause of defects.
iv.To prevent defects.


A i,ii, and iii.
B ii, iii and iv.
C i, ii and iv.
D i,iii and iv.


12 The process of designing test cases consists of the following activities:
i. Elaborate and describe test cases in detail by using test design techniques.
ii. Specify the order of test case execution.
iii. Analyse requirements and specifications to determine test conditions.
iv. Specify expected results.

According to the process of identifying and designing tests, what is the correct order of these activities?

A iii, i, iv, ii.
B iii, iv, i, ii.
C iii, ii, i, iv.
D ii, iii, i, iv.


13 What is the main purpose of impact analysis for testers?
A To determine the programming effort needed to make the changes.
B To determine what proportion of the changes need to be tested.
C To determine how much the planned changes will affect users.
D To determine how the existing system may be affected by changes.


14Which of the following requirements would be tested by a functional system test?
A The system must be able to perform its functions for an average of 23 hours 50 mins per day.
B The system must perform adequately for up to 30 users.
C The system must allow a user to amend the address of a customer.
D The system must allow 12,000 new customers per year.


15 In a system designed to work out the tax to be paid:
An employee has £4000 of salary tax free.
The next £1500 is taxed at 10%.
The next £28000 after that is taxed at 22%.
Any further amount is taxed at 40%.
To the nearest whole pound, which of these is a valid Boundary Value Analysis test case?

A £28000.
B £33501.
C £32001.
D £1500.

16 Which of the following defines the sequence in which tests should be executed?
A Test plan.
B Test procedure specification.
C Test case specification.
D Test design specification.

17 Given the following state transition

Which of the following series of state transitions below will provide 0-switch coverage?

A A, B, E, B, C, F, D.
B A, B, E, B, C, F, F.
C A, B, E, B, C, D.
D A, B, C, F, F, D.

18 Given the following decision table



What is the expected result for each of the following test cases?
A. Frequent flyer member, travelling in Business class
B. Non-member, travelling in Economy class

A A – Don’t offer any upgrade, B – Don’t offer any upgrade.
B A – Don’t offer any upgrade, B – Offer upgrade to Business class.
C A – Offer upgrade to First, B – Don’t offer any upgrade.
D A – Offer upgrade to First, B – Offer upgrade to Business class.


19 During which fundamental test process activity do we determine if MORE tests are needed?
A Test implementation and execution.
B Evaluating test exit criteria.
C Test analysis and design.
D Test planning and control.

20 What is the difference between a project risk and a product risk?
A Project risks are potential failure areas in the software or system; product risks are risks that surround the
project’s capability to deliver its objectives.
B Project risks are the risks that surround the project’s capability to deliver its objectives; product risks are
potential failure areas in the software or system.
C Project risks are typically related to supplier issues, organizational factors and technical issues; product risks
are typically related to skill and staff shortages.
D Project risks are risks that delivered software will not work; product risks are typically related to supplier issues,
organizational factors and technical issues.


21 Given the following specification, which of the following values for age are in the SAME equivalence partition?
If you are less than 18, you are too young to be insured.
Between 18 and 30 inclusive, you will receive a 20% discount.
Anyone over 30 is not eligible for a discount.


A 17, 18, 19.
B 29, 30, 31.
C 18, 29, 30.
D 17, 29, 31.


21 Considering the following pseudo-code, calculate the MINIMUM number of test cases for statement coverage, and the MINIMUM number of test cases for decision coverage respectively.

READ A
READ B
READ C
IF C>A THEN
IF C>B THEN
PRINT "C must be smaller than at least one number"
ELSE
PRINT "Proceed to next stage"
ENDIF
ELSE
PRINT "B can be smaller than C"
ENDIF


A 3, 3.
B 2, 3.
C 2, 4.
D 3, 2.


23 Which of the following is a benefit of independent testing?
A Code cannot be released into production until independent testing is complete.
B Testing is isolated from development.
C Developers do not have to take as much responsibility for quality.
D Independent testers see other and different defects, and are unbiased.


24 Which of the following tools is most likely to contain a comparator? A Dynamic Analysis tool.
B Test Execution tool.
C Static Analysis tool.
D Security tool.


25 Given the following State Table:


Which of the following represents an INVALID state transition?

A E from State S2.
B E from State S3.
C B from State S1.
D F from State S3.


26 Which of the following is a characteristic of good testing in any life cycle model?
A All document reviews involve the development team.
B Some, but not all, development activities have corresponding test activities.
C Each test level has test objectives specific to that level.
D Analysis and design of tests begins as soon as development is complete.


27 Which activity in the fundamental test process includes evaluation of the testability of the requirements and system?
A Test analysis and design.
B Test planning and control.
C Test closure.
D Test implementation and execution.


28 The following statements are used to describe the basis for creating test cases using either black or white box techniques:
i information about how the software is constructed.
ii models of the system, software or components.
iii analysis of the test basis documentation.
iv analysis of the internal structure of the components.
Which combination of the statements describes the basis for black box techniques?

A ii and iii.
B ii and iv.
C i and iv.
D i and iii.


29 What is typically the MOST important reason to use risk to drive testing efforts?
A Because testing everything is not feasible.
B Because risk-based testing is the most efficient approach to finding bugs.
C Because risk-based testing is the most effective way to show value.
D Because software is inherently risky.

30 Which of the following defines the scope of maintenance testing?
A The coverage of the current regression pack.
B The size and risk of any change(s) to the system.
C The time since the last change was made to the system.
D Defects found at the last regression test run.


31 Which is the MOST important advantage of independence in testing?
A An independent tester may find defects more quickly than the person who wrote the software.
B An independent tester may be more focused on showing how the software works than the person who wrote
the software.
C An independent tester may be more effective and efficient because they are less familiar with the software
than the person who wrote it.
D An independent tester may be more effective at finding defects missed by the person who wrote the software.


32 For testing, which of the options below best represents the main concerns of Configuration Management?
i. All items of testware are identified and version controlled;
ii. All items of testware are used in the final acceptance test;
iii. All items of testware are stored in a common repository;
iv. All items of testware are tracked for change;
v. All items of testware are assigned to a responsible owner;
vi. All items of testware are related to each other and to development items.


A i, iv, vi.
B ii, iii, v.
C i, iii, iv.
D iv, v, vi.


33 Which of the following would be a valid measure of test progress?
A Number of undetected defects.
B Total number of defects in the product.
C Number of test cases not yet executed.
D Effort required to fix all defects.


34 Which of following statements is true? Select ALL correct options
Regression testing should be performed:

i once a month
ii when a defect has been fixed
iii when the test environment has changed
iv when the software has changed


A ii and iv.
B ii, iii and iv.
C i, ii and iii.
D i and iii.


35 In which of the following orders would the phases of a formal review usually occur?
A Planning, preparation, kick off, meeting, rework, follow up.
B Kick off, planning, preparation, meeting, rework, follow up.
C Preparation, planning, kick off, meeting, rework, follow up.
D Planning, kick off, preparation, meeting, rework, follow up.


36 Which of the following are valid objectives for incident reports?
i. Provide developers and other parties with feedback about the problem to enable identification, isolation and correction as necessary.
ii. Provide ideas for test process improvement.
iii. Provide a vehicle for assessing tester competence.
iv. Provide testers with a means of tracking the quality of the system under test.


A i, ii, iii.
B i, ii, iv.
C i, iii, iv.
D ii, iii, iv.


37 Consider the following techniques. Which are static and which are dynamic techniques?
i. Equivalence Partitioning.
ii. Use Case Testing.
iii.Data Flow Analysis.
iv.Exploratory Testing.
v. Decision Testing.
vi Inspections.


A i-iv are static, v-vi are dynamic.
B iii and vi are static, i, ii, iv and v are dynamic.
C ii, iii and vi are static, i, iv and v are dynamic.
D vi is static, i-v are dynamic.


38 Why are static testing and dynamic testing described as complementary?
A Because they share the aim of identifying defects and find the same types of defect.
B Because they have different aims and differ in the types of defect they find.
C Because they have different aims but find the same types of defect.
D Because they share the aim of identifying defects but differ in the types of defect they find.


39 Which of the following are disadvantages of capturing tests by recording the actions of a manual tester?
i The script may be unstable when unexpected events occur.
ii Data for a number of similar tests is automatically stored separately from the script.
iii Expected results must be added to the captured script.
iv The captured script documents the exact inputs entered by the tester.
v When replaying a captured test, the tester may need to debug the script if it doesn’t play correctly.

A i, iii, iv, v.
B ii, iv and v.
C i, ii and iv.
D i and v.


40 Which of the following is determined by the level of product risk identified?
A Extent of testing.
B Scope for the use of test automation.
C Size of the test team.
D Requirement for regression testing.

Answers
Q No Ans
1. A
2. B
3. D
4. B
5. C
6. C
7. B
8. A
9. D
10. C
11. C
12. A
13. D
14. C
15. B
16. B
17. A
18. C
19. B
20. B
21. C
22. A
23. D
24. B
25. B
26. C
27. A
28. A
29. A
30. B
31. D
32. A
33. C
34. B
35. D
36. B
37. B
38. D
39. A
40. A

Wednesday, 7 May 2008

Sample Paper 8

1. Deliverables of test design phase include all the following except (Testing
artifacts)
a) Test data
b) Test data plan
c) Test summary report
d) Test procedure plan

2. Which of the following is not decided in the test-planning phase? (Testing
artifacts)
a) Schedules and deliverables
b) Hardware and software
c) Entry and exit criteria
d) Types of test cases

3. Typical defects that are easier to find in reviews than in dynamic testing are:
A. deviations from standards,
B.requirement defects,
C.design defects,
D.insufficient maintainability and incorrect interface specifications.
E.All of the above.

4. Load Testing Tools (Per. Testing)
a) reduces the time spent by the testers
b) reduces the resources spent (hardware)
c) mostly used in web testing
d) all of the above

5. Reviews, static analysis and dynamic testing have the same objective –
A.identifying defects.
B. fixing defects.
C. 1 and 2
D. None

6. Defect arrival rate curve:
A. Shows the number of newly discovered defects per unit time
B. Shows the number of open defects per unit time.
C. Shows the cumulative total number of defects found up to this time.
D. Any of these, depending on the company.

7. What are the 2 major components taken into consideration with risk analysis?
(Test Mgmt)
a) The probability the negative event will occur
b) The potential loss or impact associated with the event
c) Both a and b
d) Neither a nor b

8. We can achieve complete statement coverage but still miss bugs because:
A. The failure occurs only if you reach a statement taking the TRUE branch of an IF
statement, and you got to the statement with a test that passed through the FALSE
branch.
B. The failure depends on the program's inability to handle specific data values,
rather than on the program's flow of control.
C. Both A and B
D. We are not required to test code that customers are unlikely to execute.


9. Who is responsible for conducting test readiness review? (Performing
Test)
a. Test manager
b. Test engineer
c. both A & B
d. Project Manager


10. What if the project isn't big enough to justify extensive testing? (Test Mgmt)
a) Use risk based analysis to find out which areas need to be tested
b) Use automation tool for testing
c) a and b
d) None of the above

11. What are the key features to be concentrated upon when doing a testing for
world wide web sites (Test Execution)
a) Interaction between html pages
b) Performance on the client side
c) Security aspects
d) All of the above

12. What can be done if requirements are changing continuously? (Test Mgmt)
a) Work with the project's stakeholders early on to understand how
requirements might change so that alternate test plans and strategies
can be worked out in advance, if possible.
b) Negotiate to allow only easily-implemented new requirements into the
project, while moving more difficult new requirements into future
versions of the application
c) Both a and b
d) None of the above

13. The selection of test cases for regression testing (Testing artifacts)
a) Requires knowledge on the bug fixes and how it affect the system
b) Includes the area of frequent defects
c) Includes the area which has undergone many/recent code changes
d) All of the above

14. Measurement dysfunction is a problem because:
A. Even though the numbers you look at appear better, to achieve these numbers, people are doing other aspects of their work much less well.B. We don't know how to measure a variable (our measurement is dysfunctional) and
so we don't know how to interpret the result.
C. You are measuring the wrong thing and thus reaching the wrong conclusions.
D. All of the above.

15. What do you mean by “Having to say NO” (test planning process)
a. No, the problem is not with testers
b. No, the software is not ready for production
c. Both a & b
d. none of the above

16. According to the lecture, there are several risks of managing your project's schedule
with a statistical reliability model. These include (choose one or more of the following):
A. Testers spend more energy early in the product trying to find bugs than preparing
to do the rest of the project's work more efficiently
B. Managers might not realize that the testing effort is ineffective, late in the project,
because they expect a low rate of bug finding, so the low rate achieved doesn't
alarm them.
C. It can increase the end-of-project pressure on testers to not find bugs, or to not
report bugs.
D. All of the above

17. Operations testing is (Performing Test)
a. compliance testing
b. disaster testing
c. verifying compliance to rules
d. functional testing
e. ease of operations

18. Tools like change Man, Clear case are used as (test planning process)
a. functional automation tools
b. performance testing tools
c. configuration management tools
d. none of the above.


19. Important consequences of the impossibility of complete testing are (Choose one or more answers):
A. We can never be certain that the program is bug free.
B. We have no definite stopping point for testing, which makes it easier for some
managers to argue for very little testing.
C. We have no easy answer for what testing tasks should always be required,
because every task takes time that could be spent on other high importance tasks.
D. All of the above.

20. Which is not in sequence in 11 Step Software Testing process (Tester’s
Role SDLC)
a Assess development plan and status
b Develop the test plan
c Test software design
d Test software requirement

21. In the MASPAR case study:
A. Security failures were the result of untested parts of code.
B. The development team achieved complete statement and branch coverage but
missed a serious bug in the MASPAR operating system.
C. An error in the code was so obscure that you had to test the function with almost
every input value to find its two special-case failures.

D. All of the above.


22. Complete statement and branch coverage means:
A. That you have tested every statement in the program.
B. That you have tested every statement and every branch in the program.
C. That you have tested every IF statement in the program.
D. That you have tested every combination of values of IF statements in the program

23. What if the project isn't big enough to justify extensive testing? (Test Mgmt)
a) Use risk based analysis to find out which areas need to be tested
b) Use automation tool for testing
c) a and b
d) None of the above

24. Security falls under (Performing Test)
a. compliance testing
b. disaster testing
c. verifying compliance to rules
d. functional testing
e. ease of operations

25. Which is the best definition of complete testing:
A. You have discovered every bug in the program.
B. You have tested every statement, branch, and combination of branches in the
program.
C. You have completed every test in the test plan.
D. You have reached the scheduled ship date.

26. What is the concept of introducing a small change to the program and having the
effects of that change show up in some test? (Testing concepts)
a) Desk checking
b) Debugging a program
c) A mutation error
d) Performance testing
e) Introducing mutations

Saturday, 1 March 2008

Static Techniques : Reviews process

Review Process


> Reviews vary from very informal to very formal. (i.e well structured and regulated)
> The formality of a review process is related to such factors as:
*** The maturity of the development process
*** Any legal or regulatory requirements
*** The need for an audit trail
> The way a review is carred out depends on the agreed objective of the review.


If the formal development processis not followed, then it may be difficult to introduce a formal review process; work products may not be consistently produced from project to project, therefore we cannot always state that, for example, 'reviews will be carried out on functional specification'.
Some reviews are more formal than others; if reviews have not been carried in an organization before, it may not be sensible to introduce the most formal reviw type, which are inspections.
There may be legal or regulatory requirements that consider certain types of reviews to be carried out on certain work products. For rxample, standards relating to safety-critical software may deem it mandatory to carry out code inspections.

different reviews can have different objectives, forexample:
> To find defects
> To gain understanding
> To dicuss and reach decisions by consensus.

Phases of a formal review


A formal review consists of the following activities:
> Planning
> Kick-off meetings
> Individual checking/study (preparation)
> Inspection logging/review meetings
> Re-work/follow up
> Matrics/sign-off

> Planning :
*** Select personnel
*** Allocate roles
*** Define the entry an dexit criteria(for more formal review types)
*** Select which parts of the document to review

> Kick-off :
*** Distribute documents
*** Explain objectives, process and documents
*** Check entry criteia (for more formal reviews types)


It is extremely important that time is taken to plan the review activitites thoroughly - who is going to be involved, when the review meeting is going to take place, that everythign required to carryout the review (source documents, reference documents, for example) is available, and that participants are allocated sufficient time to carry out the activities assigned to them.

A kickoff meeting is likely to take place to ensure that everybosy is involved in the review process understands what his/her specific roles amd responsibilities are.
Different roles can be assigned to perticipants in order to give the review process more focus-instead of everybody checking for everything, they look at certain aspects of the review item, for example, ensure that everybosy contained in the review item corectly reflects what is in the source document.

> Individual Preparaton :
*** Work dine by each participant on their own prior to the review meeting.
*** Potential defects should be noted
*** A proposed grading is given (according to agreed standards)-this will be re-evaluated at the review meeting
*** Questions and comments noted.


Once roles and responsibilities have been assigned, individual preparation can then commence.
Roles can be allocated to individuals where they check that the review items against company standards, or check that the document cna be used as a source for the next activities - this could be preparing an acceptance test plan from the user requirements documents, or creating test cases from the same document.

> Review Meeting :
*** Discussions and/or logging
*** Documents results or minutes(for more formal review types)
*** Parcipants may simply note handling the defects, or
*** Make recommendations for handling the defects, or
*** Make decisions about the defects.


The review meeting needs to be managed, time-boxed and organized. The person leading the review must make sure that there is not too much time spent on one topic to the detriment of others and that the meeting is not dominated by a few people - everyone must be given an opportunity to speak.
The person leading the review must also ensure that the meeting does not become unruly(lots of people talking at the same time about different things)and that the focus kept on the review item.
At the meeting someone should be given responsibility for taking the minutes of the meeting and documenting any remedial actions and any follow-up activities(further meetings, formal sign-off).

> Rework :
*** Fixing the defects found
*** Normally performed by the author

> Follow-up :
*** Checking the defects have been addressed
*** Gather metrics
*** Check on exit criteria(for more formal review types)


A report of the review meeting should be produced and distributed.
It is the author`s responsibility to carry out any changes required of the review item.
It is all participants responsibility to suggest any process improvements- to the review activity itself and the structure of the review item(could ti be made better in anyway?).

Wednesday, 30 January 2008

Static Techniques : Reviews and the test process

What are Reviews?


> A way of testing software work products( e.g. documents, code)
> Can be Performed well before dynamic test execution.
> They are most beneficial when performed as early as possible in the development life cycle.


There are different levels of review, from very informal through to very formal, they all have their benefits and should be used through out the software development life cycle.

ISTQB DEFINES Review : An evaluation of a product or project status to ascertain discrepancies from planned results and to recommend improvements. Examples include Management Reviews, Informal Reviews, Technical reviews, Inspection ans walkthrough.

> Defects found during reviews are often much cheaper to remove than those found during dynamic execution.
> A review be done as a completely manual activities, but there is tool support.
> The main manual activity is to examine a work product and make comments about it.


The cost of finding and fixing defects increases over time. For example, If an error is made it is defect detected in the requirement at the specification stage, then it is relatively cheap to fix. However, not finding and fixing the defect until acceptance test or live use will be much more expensive.
Tools can assist in administering the review activities, but the reviewers will still be required to manually examine the work product.

What can be reviewed?


Any software work product can be reviewed :
> Requirement Specification
> Design Specification
> Code
> Test Plans
> Test Specification
> Test cases
> Test Scripts
> User Guides
> Web pages


Any other type of design document can also be reviewed such as date flow diagrams and entity relationship diagrams.
But it does not stop there, there is also benefit for the test plan and tests to be reviewed as well the code itself.
Lastly, the system documentation such as user manual and help text can also benefit from reviews.

Benefits of reviews


> Early defect detection and correction
> Fewer defects
> Reduced testing time and cost
> Reduced development time scales.
> Development productivity improvements
> Life time cost reductions
> Improved communication


Analysis have been performed on projects using reviews and it is estimated that ongoing reviews cost around 15% of the total development budget.
These costs include all the preparatory work required for the reviews to take place. For example who will be involved in the review, agreeing the date and time for the review and sending the document out prior to the review. Time much be allowed for each reviewer to read the document prior to the review meeting.
The costs also include the actual review meeting any follow up work required. Follow-up work can sometimes involve investigation of issues, correcting the document and producing a report detailing the outcome of the review. The report would detail the actions required, by whom, whether another review meeting is necessary. Metrics would be kept of the number of faults found which, when analyzed later could lead to process improvements.

> They can find omissions in requirements which are unlikely to be found in dynamic testing
> Remember verification and validation?


Well founded statistics estimate that 60% of the defects have already been made before coding/implementation has started, therefore it makes sense to carry out early lifecycle testing activities.
Early defects(faults) are often the most important to find; they have the characteristic to multiply thenselves top-down.
Tom De Marco said that "One of the main reasons for project failure is ambiguity in the requirements".

Objectives of reviews


> Reviews have the same objective as static analysis and dynamic anlysis of software
****** TO identify defects.
> The different techiniques are complementary
****** They can find different types of defects effectively and efficiently.
> Remember : Reviews identify defects, dynamic testing reveals failures.


In particular, the work product is being reviewed to validate it against actual requirements and to verify that it has been created to the appropriate standard and contains everything it should.
It is vital that the review team work together to acheive a consensus of opinion regarding the work product being reviewed.
Another objective of the review process is that the review team work together to improve the quality of the item being reviewed - it is a constructive, not destructive process.

Typical defects that are easier to find in reviews


> Deviations from standards
> Requirements defects
> Design defects.
> insufficient maintainability
> Incorrect interface specification

We will look at different types of reviw later but the reviews of documents such as user requirements, functional specifications and technical specifications are usually incremental.
The first review will usually raise sme questions and issues, points of clarification as to how a particular requirement will be tested. Or it could be an inconsistency in naming say 'a customer' or a client. These will need to be resolved and the document re-reviewed.
It may also be the case that all issues cannot be resolved at once. one issue may need to be resolved before others can be addressed, or having resolved one issue, this is turn raises further issues.
Reviews are therefore an iterative process.

Sunday, 6 January 2008

The Benefits of early test design

Benefits of early test design

> 60% of the defects have already been made before coding/implementation has started.
> The thought process of designing tests early int eh lifecycle helps to verify the test basis inconsistencies and omissions.
> Their removal will increase the quality of the test basis and help to prevent defects from being introduced into the code.


As we know that the later in the lifecycle defects are detected, the more expensive they are to fix. It is most cost effective to find and fix requirements defects at the requirements stage. Building the right software correctly gives a lower cost overall.

The thought process of designing tests in the early lifecycle can help to prevent defects from being introduced into code. We some times refer to this as 'verifying the test basis via the test design'. The test basis includes documents like the requirements and design specification.

According to ISTQB
Requirement : A condition or capability needed by a user to solve a problem or acheive an objective that must be met or prossessed by a system or system component to satisfy a contract, standard, specification, or other formally imposed document.

Test Basis : All documents from which the requirements of a component or system can be inferred. The documentation on which the test cases are based. If a document can be amended only by way of formal amendment procedure, then the test basis is called a frozen test basis.

Test Case : A set of input values, execution preconditions, expected results and execution post cnditions, developed for a particular objective or test condition, such as to exercise a particular program path or to verify compliance with a specific requirement.

> Documents reviewed can help to prevents defects occuring in to the code.
> Static analysis of code can identify defects in the cde and give a measure of complexity of the code.
> Time invested in early life cycle test activities will reap many benefits
* Quality of product and documentation improved
* Defects found are relatively cheap to fix.
* Fewer defects by reducing fault multiplication.

There are different types of reviews we can carry out, but an objective of all types of reviews is to find defects.

Time invested in early lifecycle test activities will reap many benefits:
* Quality if product improved at all stages in the process
* Reduce the number of faults to detect by reducing fault multiplication
* Less rework at later development stages.
* System implemented on time and to budget.

ISTQB defines
Review : An evaluation of the product or project status to ascertain discrepancies from planned results and to recommend improvements. Examples include management review, informal review, technical review, inspection, and walkthrough.

When we look at the test principles you will see the following test principle is related to this discussion:
Testing Principle - Early Testing : Testing activities should start as early as possible in the software or system development lifecycle, and should be focused on defined objectives.

Tuesday, 11 December 2007

Software Testing Best Practices

The Foundational practices are the rock in the soil that protects your efforts against harshness of nature, be it a redesign of your architecture or enhancements to sustain unforeseen growth. Every time we conclude a study or task force on the subject of software development process I have found one recommendation that comes out loud and clear.

"We need to adopt the best practices in the industry." While it appears as an obvious conclusion, the most glaring lack of it's presence continues to astound the study team.

The best practices can be classified into the following types:

a) Basic Best Practices
b) Foundational Best Practices
c) Incremental Best Practices

a) Basic Best Practices

They are the training wheels you need to get started and when you take them off, it is evident that you know how to ride. But remember, that you take them off does not mean you forget how to ride. This is an important difference, which all too often is forgotten in software. "Yeah, we used to write functional specification but we don't do that anymore" means you forget to ride, not that you didn't need to do that step anymore. The Basic practices have been around for a long time.

Functional Specifications
The testers use this to write down test cases from a black box testing perspective. The advantage of having a functional specification is that the test generation activity could happen in parallel with the development of the code. This is ideal from several dimensions. It gains parallelism in execution, removing a serious serialization bottleneck in the development process.

Reviews and Inspection
It is argued that software inspection can easily provide a ten times gain in the process of debugging software. Not much needs to be said about this, since it is a fairly well known and understood practice.

Formal Entry and Exit Criteria
The idea is that every process step, be it inspection, functional test, or software design, has a precise entry and precise exit criteria. These are defined by the development process and are watched by management to gate the movement from one stage to another.

Functional Test – Variations
Most functional tests are written as black box tests working off a functional specification. The number of test cases that are generated usually are variations on the input space coupled with visiting the output conditions.

Multi-platform Testing
When code is ported from one platform to another, modifications are sometimes done for performance purposes. The net result is that testing on multiple platforms has become a necessity for most products. Therefore techniques to do this better, both in development and testing, are essential.

Internal Betas
Techniques to best conduct such an internal Beta test are essential for us to obtain good coverage and efficiently use internal resources. This best practice has everything to do with Beta programs though on a smaller scale to best leverage it and reduce cost and expense of an external Beta.

Automated Test Execution
The goal of automated test execution is that we minimize the amount of manual work involved in test execution and gain higher coverage with a larger number of test cases. The automated test execution has a significant impact on both the tools sets for test execution and also the way tests are designed.

‘Nightly’ Builds
The concept of a nightly build has been in vogue for a long time. While every build is not necessarily done every day, the concept captures frequent builds from changes that are being promoted into the change control system.

b) Foundational Best Practices

The Foundational practices are the rock in the soil that protects your efforts against harshness of nature, be it a redesign of your architecture or enhancements to sustain unforeseen growth. They need to be put down thoughtfully and will make the difference in the long haul, whether you build a ranch or a skyscraper. Their value added is significant and established by a few leaders in the industry. Unlike the Basics, they are probably not as well known and therefore need implementation help. While there may be no textbooks on them yet, there is plenty of documentation to dig up.

User Scenarios
One of the viable methods of testing is to develop user scenarios that exercise the functionality of the applications. This best practice should capture methods of recording user scenarios and developing test cases based on them. In addition it could discuss potential diagnosis methods when a specific failure scenario occurs.

Usability Testing
Usability testing needs to not only assess how usable a product is but also provide feedback on methods to improve the user experience and thereby gain a positive quality image. The best practice for usability testing should also have knowledge about advances in the area of Human Computer Interface.

In-Process ODC Feedback Loops
Orthogonal defect classification is a measurement method that uses the defect stream to provide precise measurability into the product and the process. Given the measurement, a variety of analysis techniques have been developed to assist management and decision-making on a range of software engineering activities.

Multi-Release ODC/Butterfly
The technology of multi-release ODC/Butterfly analysis allows a product manager to make strategic development decisions so as to optimize development costs, time to market, and quality issues by recognizing customer trends, usage patterns, and product performance.

“Requirements” for Test Planning
One of the roles of software testing is to ensure that the product meets the requirements of the clientele. Capturing the requirements therefore becomes an essential part not only to help develop but to create test plans that can be used to gauge if the developed product is likely to meet customer needs.

Automated Test Generation
Almost 30% of the testing task can be the writing of test cases. To first order of approximation, this is a completely manual exercise and a prime candidate for savings through automation.

c) Incremental Best Practices

The Incremental practices provide specific advantages in special conditions. While they may not provide broad gains across the board of testing, they are more specialized. These are the right angle drills -- when you need it, there's nothing else that can get between narrow studs and drill a hole perfectly square. At the same time, if there was just one drill you were going to buy, it may not be your first choice. Not all practices are widely known or greatly documented. But they all possess the strength that are powerful when judiciously applied.

Conclusion
So clear is its presence that it distinguishes the winners from the also-ran like no other factor. The search for best practices is constant. Some are known and well recognized, others debated, and several hidden.
Note : Get more topics from Exforys Online Tutorials.

Testing : Introduction to CMM

Quality software should reasonably be bug-free, delivered on time and within budget. It should meet the given requirements and/or expectations, and should be maintainable. In order to produce error free and high quality software certain standards need to be followed.

Software Quality:
Quality software should reasonably be bug-free, delivered on time and within budget. It should meet the given requirements and/or expectations, and should be maintainable.
In order to produce error free and high quality software certain standards need to be followed.

Quality Standards
ISO 9001: 2000 is Quality Management System Certification. To achieve this, an organization must satisfy ISO 9001: 2000 clauses (clauses 1 - 8).
Six Sigma is a process improvement methodology focused on reduction in variation of the processes around the mean. Its objective is to make the process defect free.
SEI CMM is a defacto standard for assessing and improving processes related to software development, developed by the software community in 1986 with leadership from SEI. It’s a software specific process maturity model. It provides guidance for measuring software process maturity and helps process improvement programs.

SEI CMM is organized into 5 maturity levels:
Initial
Repeatable
Defined
Manageable
Optimizing
1)Initial
The software process is characterized as ad hoc, and occasionally even chaotic. Few processes are defined, and success depends on individual effort and heroics.

2) Repeatable:
Basic project management processes are established to track cost, schedule, and functionality. The necessary process discipline is in place to repeat earlier successes on projects with similar applications.

3) Defined:
The software process for both management and engineering activities is documented, standardized, and integrated into a standard software process for the organization. All projects use an approved, tailored version of the organization's standard software process for developing and maintaining software.

4) Managed:
Detailed measures of the software process and product quality are collected. Both the software process and products are quantitatively understood and controlled.

5) Optimizing:
Continuous process improvement is enabled by quantitative feedback from the process and from piloting innovative ideas and technologies.

Comparison of CMM and ISO


Conclusion:
CMM ensures that the process followed for developing a product produces error free product. A company which is process driven is more successful than the company which is people driven. Hence a company needs to have a good process for software development for it to be successful.

Sunday, 2 December 2007

Life Cycle of Testing Process

Life Cycle of Testing

This article explains about Different steps in Life Cycle of Testing Process. in Each phase of the development process will have a specific input and a specific output. Once the project is confirmed to start, the phases of the development of project can be divided into the following phases:

* Software requirements phase.
* Software Design
* Implementation
* Testing
* Maintenance

In the whole development process, testing consumes highest amount of time. But most of the developers oversee that and testing phase is generally neglected. As a consequence, erroneous software is released. The testing team should be involved right from the requirements stage itself.

The various phases involved in testing, with regard to the software development life cycle are:

1. Requirements stage
2. Test Plan
3. Test Design.
4. Design Reviews
5. Code Reviews
6. Test Cases preparation.
7. Test Execution
8. Test Reports.
9. Bugs Reporting
10. Reworking on patches.
11. Release to production.


Requirements Stage :
Normally in many companies, developers itself take part in the requirements stage. Especially for product-based companies, a tester should also be involved in this stage. Since a tester thinks from the user side whereas a developer can’t. A separate panel should be formed for each module comprising a developer, a tester and a user. Panel meetings should be scheduled in order to gather everyone’s view. All the requirements should be documented properly for further use and this document is called “Software Requirements Specifications”.

Test Plan :
Without a good plan, no work is a success. A successful work always contains a good plan. The testing process of software should also require good plan. Test plan document is the most important document that brings in a process – oriented approach. A test plan document should be prepared after the requirements of the project are confirmed. The test plan document must consist of the following information:
• Total number of features to be tested.
• Testing approaches to be followed.
• The testing methodologies
• Number of man-hours required.
• Resources required for the whole testing process.
• The testing tools that are to be used.
• The test cases, etc

Test Design :
Test Design is done based on the requirements of the project. Test has to be designed based on whether manual or automated testing is done. For automation testing, the different paths for testing are to be identified first. An end to end checklist has to be prepared covering all the features of the project.

The test design is represented pictographically. The test design involves various stages. These stages can be summarized as follows:
• The different modules of the software are identified first.
• Next, the paths connecting all the modules are identified.

Then the design is drawn. The test design is the most critical one, which decides the test case preparation. So the test design assesses the quality of testing process.

Test Cases Preparation :
Test cases should be prepared based on the following scenarios:
• Positive scenarios
• Negative scenarios
• Boundary conditions and
• Real World scenarios

Design Reviews :
The software design is done in systematical manner or using the UML language. The tester can do the reviews over the design and can suggest the ideas and the modifications needed.

Code Reviews :
Code reviews are similar to unit testing. Once the code is ready for release, the tester should be ready to do unit testing for the code. He must be ready with his own unit test cases. Though a developer does the unit testing, a tester must also do it. The developers may oversee some of the minute mistakes in the code, which a tester may find out.

Test Execution and Bugs Reporting :
Once the unit testing is completed and the code is released to QA, the functional testing is done. A top-level testing is done at the beginning of the testing to find out the top-level failures. If any top-level failures occur, the bugs should be reported to the developer immediately to get the required workaround.

The test reports should be documented properly and the bugs have to be reported to the developer after the testing is completed.
Release to Production

Once the bugs are fixed, another release is given to the QA with the modified changes. Regression testing is executed. Once the QA assures the software, the software is released to production. Before releasing to production, another round of top-level testing is done.

The testing process is an iterative process. Once the bugs are fixed, the testing has to be done repeatedly. Thus the testing process is an unending process.

Release to Production
Once the bugs are fixed, another release is given to the QA with the modified changes. Regression testing is executed. Once the QA assures the software, the software is released to production. Before releasing to production, another round of top-level testing is done.

The testing process is an iterative process. Once the bugs are fixed, the testing has to be done repeatedly. Thus the testing process is an unending process.

Friday, 30 November 2007

Basic Test Case Concepts

A testcase is simply a test with formal steps and instructions; testcases are valuable because they are repeatable, reproducible under the same environments, and easy to improve upon with feedback. A testcase is the difference between saying that something seems to be working okay and proving that a set of specific tasks are known to be working correctly.

Some tests are more straightforward than others. For example, say you need to verify that all the links in your web site work. There are several different approaches to checking this:

you can read your HTML code to see that all the link code is correct
you can run an HTML DTD validator to see that all of your HTML syntax is correct, which would imply that your links are correct
you can use your browser (or even multiple browsers) to check every link manually
you can use a link-checking program to check every link automatically
you can use a site maintenance program that will display graphically the relationships between pages on your site, including links good and bad
you could use all of these approaches to test for any possible failures or inconsistencies in the tests themselves
Verifying that your site's links are not broken is relatively unambiguous. You simply need to decide which one of more of these tests best suits your site structure, your test resources, and your need for granularity of results. You run the test, and you get your results showing any broken links.

Notice that you now have a list of broken links, not of incorrect links. If a link is valid syntactically, but points at the incorrect page, your link test won't catch the problem. My general point here is that you must understand what you are testing. A testcase is a series of explicit actions and examinations that identifies the "what".

A testcase for checking links might specify that each link is tested for functionality, appropriateness, usability, style, consistency, etc. For example, a testcase for checking links on a typical page of a site might include these steps:
Link Test: for each link on the page, verify that

the link works (i.e., it is not broken)
the link points at the correct page
the link text effectively and unambiguously describes the target page
the link follows the approved style guide for this web site (for example, closing punctuation is or is not included in the link text, as per the style guide specification)
every instance of a link to the same target page is coded the same way.

As you can see, this is a detailed testing of many aspects of the link, with the result that on completion of the test, you can say definitively what you know works. However, this is a simple example: testcases can run to hundreds of instructions, depending on the types of functionality being tested and the need for iterations ofsteps.

Defining Test and Testcase Parameters
A testcase should set up any special environment requirements the test may have, such as clearing the browser cache, enabling JavaScript support, or turning on the warnings for the dropping of cookies.
In addition to specific configuration instructions, testcases should also record browser types and versions, operating system, machine platforms, connection speeds -- in short, the testcase should record any parameter that would affect the reproducibility of the results or could aid in troubleshooting any defects found by testing. Or to state this a little differently, specify what platforms this testcase should be run against, record what platforms it is run against, and in the case of defects report the exact environment in which the defect was found. The various required fields of a test case are as follows

Test Case ID: It is unique number given to test case in order to be identified.

Test description: The description if test case you are going to test.

Revision history: Each test case has to have its revision history in order to know when and by whom it is created or modified.

Function to be tested: The name of function to be tested.

Environment: It tells in which environment you are testing.

Test Setup: Anything you need to set up outside of your application for example printers, network and so on.

Test Execution: It is detailed description of every step of execution.

Expected Results: The description of what you expect the function to do.

Actual Results: pass / failed If pass - What actually happen when you run the test. If failed - put in description of what you've observed.

Sample Testcase
Here is a simple test case for applying bold formatting to a text.

Test case ID: B 001
Test Description: verify B - bold formatting to the text
Revision History:
3/ 23/ 00 1.0- Valerie- Created
Function to be tested: B - bold formatting to the text
Environment: Win 98
Test setup: N/A
Test Execution:

Open program
Open new document
Type any text
Select the text to make bold.
Click Bold

Expected Result: Applies bold formatting to the text
Actual Result: pass

Testcase definition
Define testcases in the Definition pane of the Component Test perspective. This is also where you define the hosts on which the testcases will run. Once you define the testcase element in the Definition pane, its contents appear in the Outline pane. You can add elements to the testcase's main block, and once your definition is complete you can prepare it to run and create a testcase instance.

Testcase stages
As you work with testcases in the Component Test perspective, they go through different stages, from definition to analysis. Each stage is generated from the previous one, but is otherwise unrelated: for example, although a testcase instance is generated from a testcase definition, changes to the definition will not affect the instance

Creating manual testcases
Create manual testcases to guide a tester through the steps necessary to test a component or application. Once you have created a manual testcase, you can prepare it to run.

Adding manual testcases
To add a manual testcase to the Component Test perspective, follow these steps:
1.In the Definition pane, right-click on Testcases and click: New > Testcase
2.In the New Testcase wizard, select the project you want to define the testcase in.
3.Name the project and click Next.
4.Select the Manual scheduler.
5.Click Finish to add the testcase to the Testcase folder under the selected project.
The contents of the testcase appear in the Outline pane. To start with, it contains a main block, which will organize all the other contents of the testcase.

Creating HTTP testcases
Create HTTP testcases to run methods and queries against an HTTP server. You can define HTTP testcases by importing an HTTP XML file that defines a set of interactions, or you can define it using the tasks below. Once you have defined the testcase, you can prepare it to run.
Creating Java testcases
Create Java testcases to test static Java methods by calling them and verifying the results. Once you have defined the testcase, you can generate an instance of it, and edit the instance's code to provide the logic for evaluating each task and verification point.

Adding Java testcases
To add a Java testcase to the Component Test perspective:
1.In the Definition pane, right-click on Testcases and click: New > Testcase
2.In the New Testcase wizard, select the project you want to define the testcase in.
3.Name the project and click Next.
4.Select the Java scheduler.
5.Click Finish to add the testcase to the Testcase folder under the selected project.
The contents of the testcase appear in the Outline pane. To start with, it contains a main block, which will organize all the other contents of the testcase.

Reusing testcases
You can reuse existing testcase definitions when you define new ones. This lets you define testcases for common sequences (such as logging into an application) that you can then reuse in more complex compound testcases.
To reuse a testcase:
1.Select the testcase you want to add the existing testcase to.
2.In the Outline pane, right-click the block you want to add the testcase to and click Add Testcase Definition Reference.
3.In the Add Testcase Definition Reference wizard, select the testcase you want to reuse.
4.Click Finish.
The reused testcase is incorporated by reference: its definition is still maintained separately, and the compound testcase definition will pick up changes to the testcases it reuses. However, when you create a testcase instance, the generated code for the referenced testcase definition will be stored as part of the referencing testcase instance. In other words, reuse happens only at the definition level: at the instance level, each reusing testcase creates its own copy of the reused testcases.

Test Cases & Explanation
We will not supply you with test input for most of your assignments. Part of your job will be to select input cases to show that your program works correctly. You should select input from the following categories:

Normal Test Cases: These are inputs that would be considered "normal" or "average" for your program. For example, if your program computes square roots, you could try several positive numbers, both less than and greater than 1, including some perfect squares such as 16 and some numbers without rational square roots.

Boundary Test Cases: These are inputs that are legal, but on or near the boundary between legal and illegal values. For example, in a square root program, you should try 0 as a boundary cases.

Exception Test Cases: These are inputs that are illegal. Your program may give an error message or it might crash. In a square root program, negative numbers would be exception test cases.

You must hand in outputs (saved in file form) of your test runs. In addition to handing in your actual test runs, give us a quick explanation of how you picked them. For example, if you write a program to compute square roots, you might say "my test input included zero, small and large positive numbers, perfect squares and numbers without a rational square root, and a negative number to demonstrate error handling". You may give this explanation in the separate README file, or included alongside the test cases.

You will be marked for how well the test cases you pick demonstrate that your program works correctly. If your program doesn't work correctly in all cases, please be honest about it. It is perfectly valid to have test cases which illustrate the circumstances in which your program does not yet work. If your program doesn't run at all, you can hand in a set of test cases with an explanation of how you picked them and what the correct output would be. Both of these will get you full marks for testing. If you pick test cases to hide the faults in your program, you will lose marks.

Black Box Test Case Design
Objective and Purpose
The purpose of the Black Box Test Case Design (BBTD) is to discover circumstances under which the assessed object will not react and behave according to the requirements or respectively the specifications.
Operational Sequence
The test cases in a black box test case design are deviated from the requirements or respectively the specifications. The object to be assessed is considered as a black box, i. e. the assessor is not interested in the internal structure and the behavior of the object to be assessed.

It can be differentiated between the following black box test case designs:
>Generation of equivalence classes
>Marginal value analysis
>Intuitive test case definition
>Function coverage

1. Generation of Equivalence Classes :
Objective and Purpose :
It is the objective of the generation of equivalence classes to achieve an optional probability to detect errors with a minimum number of test cases.
Operational Sequence :The principle of the generation of equivalence classes is to group all input data of a program into a finite number of equivalence classes so it can be assumed that with any representative of a class it is possible to detect the same errors as with any other representative of this class.
The definition of test cases via equivalence classes is realized by means of the following steps:
Analysis of the input data requirements, the output data requirements, and the conditions according to the specifications

2. Definition of the equivalence classes by setting up the ranges for input and output data

3. Definition of the test cases by means of selecting values for each classwhen defining equivalence classes, two groups of equivalence classes have to be differentiated:
valid equivalence classes
invalid equivalence classes For valid equivalence classes, the valid input data are selected; in case of invalid equivalence classes erroneous input data are selected. If the specification is available, the definition of equivalence classes is predominantly a heuristic process.

4. Marginal Value Analysis :
Objective and Purpose :
It is the objective of the marginal value analysis to define test cases that can be used to discover errors connected with the handling of range margins.
Operational Sequence :
The principle of the marginal value analysis is to consider the range margins in connection with the definition of test cases. This analysis is based on the equivalence classes defined by means of the generation of equivalence classes. Contrary to the generation of equivalence classes, not any one representative of the class is selected as test case but only the representatives at the class margins. Therefore, the marginal value analysis represents an addition to the test case design according to the generation of equivalence classes.

5. Intuitive Test Case Definition
Objective and Purpose :
It is the objective of the intuitive test case definition to improve systematically detected test cases qualitatively, and also to detect supplementary test cases.
Operational Sequence :
Basis for this methodical approach is the intuitive ability and experience of human beings to select test cases according to expected errors. A regulated procedure does not exist. Apart from the analysis of the requirements and the systematically defined test cases (if realized) it is most practical to generate a list of possible errors and error-prone situations. In this connection it is possible to make use of the experience with repeatedly occurred standard errors. Based on these identified errors and critical situations the additional test cases will then be defined.

6. Function Coverage Objective and Purpose
It is the purpose of the function coverage to identify test cases that can be used to proof that the corresponding function is available and can be executed as well. In this connection the test case concentrates on the normal behavior and the exceptional behavior of the object to be assessed.
Operational Sequence
Based on the defined requirements, the functions to be tested must be identified. Then the test cases for the identified functions can be defined.
Recommendation
With the help of a test case matrix it is possible to check if functions are covered by several test cases. In order to improve the efficiency of the tests, redundant test cases ought to be deleted.

White Box Test Case Design
Objective and Purpose
The objective of the "White Box Test Case Design" (WBTD) is to detect errors by means of execution-oriented test cases.
Operational Sequence
White Box Testing is a test strategy which investigates the internal structure of the object to be assessed in order to specify execution-oriented test cases on the basis of the program logic. In this connection the specifications have to be taken into consideration, though. In a test case design, the portion of the assessed object which is addressed by the test cases is taken into consideration. The considered aspect may be a path, a statement, a branch, and a condition. The test cases are selected in such a manner that the correspondingly addressed portion of the assessed object is increased.

The following White Box Test Case methods exist:
1. Path coverage
2. Statement coverage
3. Branch coverage
4. Condition coverage
5. Branch/condition coverage
6. Coverage of all multiple conditions

1.Path Coverage
Objective and Purpose
It is the objective of the path coverage to identify test cases executing a required minimum number of paths in the object to be assessed. The execution of all paths cannot be realized as a rule.
Operational Sequence
By taking into consideration the specification, the paths to be executed and the corresponding test cases will be defined.

2. Statement Coverage
Objective and Purpose
It is the objective of the statement coverage to identify test cases executing a required minimum number of statements in the object to be assessed.
Operational Sequence
By taking into consideration the specification, statements are identified and the corresponding test cases are defined. Depending on the required coverage degree, either all or only a certain number of statements are to be used for the test case definition.

3. Branch Coverage
Objective and Purpose
It is the objective of the branch coverage to identify test cases executing a required minimum number of branches, i. e. at least once in the object to be assessed.
Operational Sequence
By taking into consideration the specification, a sufficiently large number of test cases must be designed by means of an analysis so both the THEN and the ELSE branch are executed at least once for each decision. I. e. the exit for the fulfilled condition and the exit for the unfulfilled must be utilized and each entry must be addressed at least once. For multiple decisions there exists the additional requirement to test each possible exit at least once and to address each entry at least once.

4. Condition Coverage
Objective and Purpose
The objective of the condition coverage is to identify test cases executing a required minimum number of conditions in the object to be assessed.
Operational Sequence
By taking into consideration the specification, conditions are identified and the corresponding test cases are defined. The test cases are defined on the basis of a path sequence analysis.

5. Branch/Condition Coverage
Objective and Purpose
The objective of the branch/condition coverage is to identify test cases executing a required minimum number of branches and conditions in the object to be assessed.
Operational Sequence
By taking into consideration the specification, branches and conditions are identified and the corresponding test cases are defined.

6. Coverage of all Multiple Conditions
Objective and Purpose
The objective of the coverage of all multiple conditions is to identify test cases executing a required minimum number of all possible condition combinations for a decision in the object to be assessed.
Operational Sequence
By taking into consideration the specification, condition combinations for decisions are identified and the corresponding test cases are defined. When defining test cases it must be observed that all entries are addressed at least once.

Test Cases :::::

How to write TEST CASES?
To write test cases one should be clear on the specifications required for a particular case. Once the case is decided check out for the requirments and then write test cases. For writing test cases first you must find Boundary Value Analysis. Let us write a test case for a Consignee Details Form. (Consignee Details : Consignee is the customer whoever to purchase our product. Here he want to give the information about himself. For example name, address and etc...)

Here is the screen shot of the form


Software Requirement Specification
According to the software requirement specification (SRS) one should write test cases upto expected results.

Here is the screen shot of SRS

Boundary Value Analysis:
It concentrate on range between minimum value and maximum values. It does not concentrate on centre values.

For example how to calculate Boundary Value for Company name field

Minimum length is 4 & Maximum length is 15

For Boundary value you have to check + or – minimum length and + or – Maximum length
for Company name field minimum value =3,4,5
maximum value=14,15,16

According to the Software Requirement Specification
The boundary values given above are

Valid values=4,5,14,15
Invalid values=3,16 because this values are out of range where as given in software requirement specification.




>You have to write test cases for Boundary values also.
For single user id field you have 11 test case including boundary value.
>You have to write test cases upto expected result after getting software requirement specification itself you can start writing a test cases.
>After the creation of test cases completed.
>Arrival of build will be arises to the testing field
>Build->Its a complete project
>After that you have to execute the test cases

EXECUTION OF TEST CASES
You have to check all the possible Test input given in test cases and then check whether all the test cases are executed or not

How to execute?>For example
whether you are checking company name as a mandatory means
you need not give any input to Company name field and then enter password .then click OK button means.
That alert message “Enter Company name:” must be displayed. This was your expected result . If it is happen while you are executing the test cases with the project .
Mandatory->compulsory

Test Case 1
Test Case ID : Test Case Title
The test case ID may be any convenient identifier, as decided upon by the tester. Identifiers should follow a consistent pattern within Test cases, and a similar consistency should apply access Test Modules written for the same project.



Purpose:
The purpose of the Test case, usually to verify a specific requirement.

Owner:
The persons or department responsible for keeping the Test cases accurate.

Expected Result :
Describe the expected results and outputs from this Test Case. It is also desirable to include some method of recording whether or not the expected results actually occurred (i.e.) if the test case, or even individual steps of the test case, passed.

Test Data:
Any required data input for the Test Case.

Test Tools:
Any specific or unusual tools or utilities required for the execution of this Test Case.

Dependencies :
If correct execution of this Test Case depends on being pleceded by any other Test Cases, that fact should be mentioned here. Similarly any dependency on factory outside the immediate test environment should also be mentioned.

Initialization :
If the system software or hardware has to be initialized in a particular manner in order for this Test case to succeed, such initialization should be mentioned here.

Description:
Describe what will take place during the Test Case the description should take the form of a narrative description of the Test Case, along with a Test procedure , which in turn can be specified by test case steps, tables of values or configurations, further narrative or whatever is most appropriate to the type of testing taking place.

Test Case 2


Test Case 3

Test case 4

Test Case Description : Identify the Items or features to be tested by this test case.

Pre and post conditions: Description of changes (if any) to be standard environment. Any modification should be automatically done.

Test Case 4 - Description

Case : Test Case Name

Component : Component Name

Author : Developer Name

Date : MM – DD – YY

Version : Version Number

Input / Output Specifications:
Identify all inputs / Outputs required to execute the test case. Be sure to identify all required inputs / outputs not just data elements and values:

> Data (Values , ranges, sets )
> Conditions (States: initial, intermediate, final)
> Files (database, control files)

Test Procedure
Identify any special constrains on the test case. Focus on key elements such as special setup.

Expected Results
Fill this row with the description of the test results

Failure Recovery
Explanations regarding which actions should be performed in case of test failure.

Comments
Suggestions, description of possible improvements, etc.

Test Case 5




WEB TESTING

Writing Test Cases for Web Browsers

This is a guide to making test cases for Web browsers, for example making test cases to show HTML, CSS, SVG, DOM, or JS bugs. There are always exceptions to all the rules when making test cases. The most important thing is to show the bug without distractions. This isn't something that can be done just by following some steps, you have to be intelligent about it. Minimising existing testcases.

STEP ONE: FINDING A BUG
The first step to making a testcase is finding a bug in the first place. There are four ways of doing this:
1. Letting someone else do it for you: Most of the time, the testcases you write will be for bugs that other people have filed. In those cases, you will typically have a Web page which renders incorrectly, either a demo page or an actual Web site. However, it is also possible that the bug report will have no problem page listed, just a problem description.
2. Alternatively, you can find a bug yourself while browsing the Web. In such cases, you will have a Web site that renders incorrectly.
3. You could also find the bug because one of the existing testcases fails. In this case, you have a Web page that renders incorrectly.
4. Finally, the bug may be hypothetical: you might be writing a test suite for a feature without knowing if the feature is broken or not, with the intention of finding bugs in the implementation of that feature. In this case you do not have a Web page, just an idea of what a problem could be.

If you have a Web page showing a problem, move to the next step. Otherwise, you will have to create an initial testcase yourself. This is covered on the section on "Creating testcases from scratch" later.

STEP TWO: REMOVING DEPENDENCIES
You have a page that renders incorrectly.
Make a copy of this page and all the files it uses, and update the links so they all point to the copies you made of the files. Make sure that it still renders incorrectly in the same way -- if it doesn't, find out why not. Make your copy of the original files as close to possible as the original environment, as close as needed to reproduce the bug. For example, instead of loading the files locally, put the files on a remote server and try it from there. Make sure the MIME types are the same if they need to be, etc.
Once you have your page and its dependencies all set up and still showing the same problem, embed the dependencies one by one.
For example, change markup like this:
link rel="stylesheet" href="foo.css"
...to this:

Each time you do this, check that you haven't broken any relative URIs and that the page still shows the problem. If the page stops showing the problem, you either made a mistake when embedding the external files, or you found a bug specifically related to the way that particular file was linked. Move on to the next file.

STEP THREE: MAKING THE TEST FILE SMALLER
Once you have put as many of the external dependencies into the test file as you can, start cutting the file down.
Go to the middle of the file. Delete everything from the middle of the file to the end. (Don't pay attention to whether the file is still valid or not.) Check that the error still occurs. If it doesn't, put that part pack, and remove the top half instead, or a smaller part.
Continue in this vein until you have removed almost all the file and are left with 20 or fewer lines of markup, or at least, the smallest amount that you need to reproduce the problem.
Now, start being intelligent. Look at the file. Remove bits that clearly will have no effect on the bug. For example if the bug is that the text "investments are good" is red but should be green, replace the text with just "test" and check it is still the wrong colour.
Remove any scripts. If the scripts are needed, try doing what the scripts do then removing them -- for example, replace this:
;
..with:

test


...and check that the bug still occurs.
Merge any < style > blocks together.
Change presentational markup for CSS. For example, change this:
< font color="red" >
...to:
span { color: red; } /* in the stylesheet */

Do the same with style="" attributes (remove the attributes, but it in a < style > block instead).
Remove any classes, and use element names instead. For example: .
.a { color: red; }
.b { color: green; }

This should be green.


...becomes:
div { color: red; }
p { color: green; }

This should be green.


Do the same with IDs. Make sure there is a strict mode DOCTYPE:

Remove any< meta >elements. Remove any "lang" attributes or anything that isn't needed to show the bug.
If you have images, replace them with very simple images, e.g.:
http://hixie.ch/resources/images/sample
If there is script that is required, remove as many functions as possible, merge functions together, put them inline instead of in functions.

STEP FOUR: GIVE THE TEST AN OBVIOUS PASS CONDITION
The final step is to make sure that the test can be used quickly. It must be possible to look at a test and determine if it has passed or failed within about 2 seconds.
There are many tricks to do this, which are covered in other documents such as the CSS2.1 Test Case Authoring
Guidelines:
http://www.w3.org/Style/CSS/Test/guidelines.html
Make sure your test looks like it has failed even if no script runs or anything. Make sure the test doesn't look blank if it fails.

Creating testcases from scratch

STEP ONE: FIND SOMETHING TO TEST

Read the relevant specification.
Read it again.
Read it again, making sure you read every last bit of it, cover to cover.
Read it one more time, this time checking all the cross-references.
Read the specification in random order, making sure you understand every last bit of it.
Now, find a bit you think is likely to be implemented wrongly.
Work out a way in which a page could be created so that if the browser gets it right, the page will look like the test has passed, and if the browser gets it wrong, the page will look like it failed.
Write that page.
Now jump to step four above.

Note:
This information is collected.

Friday, 23 November 2007

ISTQB Foundation Exam Preparation

Exam Preparation follows :

Each and every syllabus module contains :
> Description of the module.
> Content of the module.
> Module Regarding Document.
> A simple test on the module.

Fundamentals of testing :
This section looks at why testing is necessary, what testing is, explains general testing principles, the fundamental test process, and psychological aspects of testing.

1.0 Fundamentals (or) Principles of testing
1.1 Why is testing necessary
1.2 What is testing
1.3 General testing principles
1.4 Fundamental test process
1.5 Psychology of testing
Prepare a bit from here Chapter 1

Take a Small Test now :
1. Use numbers 1 to 5 to indicate which fundamental test process the following major tasks belong to:
1 for planning and control,
2 for analysis and design,
3 for implementation and execution,
4 for evaluating exit criteria and reporting, and
5 for test closure activities.

A. _____ Creating the test data
B. _____ Designing test cases
C. _____ Analyzing lessons learned
D. _____ Defining the testing objectives
E. _____ Assessing whether more tests are needed
F. _____ Identifying the required test data
G. _____ Comparing actual progress against the plan
H. _____ Preparing a test summary report
I. _____ Documenting the acceptance of the system
J. _____ Re-executing a test that previously failed

2. What should be taken into account to determine when to stop testing?
I. Technical risk
II. Business risk
III. Project constraints
IV. Product documentation

A. I and II are true; III and IV are false
B. III is true; I, II, and IV are false
C. I, II, and IV are true; III is false
D. I, II and III are true; IV is false

3. How can software defects in future projects be prevented from reoccurring?
A. Creating documentation procedures and allocating resource contingencies
B. Asking programmers to perform a thorough and independent testing
C. Combining levels of testing and mandating inspections of all documents
D. Documenting lessons learned and determining the root cause of problems

4.Use numbers 1 to 5 to indicate which fundamental test process the following major tasks belong to:

1 for planning and control,
2 for analysis and design,
3 for implementation and execution,
4 for evaluating exit criteria and reporting, and
5 for test closure activities.

K. _____ Reporting the status of testing
L. _____ Documenting the infrastructure for reuse later
M. _____ Checking the test logs against the exit criteria
N. _____ Identifying the required test environment
O. _____ Developing and prioritizing test procedures
P. _____ Comparing actual vs. expected results
Q. _____ Designing and prioritizing test cases
R. _____ Assessing whether the exit criteria should be changed
S. _____ Receiving feedback and monitoring test activities
T. _____ Handing over the testware to the operations team


Testing throughout the software lifecycle :
Explains the relationship between testing and life cycle development models, including the V-model and iterative development. Outlines four levels of testing:
• Component testing
• Integration testing
• System testing
• Acceptance testing
Describes four test types, the targets of testing:
• Functional
• Non-functional characteristics
• Structural
• Change-related
Outlines the role of testing in maintenance.

2.0 Testing throughout the life cycle
2.1 Software development models
2.2 Test levels
2.3 Test types: the targets of testing
2.4 Maintenance testing
Prepare a bit from here Chapter 2

Take a small test now :

1. What test can be conducted for off-the-shelf software to get market feedback?
A. Beta testing
B. Usability testing
C. Alpha testing
D. COTS testing

2. Fill in the Blanks now :

1. _____ are the capabilities that a component or system must perform.
2. Reliability, usability, and portability are examples of _____.
3. Hardware and instrumentation needed for testing are parts of a _____.
4. _____ is also known as structural testing.
5. _____ ignores the internal mechanisms of a system being tested.
6. Which test level tests individual components or a group of related units?
7. Which test level determines if the customer will accept the system?
8. _____ checks the interactions between components.
9. _____ is usually performed on a complete, integrated system.
10. _____ is another name for unit testing.

3. Which test levels are USUALLY included in the common type of V-model?

A. Integration testing, system testing, acceptance testing and regression testing
B. Component testing, integration testing, system testing and acceptance testing
C. Incremental testing, exhaustive testing, exploratory testing and data driven testing
D. Alpha testing, beta testing, black-box testing and white-box testing

Static techniques :
Explains the differences between the various types of review and outlines the characteristics of a formal review. Describes how static analysis can find defects.

3.0 Static techniques
3.1 Reviews and the test process
3.2 Review process
3.3 Static analysis by tools
Prepare a bit from here Chapter 3

Take a small test now :

1.Which typical defects are easier to find using static instead of dynamic testing?

L. Deviation from standards
M. Requirements defects
N. Insufficient maintainability
O. Incorrect interface specifications

A. L, M, N and O
B. L and N
C. L, N and O
D. L, M and N

2. In a formal review, who is primarily responsible for the documents to be reviewed?

A. Author
B. Manager
C. Moderator
D. Reviewers

3.What are the typical six main phases of a formal review?

Test Design Techniques :
Explains the differences between the various types of review and outlines the characteristics of a formal review. Describes how static analysis can find defects.

4.0 Test Design Techniques
4.1 Identifying test conditions and designing test cases
4.2 Categories of test design techniques
4.3 Specification-based or black box techniques
4.4 Structure-based or white box techniques
4.5 Experience-based techniques
4.6 Choosing test techniques
Prepare a bit from here Chapter 4

Take a small test now :

1. Features to be tested, approach, item pass/fail criteria and test deliverables should be specified in which document?
A. Test case specification
B. Test procedure specification
C. Test plan
D. Test design specification

Which aspects of testing will establishing traceability help?

A. Configuration management and test data generation
B. Test specification and change control
C. Test condition and test procedures specification
D. Impact analysis and requirements coverage

Test Management
This section explains how to identify test conditions (things to test) and how to design test cases and procedures. It also explains the difference between white and black box testing. The following techniques are described in some detail with practical exercises:
• Equivalence partitioning
• Boundary value analysis
• Decision tables
• State transition testing
• Statement and decision testing
In addition, use case testing and experience-based testing (such as exploratory testing) are described and advice is given on choosing techniques.

5.0 Test management
5.1 Test organisation
5.2 Test planning and estimation
5.3 Test progress monitoring and control
5.4 Configuration management
5.5 Risk and testing
5.6 Incident or bug management
Prepare a bit from here Chapter 5

Take a small test now :

1. Which of the following is a KEY task of a tester?
A. Reviewing tests developed by others
B. Writing a test strategy for the project
C. Deciding what should be automated
D. Writing test summary reports

2. Which of the following are test leader's vs. tester's tasks?
A. Adjust plans as needed
B. Analyze design documents
C. Analyze overall test progress
D. Assess user requirements
E. Automate tests as needed
F. Contribute to test plans
G. Coordinate configuration management
H. Coordinate the test strategy
I. Create test specifications
J. Decide what to automate

Tool support for testing :
Different types of tool support for testing are described throughout the course. This session summarises them, discusses how to use them effectively and how to best introduce a new tool.

6.0 Tool support for testing
6.1 Types of test tools
6.2 Effective use of tools, potential benefits and risks
6.3 Introducing a tool into an organisation
Prepare a bit from here Chapter 6


Take a small test now :

1) Match the test tool classifications to the test tools.

1. Test management—applies to all test activities
2. Static testing—facilitates static analysis in detecting problems early
3. Test specification—generates tests and prepares data
4. Test execution and logging—runs tests and provides framework
5. Performance and monitoring—observes systems behavior
6. Specialized—caters to specific environment or platform
7. Other—assists in other miscellaneous testing tasks

A. ___ Configuration management tools
B. ___ Coverage measurement tools
C. ___ Debugging tools
D. ___ Dynamic analysis tools
E. ___ Incident management tools
F. ___ Industry-specific tools
G. ___ Modeling tools
H. ___ Monitoring tools
I. ___ Performance testing tools
J. ___ Platform-specific tools

2. Which of the following are potential benefits of using test support tools?

A. Ensuring greater consistency and minimizing software project risks
B. Reducing repetitive work and gaining easy access to test information
C. Performing objective assessment and reducing the need for training
D. Allowing for greater reliance on the tool to automate the test process

Mail me for answers.
All the best :-)

Please follow this post often to see latest questions updated.

Note:- This is just for reference. Don`t not completely refer this for your exam.