Home » 12/1/07 - 1/1/08
Requirements Traceability Matrix !!!


Ideally each software developed must satisfy the set of requirements completely. So, right from design, each requirement must be addressed in every single document in the software process. The documents include the HLD, LLD, source codes, unit test cases, integration test cases and the system test cases. Refer the following sample table which describes Requirements Traceability Matrix process. In this matrix, the rows will have the requirements. For every document {HLD, LLD etc}, there will be a separate column. So, in every cell, we need to state, what section in HLD addresses a particular requirement. Ideally, if every requirement is addressed in every single document, all the individual cells must have valid section ids or names filled in. Then we know that every requirement is addressed. In case of any missing of requirement, we need to go back to the document and correct it, so that it addressed the requirement.
For testing at each level, we may have to address the requirements. One integration and the system test case may address multiple requirements.

Installation Testing !!!

Installation testing is often the most under tested area in testing. This type of testing is performed to ensure that all Installed features and options function properly. It is also performed to verify that all necessary components of the application are, indeed, installed.

Installation testing should take care of the following points: -

1.To check if while installing product checks for the dependent software / patches say Service pack3.

2.The product should check for the version of the same product on the target machine, say the previous version should not be over installed on the newer version.

3.Installer should give a default installation path say “C:\programs\.”

4.Installer should allow user to install at location other then the default installation path.

5.Check if the product can be installed “Over the Network”

6.Installation should start automatically when the CD is inserted.

7.Installer should give the remove / Repair options.

8.When uninstalling, check that all the registry keys, files, Dll, shortcuts, active X components are removed from the system.

9.Try to install the software without administrative privileges (login as guest).

10.Try installing on different operating system.

11.Try installing on system having non-compliant configuration such as less memory / RAM / HDD.

Content Management Testing !!!


‘Content Management’ has gained a predominant importance after the Web applications took a major part of our lives. What is Content Management? As the name denotes, it is managing the content. How do they work? Let us take a common example. You are in China and you wanted to open the Yahoo! Chinese version. When you choose Chinese version on the main page of Yahoo! You get to see the entire content in Chinese. Yahoo! Would strategically plan and have various servers for various languages. When you choose a particular version of the page, the request is redirected to the server which manages the Chinese content page. The Content Management systems help is placing content for various purposes and also help in displaying when the request comes in.

Content Management Testing involves:

1. Testing the distribution of the content.

2. Request, Response Time’s.

3. Content display on various browsers and operating systems.

4. Load distribution on the servers.


In fact all the performance related testing should be performed for each version of the web application which uses the content management servers.

Unit Test Cases !!!

It must be clear by now that preparing Unit Test Cases document (referred to as UTC hereafter) is an important task in Unit Testing activity. Having an UTC, which is complete with every possible test case, leads to complete Unit Testing and thus gives an assurance of defect-free Unit at the end of Unit Testing stage.

Think of following aspects while preparing Unit Test Cases:


* Expected Functionality

Write test cases against each functionality that is expected to be provided from the Unit being developed.


* Input values

Write test cases for each of the inputs accepted by the Unit.


* Output values

Write test cases to generate scenarios, which will produce all types of output values that are expected from the Unit.


* Screen / Report Layout

Screen Layout or web page layout and Report layout must be tested against the requirements. It should not happen that the screen or the report looks beautiful and perfect, but user wanted something entirely different! It should ensure that pages and screens are consistent.


* Path coverage

A Unit may have conditional processing which results in various paths the control can traverse through. Test case must be written for each of these paths.


* Assumptions

A Unit may assume certain things for it to function. For example, a Unit may need a database to be open. Then test case must be written to check that the Unit reports error if such assumptions are not met.


* Transactions:

In case of database applications, it is important to make sure that transactions are properly designed and no way inconsistent data gets saved in the database.


* Abnormal terminations:

Behavior of the Unit in case of abnormal termination should be tested.


* Error messages

Error messages should be short, precise and self-explanatory. They should be properly phrased and should be free of grammatical mistakes.


UTC Document Format



Defect Recording !!!


* Defect Recording can be done on the same document of UTC, in the column of ‘Expected Results’. This column can be duplicated for the next iterations of Unit Testing.

* Defect Recording can also be done using some tools like Bugzilla, in which defects are stored in the database.

* Defect Recording needs to be done with care. It should be able to indicate the problem in clear, unambiguous manner, and reproducing of the defects should be easily possible from the defect information.

Comparison Testing !!!

There are situations where independent versions of software be developed for critical applications, even when only a single version will be used in the delivered computer based system. It is these independent versions which form the basis of a black box testing technique called Comparison testing or back-to-back testing.

Equivalence Partitioning !!!

Equivalence partitioning is a black box testing method that divides the input domain of a program into classes of data from which test cases can be derived.

Equivalence Partitioning can be defined according to the following guidelines:
1. If an input condition specifies a range, one valid and one two invalid classes are defined.
2. If an input condition requires a specific value, one valid and two invalid equivalence classes are defined.
3. If an input condition specifies a member of a set, one valid and one invalid equivalence class is defined.
4. If an input condition is Boolean, one valid and one invalid class is defined.

Boundary Value Analysis !!!


Boundary Value Analysis (BVA) is a test data selection technique (Functional Testing technique) where the extreme values are chosen. Boundary values include maximum, minimum, just inside/outside boundaries, typical values, and error values. The hope is that, if a system works correctly for these special values then it will work correctly for all values in between.* Extends equivalence partitioning
* Test both sides of each boundary
* Look at output boundaries for test cases too
* Test min, min-1, max, max+1, typical values

* BVA focuses on the boundary of the input space to identify test cases
* Rational is that errors tend to occur near the extreme values of an input variable


There are two ways to generalize the BVA techniques:1. By the number of variables
For n variables: BVA yields 4n + 1 test cases.2. By the kinds of ranges
Generalizing ranges depends on the nature or type of variables* NextDate has a variable Month and the range could be defined as {Jan, Feb, …Dec}
* Min = Jan, Min +1 = Feb, etc.
* Triangle had a declared range of {1, 20,000}
* Boolean variables have extreme values True and False but there is no clear choice for the remaining three values

Advantages of Boundary Value Analysis
1. Robustness Testing - Boundary Value Analysis plus values that go beyond the limits
2. Min - 1, Min, Min +1, Nom, Max -1, Max, Max +1
3. Forces attention to exception handling
4. For strongly typed languages robust testing results in run-time errors that abort normal execution

Limitations of Boundary Value Analysis
BVA works best when the program is a function of several independent variables that represent bounded physical quantities

1. Independent Variables

NextDate test cases derived from BVA would be inadequate: focusing on the boundary would not leave emphasis on February or leap years
Dependencies exist with NextDate's Day, Month and Year
Test cases derived without consideration of the function2. Physical Quantities
An example of physical variables being tested, telephone numbers - what faults might be revealed by numbers of 000-0000, 000-0001, 555-5555, 999-9998, 999-9999?

Loop Testing !!!


Loop Testing is a white box testing technique that focuses exclusively on the validity of loop constructs. Four classes of loops can be defined: Simple loops, Concatenated loops, nested loops, and unstructured loops.

Simple Loops
The following sets of tests can be applied to simple loops, where ‘n’ is the maximum number of allowable passes through the loop.
1. Skip the loop entirely.
2. Only one pass through the loop.
3. Two passes through the loop.
4. ‘m’ passes through the loop where m
5. n-1, n, n+1 passes through the loop.

Nested Loops
If we extend the test approach from simple loops to nested loops, the number of possible tests would grow geometrically as the level of nesting increases.
1. Start at the innermost loop. Set all other loops to minimum values.
2. Conduct simple loop tests for the innermost loop while holding the outer loops at their minimum iteration parameter values. Add other tests for out-of-range or exclude values.
3. Work outward, conducting tests for the next loop, but keep all other outer loops at minimum values and other nested loops to “typical” values.
4. Continue until all loops have been tested.

Concatenated Loops
Concatenated loops can be tested using the approach defined for simple loops, if each of the loops is independent of the other. However, if two loops are concatenated and the loop counter for loop 1 is used as the initial value for loop 2, then the loops are not independent.

Unstructured Loops
Whenever possible, this class of loops should be redesigned to reflect the use of the structured programming constructs.

Control Structure Testing !!!

Described below are some of the variations of Control Structure Testing.

Condition Testing
Condition testing is a test case design method that exercises the logical conditions contained in a program module.

Data Flow Testing
The data flow testing method selects test paths of a program according to the locations of definitions and uses of variables in the program.

Code Review !!!

A meeting at which software code is presented to project personnel, managers, users, customers, or other interested parties for comment or approval.

QA team member (In case the QA Team is only involved in Black Box Testing, then the Development team lead chairs the review team) leads code review. Members from development team and QA team participate in the review.
Input Criteria
The Coding Standards Document and the Source file are the essential documents for the review. A checklist can be used for the review.

Exit Criteria
Exit criteria include the filled & completed checklist with the reviewers’ comments & suggestions and the re-verification whether they are incorporated in the documents.

Design Review !!!

A process or meeting during which a system, hardware, or software design is presented to project personnel, managers, users, customers, or other interested parties for comment or approval. Types include critical design review, preliminary design review, and system design review.

QA team member leads design review. Members from development team and QA team participate in the review.
Input Criteria
Design document is the essential document for the review. A checklist can be used for the review.

Exit Criteria
Exit criteria include the filled & completed checklist with the reviewers’ comments & suggestions and the re-verification whether they are incorporated in the documents.

Requirement Review !!!

A process or meeting during which the requirements for a system, hardware item, or software item are presented to project personnel, managers, users, customers, or other interested parties for comment or approval. Types include system requirements review, software requirements review.
Product management leads Requirement Review. Members from every affected department participates in the review

Input Criteria
Software requirement specification is the essential document for the review. A checklist can be used for the review.

Exit Criteria
Exit criteria include the filled & completed checklist with the reviewers’ comments & suggestions and the re-verification whether they are incorporated in the documents.

Technical Reviews !!!

Technical reviews confirm that product Conforms to specifications, adheres to regulations, standards, guidelines, plans, changes are properly implemented, changes affect only those system areas identified by the change specification.
The main objectives of Technical Reviews can be categorized as follows:
• Ensure that the software confirms to the organization standards.
• Ensure that any changes in the development procedures (design, coding, testing) are implemented per the organization pre-defined standards.
In technical reviews, the following Software products are reviewed
• Software requirements specification
• Software design description
• Software test documentation
• Software user documentation
• Installation procedure
• Release notes

The participants of the review play the roles of Decision-maker, Review leader, Recorder, Technical staff.

Management Reviews !!!

Management reviews are performed by those directly responsible for the system in order to monitor progress, determine status of plans and schedules, confirm requirements and their system allocation.

Therefore the main objectives of Management Reviews can be categorized as follows:
• Validate from a management perspective that the project is making progress according to the project plan.
• Ensure that deliverables are ready for management approvals.
• Resolve issues that require management’s attention.
• Identify any project bottlenecks.
• Keeping project in Control.
Support decisions made during such reviews include Corrective actions, Changes in the allocation of resources or changes to the scope of the project

In management reviews the following Software products are reviewed:
Audit Reports
Contingency plans
Installation plans
Risk management plans
Software Q/A

The participants of the review play the roles of Decision-Maker, Review Leader, Recorder, Management Staff, and Technical Staff.

Review !!!

A process or meeting during which a work product, or set of work products, is presented to project personnel, managers, users, customers, or other interested parties for comment or approval.
The main goal of reviews is to find defects. Reviews are a good compliment to testing to help assure quality. A few purposes’ of SQA reviews can be as follows:
• Assure the quality of deliverable before the project moves to the next stage.
• Once a deliverable has been reviewed, revised as required, and approved, it can be used as a basis for the next stage in the life cycle. 


Types of reviews* Management Reviews
* Technical Reviews
* Inspections
* Walkthroughs and Audits.

Objective Testing !!!

Objective testing is mainly used in systems where the data can be recorded while the simulation is running. This testing technique relies on the application of statistical and automated methods to the data collected.

Statistical methods are used to provide an insight into the accuracy of the simulation. These methods include hypothesis testing, data plots, principle component analysis and cluster analysis.

Automated testing requires a knowledge base of valid outcomes for various runs of simulation. This knowledge base is created by domain experts of the simulation system being tested. The data collected in various test runs is compared against this knowledge base to automatically validate the system under test. An advantage of this kind of testing is that the system can continually be regression tested as it is being developed.

Walkthrough !!!

A static analysis technique in which a designer or programmer leads members of the development team and other interested parties through a segment of documentation or code, and the participants ask questions and make comments about possible errors, violation of development standards, and other problems.

The objectives of Walkthrough can be summarized as follows:
• Detect errors early.
• Ensure (re)established standards are followed:
• Train and exchange technical information among project teams which participate in the walkthrough.
• Increase the quality of the project, thereby improving morale of the team members.

The participants in Walkthroughs assume one or more of the following roles:
a) Walk-through leader
b) Recorder
c) Author
d) Team member

To consider a review as a systematic walk-through, a team of at least two members shall be assembled. Roles may be shared among the team members. The walk-through leader or the author may serve as the recorder. The walk-through leader may be the author.
Individuals holding management positions over any member of the walk-through team shall not participate in the walk-through.

Input to the walk-through shall include the following:
a) A statement of objectives for the walk-through
b) The software product being examined
c) Standards that are in effect for the acquisition, supply, development, operation, and/or maintenance of the software product
Input to the walk-through may also include the following:
d) Any regulations, standards, guidelines, plans, and procedures against which the software product is to be inspected
e) Anomaly categories

The walk-through shall be considered complete when
a) The entire software product has been examined
b) Recommendations and required actions have been recorded
c) The walk-through output has been completed

When Should Testing stop?

"When to stop testing" is one of the most difficult questions to a test engineer.
The following are few of the common Test Stop criteria:

1. All the high priority bugs are fixed.
2. The rate at which bugs are found is too small.
3. The testing budget is exhausted.
4. The project duration is completed.
5. The risk in the project is under acceptable limit.

Practically, we feel that the decision of stopping testing is based on the level of the risk acceptable to the management. As testing is a never ending process we can never assume that 100 % testing has been done, we can only minimize the risk of shipping the product to client with X testing done. The risk can be measured by Risk analysis but for small duration / low budget / low resources project, risk can be deduced by simply: -

• Measuring Test Coverage.
• Number of test cycles.
• Number of high priority bugs.

Methods of Software Testing !!!

Testability

Software testability is how easily, completely and conveniently a computer program can be tested.
Software engineers design a computer product, system or program keeping in mind the product testability. Good programmers are willing to do things that will help the testing process and a checklist of possible design points, features and so on can be useful in negotiating with them.
Here are the two main heuristics of software testing.
1. Visibility
2. Control

VisibilityVisibility is our ability to observe the states and outputs of the software under test. Features to improve the visibility are• Access to Code
Developers must provide full access (source code, infrastructure, etc) to testers. The Code, change records and design documents should be provided to the testing team. The testing team should read and understand the code.• Event logging
The events to log include User events, System milestones, Error handling and completed transactions. The logs may be stored in files, ring buffers in memory, and/or serial ports. Things to be logged include description of event, timestamp, subsystem, resource usage and severity of event. Logging should be adjusted by subsystem and type. Log file report internal errors, help in isolating defects, and give useful information about context, tests, customer usage and test coverage.The more readable the Log Reports are, the easier it becomes to identify the defect cause and work towards corrective measures.

• Error detection mechanisms
Data integrity checking and System level error detection (e.g. Microsoft Appviewer) are useful here. In addition, Assertions and probes with the following features are really helpful
* Code is added to detect internal errors.
* Assertions abort on error.
* Probes log errors.
* Design by Contract theory---This technique requires that assertions be defined for functions. Preconditions apply to input and violations implicate calling functions while post-conditions apply to outputs and violations implicate called functions. This effectively solves the oracle problem for testing.

• Resource Monitoring
Memory usage should be monitored to find memory leaks. States of running methods, threads or processes should be watched (Profiling interfaces may be used for this.). In addition, the configuration values should be dumped. Resource monitoring is of particular concern in applications where the load on the application in real time is estimated to be considerable.

Control
Control refers to our ability to provide inputs and reach states in the software under test.
The features to improve controllability are:• Test Points
Allow data to be inspected, inserted or modified at points in the software. It is especially useful for dataflow applications. In addition, a pipe and filters architecture provides many opportunities for test points.• Custom User Interface controls
Custom UI controls often raise serious testability problems with GUI test drivers. Ensuring testability usually requires:
* Adding methods to report necessary information
* Customizing test tools to make use of these methods
* Getting a tool expert to advise developers on testability and to build the required support.
* Asking third party control vendors regarding support by test tools.

• Test Interfaces
Interfaces may be provided specifically for testing e.g. Excel and Xconq etc.
Existing interfaces may be able to support significant testing e.g. InstallSheild, AutoCAD, Tivoli, etc.• Fault injection
Error seeding---instrumenting low level I/O code to simulate errors---makes it much easier to test error handling. It can be handled at both system and application level, Tivoli, etc.• Installation and setup
Testers should be notified when installation has completed successfully. They should be able to verify installation, programmatically create sample records and run multiple clients, daemons or servers on a single machine.

Life Cycle of a Defect !!!

The following self explanatory figure explains the life cycle of a defect: