• No results found

Handout Software Testing v1.0

N/A
N/A
Protected

Academic year: 2021

Share "Handout Software Testing v1.0"

Copied!
175
0
0

Loading.... (view fulltext now)

Full text

(1)

Handout: Software Testing

Version: ST/Handout/1107/1.0 Date: 16-11-07

Cognizant 500 Glen Pointe Center West Teaneck, NJ 07666 Ph: 201-801-0233 www.cognizant.com

(2)

TABLE OF CONTENTS

Introduction ... 5

About this Module ... 5

Target Audience ... 5

Module Objectives ... 5

Pre-requisite ... 5

Chapter 1: Introduction to Testing ... 6

Learning Objectives ... 6

What is Software Testing ... 6

Testing Life Cycle ... 6

Broad Categories of Testing ... 7

The Testing Techniques ... 7

Types of Testing ... 8

SUMMARY ... 8

Test your Understanding ... 9

Chapter 2: Black Box Vs. White Box Testing ... 10

Learning Objective: ... 10

Introduction to Black Box and White Box testing... 10

Black box testing ... 10

Black box testing - without user involvement ... 11

Black box testing - with user involvement ... 11

White Box Testing ... 14

Black Box (Vs) White Box ... 18

SUMMARY ... 20

Test your Understanding ... 20

Chapter 3: Other Testing Types ... 21

Learning Objective ... 21

What is GUI Testing? ... 21

Regression Testing ... 31

Integration Testing ... 38

Acceptance Testing ... 43

Configuration Testing & Installation Testing ... 45

Alpha testing and Beta testing ... 48

(3)

Chapter 4: Levels of Testing ... 53 Learning Objective ... 53 Unit Testing... 53 Integration Testing ... 60 System Testing ... 61 SUMMARY ... 64

Test your Understanding ... 64

Chapter 5: JUnit Testing ... 65

Learning Objective ... 65

JUNIT Testing - Introduction ... 65

Simple Test Case ... 65

Fixture ... 66

Test Case ... 67

Suite ... 67

TestRunner ... 68

Chapter 6: Testing Artifacts ... 70

Learning Objective ... 70

Test Strategy and Test Plan ... 70

Test Plan ... 75

Test Case ...100

SUMMARY ...103

Test your Understanding ...103

Chapter 7: Defect Management ...104

Learning Objective ...104

What is a Defect? ...104

Defect Lifecycle ...105

Defect Reporting and Tracking ...105

SUMMARY ...107

Test your Understanding ...108

Chapter 8: Automation ...109

Learning Objective ...109

What is Automation? ...109

Automation Benefits ...109

Automation Life Cycle ...111

Test Environment Setup ...113

(4)

Automation Methods ...117

Automation tool comparison ...118

SUMMARY ...125

Chapter 9: Sample Test Automation Tool ...126

Learning Objective ...126

Sample Test Automation Tool ...126

Rational Suite of tools ...126

Rational Administrator ...127

Rational Robot ...130

Rational Test Manager ...140

Supported environments ...142

SUMMARY ...143

Chapter 10: Performance Testing ...144

Learning Objective ...144

What is Performance testing? ...144

Performance Testing Requirements ...146

Performance Testing Process ...147

Performance Testing Tools ...154

Volume and Stress Testing ...163

SUMMARY ...166

Chapter 11: Test Case Point ...167

Learning Objective ...167

What is a Test Case Point (TCP)? ...167

Test Case Point Analysis ...167

SUMMARY ...172

Test your Understanding ...172

REFERENCES ...174

WEBSITES ...174

BOOKS ...174

(5)

Introduction

About this Module

This module provides you with a brief description of the module, audience, suggested prerequisites and module objectives.

Target Audience

Entry Level Trainees

Module Objectives

After completing this module, the student will be able to: ‰ Explain Software Testing

‰ List the types of testing ‰ Explain Test Strategy ‰ Describe Test Plan ‰ Describe Test Design ‰ Describe Test Cases ‰ Describe Test Data ‰ Explain Test Execution

‰ Perform Defect reporting and analyzing the defects ‰ List Test Automation advantages and disadvantages ‰ Work with Winrunner

‰ Describe Performance Testing ‰ Work with Loadrunner Too ‰ Work with Test Director

Pre-requisite

(6)

Chapter 1:

Introduction to Testing

Learning Objectives

After completing this topic you will be able to: ‰ Explain the need for Software testing

What is Software Testing

Software testing is a process used to identify the correctness, completeness and quality of developed computer software. Actually, testing can never establish the correctness of computer software, as this can only be done by formal verification (and only when there is no mistake in the formal verification process). It can only find defects, not prove that there are none.

There are many approaches to software testing, but effective testing of complex products is essentially a process of investigation, not merely a matter of creating and following rote procedure. One definition of testing is "the process of questioning a product in order to evaluate it," where the "questions" are things the tester tries to do with the product, and the product answers with its behavior in reaction to the probing of the tester. Although most of the intellectual processes of testing are nearly identical to that of review or inspection, the word testing is connoted to mean the dynamic analysis of the product-- putting the product through its paces.

The quality of the application can and normally does vary widely from system to system but some of the common quality attributes include reliability, stability, portability, maintainability and usability. Refer to the ISO standard ISO 9126 for a more complete list of attributes and criteria.

Testing Life Cycle

Every testing project has to follow the waterfall model of the testing process.

According to the respective projects, the scope of testing can be tailored, but the process mentioned above is common to any testing activity.

Software Testing has been accepted as a separate discipline to the extent that there is a separate life cycle for the testing activity. Involving software testing in all phases of the software

(7)

development life cycle has become a necessity as part of the software quality assurance process. Right from the Requirements study till the implementation, there needs to be testing done on Software Testing every phase. The V-Model of the Software Testing Life Cycle along with the Software Development Life cycle given below indicates the various phases or levels of testing.

Broad Categories of Testing

Based on the V-Model mentioned above, we see that there are two categories of testing activities that can be done on software, namely,

‰ Static Testing ‰ Dynamic Testing

The kind of verification we do on the software work products before the process of compilation and creation of an executable is more of Requirement review, design review, code review, walkthrough and audits. This type of testing is called Static Testing.

When we test the software by executing and comparing the actual & expected results, it is called Dynamic Testing.

The Testing Techniques

To perform these types of testing, there are two widely used testing techniques. The above said testing types are performed based on the following testing techniques.

Black-Box testing technique:

This technique is used for testing based solely on analysis of requirements (specification, user documentation.). Also known as functional testing.

White-Box testing technique:

This technique us used for testing based on analysis of internal logic (design, code, etc.) (But expected results still come requirements). Also known as Structural testing. These topics will be elaborated in the coming chapters

(8)

Types of Testing

From the V-model, we see that are various levels or phases of testing, namely, Unit testing, Integration testing, System testing, User Acceptance testing etc.

Let us see a brief definition on the widely employed types of testing.

Unit Testing: The testing done to a unit or to a smallest piece of software. Done to verify if it satisfies its functional specification or its intended design structure. Integration Testing: Testing which takes place as sub elements are combined (i.e., integrated) to form higher-level elements Regression Testing: Selective re-testing of a system to verify the modification (bug fixes) have not caused unintended effects and that system still complies with its specified requirements. System Testing: Testing the software for the required specifications on the intended hardware Acceptance Testing: Formal testing conducted to determine whether or not a system satisfies its acceptance criteria, which enables a customer to determine whether to accept the system or not. Performance Testing: To evaluate the time taken or response time of the system to perform it’s required functions in comparison

Stress Testing: To evaluate a system beyond the limits of the specified requirements or system resources (such as disk space, memory, processor utilization) to ensure the system do not break unexpectedly

Load Testing: Load Testing, a subset of stress testing, verifies that a web site can handle a particular number of concurrent users while maintaining acceptable response times

Alpha Testing: Testing of a software product or system conducted at the developer’s site by the Customer

Beta Testing: Testing conducted at one or more customer sites by the end user of a delivered software product system.

SUMMARY

‰ “Testing is the process of executing a program with the intent of finding errors” ‰ Evolution of Software Testing

‰ The Testing process and lifecycle ‰ Broad categories of testing

‰ Widely employed Types of Testing ‰ The Testing Techniques

(9)

Test your Understanding

1. The primary objective of testing is a) To show that the program works

b) To provide a detailed indication of quality c) To find errors

d) To protect the end –user Answers:

(10)

Chapter 2:

Black Box Vs. White Box Testing

Learning Objective:

After completing this chapter, you will be able to: ‰ Explain the methods of testing

Introduction to Black Box and White Box testing

Test Design refers to understanding the sources of test cases, test coverage, how to develop and document test cases, and how to build and maintain test data. There are 2 primary methods by which tests can be designed and they are:

‰ Black box ‰ White box

Black-box test design treats the system as a literal "black-box", so it doesn't explicitly use knowledge of the internal structure. It is usually described as focusing on testing functional

requirements. Synonyms for black-box include: behavioral, functional, opaque-box, and closedbox. White-box test design allows one to peek inside the "box", and it focuses specifically on using internal knowledge of the software to guide the selection of test data. It is used to detect errors by means of execution-oriented test cases. Synonyms for white-box include: structural, glass-box and clear-box.

While black-box and white-box are terms that are still in popular use, many people prefer the terms "behavioral" and "structural". Behavioral test design is slightly different from black-box test design because the use of internal knowledge isn't strictly forbidden, but it's still discouraged. In practice, it hasn't proven useful to use a single test design method. One has to use a mixture of different methods so that they aren't hindered by the limitations of a particular one. Some call this "gray-box" or "translucent-"gray-box" test design, but others wish we'd stop talking about boxes altogether!!!

Black box testing

Black Box Testing is testing without knowledge of the internal workings of the item being tested. For example, when black box testing is applied to software engineering, the tester would only know the "legal" inputs and what the expected outputs should be, but not how the program actually arrives at those outputs. It is because of this that black box testing can be considered testing with respect to the specifications, no other knowledge of the program is necessary. For this reason, the tester and the programmer can be independent of one another, avoiding programmer bias toward his own work. For this testing, test groups are often used, Though centered around the knowledge of user requirements, black box tests do not necessarily involve the participation of users. Among the most important black box tests that do not involve users are functionality testing, volume tests, stress tests, recovery testing, and benchmarks. Additionally, there are two types of black box test that involve users, i.e. field and laboratory tests. In the following the most important aspects of these black box tests will be described briefly.

(11)

Black box testing - without user involvement

The so-called ``functionality testing'' is central to most testing exercises. Its primary objective is to assess whether the program does what it is supposed to do, i.e. what is specified in the

requirements. There are different approaches to functionality testing. One is the testing of each program feature or function in sequence. The other is to test module by module, i.e. each function where it is called first.

The objective of volume tests is to find the limitations of the software by processing a huge amount of data. A volume test can uncover problems that are related to the efficiency of a system, e.g. incorrect buffer sizes, a consumption of too much memory space, or only show that an error message would be needed telling the user that the system cannot process the given amount of data.

During a stress test, the system has to process a huge amount of data or perform many function calls within a short period of time. A typical example could be to perform the same function from all workstations connected in a LAN within a short period of time (e.g. sending e-mails, or, in the NLP area, to modify a term bank via different terminals simultaneously).

The aim of recovery testing is to make sure to which extent data can be recovered after a system breakdown. Does the system provide possibilities to recover all of the data or part of it? How much can be recovered and how? Is the recovered data still correct and consistent? Particularly for software that needs high reliability standards, recovery testing is very important.

The notion of benchmark tests involves the testing of program efficiency. The efficiency of a piece of software strongly depends on the hardware environment and therefore benchmark tests always consider the soft/hardware combination. Whereas for most software engineers benchmark tests are concerned with the quantitative measurement of specific operations, some also consider user tests that compare the efficiency of different software systems as benchmark tests. In the context of this document, however, benchmark tests only denote operations that are independent of personal variables.

Black box testing - with user involvement

For tests involving users, methodological considerations are rare in SE literature. Rather, one may find practical test reports that distinguish roughly between field and laboratory tests. In the

following only a rough description of field and laboratory tests will be given. E.g. Scenario Tests. The term ``scenario'' has entered software evaluation in the early 1990s . A scenario test is a test case which aims at a realistic user background for the evaluation of software as it was defined and performed It is an instance of black box testing where the major objective is to assess the

suitability of a software product for every-day routines. In short it involves putting the system into its intended use by its envisaged type of user, performing a standardised task. In field tests users are observed while using the software system at their normal working place.

Apart from general usability-related aspects, field tests are particularly useful for assessing the

interoperability of the software system, i.e. how the technical integration of the system works.

Moreover, field tests are the only real means to elucidate problems of the organizational integration of the software system into existing procedures. Particularly in the NLP environment

(12)

this problem has frequently been underestimated. A typical example of the organizational problem of implementing a translation memory is the language service of a big automobile manufacturer, where the major implementation problem is not the technical environment, but the fact that many clients still submit their orders as print-out, that neither source texts nor target texts are properly organised and stored and, last but not least, individual translators are not too motivated to change their working habits.

Laboratory tests are mostly performed to assess the general usability of the system. Due to the high laboratory equipment costs laboratory tests are mostly only performed at big software houses such as IBM or Microsoft. Since laboratory tests provide testers with many technical possibilities, data collection and analysis are easier than for field tests.

Testing Strategies/Techniques

‰ Black box testing should make use of randomly generated inputs (only a test range should be specified by the tester), to eliminate any guess work by the tester as to the methods of the function

‰ Data outside of the specified input range should be tested to check the robustness of the program

‰ Boundary cases should be tested (top and bottom of specified range) to make sure the highest and lowest allowable inputs produce proper output

‰ The number zero should be tested when numerical data is to be input

‰ Stress testing should be performed (try to overload the program with inputs to see where it reaches its maximum capacity), especially with real time systems

‰ Crash testing should be performed to see what it takes to bring the system down ‰ Test monitoring tools should be used whenever possible to track which tests have

already been performed and the outputs of these tests to avoid repetition and to aid in the software maintenance

‰ Other functional testing techniques include: transaction testing, syntax testing, domain testing, logic testing, and state testing.

‰ Finite state machine models can be used as a guide to design functional tests ‰ According to Beizer the following is a general order by which tests should be

designed:

o Clean tests against requirements.

o Additional structural tests for branch coverage, as needed. o Additional tests for data-flow coverage as needed.

o Domain tests not covered by the above.

o Special techniques as appropriate--syntax, loop, state, etc. o Any dirty tests not covered by the above.

Black box testing Methods Graph-based Testing Methods

‰ Black-box methods based on the nature of the relationships (links) among the program objects (nodes), test cases are designed to traverse the entire graph

‰ Transaction flow testing (nodes represent steps in some transaction and links represent logical connections between steps that need to be validated)

(13)

‰ Finite state modeling (nodes represent user observable states of the software and links represent transitions between states)

‰ Data flow modeling (nodes are data objects and links are transformations from one data object to another)

‰ Timing modeling (nodes are program objects and links are sequential connections between these objects, link weights are required execution times)

Equivalence Partitioning

‰ Black-box technique that divides the input domain into classes of data from which test cases can be derived

‰ An ideal test case uncovers a class of errors that might require many arbitrary test cases to be executed before a general error is observed

‰ Equivalence class guidelines:

o If input condition specifies a range, one valid and two invalid equivalence classes are defined

o If an input condition requires a specific value, one valid and two invalid o equivalence classes are defined

o If an input condition specifies a member of a set, one valid and one invalid equivalence class is defined

o If an input condition is Boolean, one valid and one invalid equivalence class is defined

Boundary Value Analysis

Black-box technique that focuses on the boundaries of the input domain rather than its center BVA guidelines:

‰ If input condition specifies a range bounded by values a and b, test cases should include a and b, values just above and just below a and b

‰ If an input condition specifies and number of values, test cases should exercise the minimum and maximum numbers, as well as values just above and just below the minimum and maximum values

‰ Apply guidelines 1 and 2 to output conditions, test cases should be designed to produce the minimum and maxim output reports

‰ If internal program data structures have boundaries (e.g. size limitations), be certain to test the boundaries

Comparison Testing

‰ Black-box testing for safety critical systems in which independently developed implementations of redundant systems are tested for conformance to specifications ‰ Often equivalence class partitioning is used to develop a common set of test cases for

each implementation

Orthogonal Array Testing

‰ Black-box technique that enables the design of a reasonably small set of test cases that provide maximum test coverage

‰ Focus is on categories of faulty logic likely to be present in the software component (without examining the code)

(14)

‰ Priorities for assessing tests using an orthogonal array ‰ Detect and isolate all single mode faults

‰ Detect all double mode faults ‰ Multimode faults

Specialized Testing

‰ Graphical user interfaces ‰ Client/server architectures ‰ Documentation and help facilities ‰ Real-time systems

o Task testing (test each time dependent task independently) o Behavioral testing (simulate system response to external events) o Inter task testing (check communications errors among tasks)

o System testing (check interaction of integrated system software and hardware) Advantages of Black Box Testing

‰ More effective on larger units of code than glass box testing

‰ Tester needs no knowledge of implementation, including specific programming languages

‰ Tester and programmer are independent of each other ‰ Tests are done from a user's point of view

‰ Will help to expose any ambiguities or inconsistencies in the specifications ‰ Test cases can be designed as soon as the specifications are complete

Disadvantages of Black Box Testing

‰ Only a small number of possible inputs can actually be tested, to test every possible input stream would take nearly forever

‰ Without clear and concise specifications, test cases are hard to design

‰ There may be unnecessary repetition of test inputs if the tester is not informed of test cases the programmer has already tried

‰ May leave many program paths untested

‰ Cannot be directed toward specific segments of code which may be very complex (and therefore more error prone)

‰ Most testing related research has been directed toward glass box testing

White Box Testing

Software testing approaches that examine the program structure and derive test data from the program logic. Structural testing is sometimes referred to as clear-box testing since white boxes are considered opaque and do not really permit visibility into the code.

Synonyms for white box testing ‰ Glass Box testing ‰ Structural testing ‰ Clear Box testing

(15)

‰ Open Box Testing

Types of White Box testing

A typical rollout of a product is shown in figure 1 below.

The purpose of white box testing

‰ Initiate a strategic initiative to build quality throughout the life cycle of a software product or service.

‰ Provide a complementary function to black box testing. ‰ Perform complete coverage at the component level. ‰ Improve quality by optimizing performance.

Practices:

This section outlines some of the general practices comprising white-box testing process. In general, white-box testing practices have the following considerations:

‰ The allocation of resources to perform class and method analysis and to document and review the same.

‰ Developing a test harness made up of stubs, drivers and test object libraries. ‰ Development and use of standard procedures, naming conventions and libraries. ‰ Establishment and maintenance of regression test suites and procedures. ‰ Allocation of resources to design, document and manage a test history library. ‰ The means to develop or acquire tool support for automation of

capture/replay/compare, test suite execution, results verification and documentation capabilities.

1 Code Coverage Analysis 1.1 Basis Path Testing

A testing mechanism proposed by McCabe whose aim is to derive a logical complexity measure of a procedural design and use this as a guide for defining a basic set of execution paths. These are test cases that exercise basic set will execute every statement at least once.

1.1.1 Flow Graph Notation

A notation for representing control flow similar to flow charts and UML activity diagrams.

(16)

1.1.2 Cyclomatic Complexity

The cyclomatic complexity gives a quantitative measure of 4the logical complexity. This value gives the number of independent paths in the basis set, and an upper bound for the number of tests to ensure that each statement is executed at least once. An independent path is any path through a program that introduces at least one new set of processing statements or a new condition (i.e., a new edge). Cyclomatic complexity provides upper bound for number of tests required to guarantee coverage of all program statements.

1.2 Control Structure testing 1.2.1 Conditions Testing

Condition testing aims to exercise all logical conditions in a program module. They may define:

1). Relational expression: (E1 op E2), where E1 and E2 are arithmetic expressions.

2). Simple condition: Boolean variable or relational expression, possibly proceeded by a NOT operator.

3). Compound condition: composed of two or more simple conditions, Boolean operators and parentheses.

4). Boolean expression: Condition without Relational expressions. 1.2.2 Data Flow Testing

Selects test paths according to the location of definitions and use of variables.

1.2.3 Loop Testing

Loops fundamental to many algorithms. Can define loops as simple, concatenated, nested, and unstructured.

Examples:

(17)

2 Design by Contract (DbC)

DbC is a formal way of using comments to incorporate specification information into the code itself. Basically, the code specification is expressed unambiguously using a formal language that

describes the code's implicit contracts. These contracts specify such requirements as: ‰ Conditions that the client must meet before a method is invoked.

‰ Conditions that a method must meet after it executes.

‰ Assertions that a method must satisfy at specific points of its execution

Tools that check DbC contracts at runtime such as Jcontract

[http://www.parasoft.com/products/jtract/index.htm] are used to perform this function. 3 Profiling

Profiling provides a framework for analyzing Java code performance for speed and heap memory use. It identifies routines that are consuming the majority of the CPU time so that problems may be tracked down to improve performance. These include the use of Microsoft Java Profiler API and Sun’s profiling tools that are bundled with the JDK. Third party tools such as JaViz

[http://www.research.ibm.com/journal/sj/391/kazi.html] may also be used to perform this function.

4 Error Handling

Exception and error handling is checked thoroughly are simulating partial and complete fail-over by operating on error causing test vectors. Proper error recovery, notification and logging are checked against references to validate program design.

5 Transactions

Systems that employ transaction, local or distributed, may be validated to ensure that ACID (Atomicity, Consistency, Isolation, Durability). Each of the individual parameters is tested

individually against a reference data set. Transactions are checked thoroughly for partial/complete commits and rollbacks encompassing databases and other XA compliant transaction processors. Advantages of White Box Testing

‰ Forces test developer to reason carefully about implementation ‰ Approximate the partitioning done by execution equivalence ‰ Reveals errors in "hidden" code

‰ Beneficent side-effects

Disadvantages of White Box Testing ‰ Expensive

(18)

Black Box (Vs) White Box

An easy way to start up a debate in a software testing forum is to ask the difference between black box and white box testing. These terms are commonly used, yet everyone seems to have a different idea of what they mean. Black box testing begins with a metaphor. Imagine you’re testing an electronics system. It’s housed in a black box with lights, switches, and dials on the outside. You must test it without opening it up, and you can’t see beyond its surface. You have to see if it works just by flipping switches (inputs) and seeing what happens to the lights and dials (outputs). This is black box testing. Black box software testing is doing the same thing, but with software. The actual meaning of the metaphor, however, depends on how you define the boundary of the box and what kind of access the “blackness” is blocking. An opposite test approach would be to open up the electronics system, see how the circuits are wired, apply probes internally and maybe even disassemble parts of it. By analogy, this is called white box testing, To help understand the different ways that software testing can be divided between black box and white box techniques, consider the Five-Fold Testing System. It lays out five dimensions that can be used for examining testing:

‰ People (who do the testing) ‰ Coverage (what gets tested) ‰ Risks (why you are testing) ‰ Activities (how you are testing)

‰ Evaluation (how you know you’ve found a bug)

‰ Let’s use this system to understand and clarify the characteristics of black box and white box testing.

People: Who do the testing?

Some people know how software works (developers) and others just use it (users). Accordingly, any testing by users or other non-developers is sometimes called “black box” testing. Developer testing is called “white box” testing. The distinction here is based on what the person knows or can understand.

Coverage: What is tested?

If we draw the box around the system as a whole, “black box” testing becomes another name for system testing. And testing the units inside the box becomes white box testing. This is one way to think about coverage. Another is to contrast testing that aims to cover all the requirements with testing that aims to cover all the code. These are the two most commonly used coverage criteria. Both are supported by extensive literature and commercial tools. Requirements-based testing could be called “black box” because it makes sure that all the customer requirements have been verified. Code-based testing is often called “white box” because it makes sure that all the code (the statements, paths, or decisions) is exercised.

Risks: Why are you testing?

Sometimes testing is targeted at particular risks. Boundary testing and other attack-based techniques are targeted at common coding errors. Effective security testing also requires a detailed understanding of the code and the system architecture. Thus, these techniques might be

(19)

classified as “white box”. Another set of risks concerns whether the software will actually provide value to users. Usability testing focuses on this risk, and could be termed “black box.”

Activities: How do you test?

A common distinction is made between behavioral test design, which defines tests based on functional requirements, and structural test design, which defines tests based on the code itself. These are two design approaches. Since behavioral testing is based on external functional definition, it is often called “black box,” while structural testing—based on the code internals—is called “white box.” Indeed, this is probably the most commonly cited definition for black box and white box testing. Another activity-based distinction contrasts dynamic test execution with formal code inspection. In this case, the metaphor maps test execution (dynamic testing) with black box testing, and maps code inspection (static testing) with white box testing. We could also focus on the tools used. Some tool vendors refer to code-coverage tools as white box tools, and tools that facilitate applying inputs and capturing inputs—most notably GUI capture replay tools—as black box tools. Testing is then categorized based on the types of tools used.

Evaluation: How do you know if you’ve found a bug?

There are certain kinds of software faults that don’t always lead to obvious failures. They may be masked by fault tolerance or simply luck. Memory leaks and wild pointers are examples. Certain test techniques seek to make these kinds of problems more visible. Related techniques capture code history and stack information when faults occur, helping with diagnosis. Assertions are another technique for helping to make problems more visible. All of these techniques could be considered white box test techniques, since they use code instrumentation to make the internal workings of the software more visible. These contrast with black box techniques that simply look at the official outputs of a program.

White box testing is concerned only with testing the software product, it cannot guarantee that the complete specification has been implemented. Black box testing is concerned only with testing the specification, it cannot guarantee that all parts of the implementation have been tested. Thus black box testing is testing against the specification and will discover faults of omission, indicating that part of the specification has not been fulfilled. White box testing is testing against the

implementation and will discover faults of commission, indicating that part of the implementation is faulty. In order to fully test a software product both black and white box testing are required. White box testing is much more expensive than black box testing. It requires the source code to be produced before the tests can be planned and is much more laborious in the determination of suitable input data and the determination if the software is or is not correct. The advice given is to start test planning with a black box test approach as soon as the specification is available. White box planning should commence as soon as all black box tests have been successfully passed, with the production of flowgraphs and determination of paths. The paths should then be checked against the black box test plan and any additional required test runs determined and applied. The consequences of test failure at this stage may be very expensive. A failure of a white box test may result in a change which requires all black box testing to be repeated and the redetermination of the white box paths.

To conclude, apart from the above described analytical methods of both glass and black box testing, there are further constructive means to guarantee high quality software end products.

(20)

Among the most important constructive means are the usage of object-oriented programming tools, the integration of CASE tools, rapid prototyping, and last but not least the involvement of users in both software development and testing procedures

SUMMARY

‰ Black box testing can sometimes describe user-based testing (people); system or requirements-based testing (coverage); usability testing (risk); or behavioral testing or capture replay automation (activities).

‰ White box testing, on the other hand, can sometimes describe developer-based testing (people); unit or code-coverage testing (coverage); boundary or security testing (risks); structural testing, inspection or code-coverage automation (activities); or testing based on probes, assertions, and logs (evaluation).

‰ Black-box test design treats the system as a literal "black-box", so it doesn't explicitly use knowledge of the internal structure. It is usually described as focusing on testing functional requirements.

‰ Synonyms for black-box include: behavioral, functional, opaque-box, and closed-box ‰ White-box test design allows one to peek inside the "box", and it focuses specifically

on using internal knowledge of the software to guide the selection of test data. It is used to detect errors by means of execution-oriented test cases.

‰ Synonyms for white-box include: structural, glass-box and clear-box.

Test your Understanding

1. Equivalence partitioning is a black-box testing method that a) Looks for equivalent data values in the program b) Looks for classes of output

c) Focuses on output errors d) Defines classes of input

2. At a minimum, white-box test case design requires that you have a) Source code

b) An operational program c) A detailed procedural design d) The program architecture

Answers: 1). d 2). c

(21)

Chapter 3:

Other Testing Types

Learning Objective

After completing this chapter, you will be able to ‰ Explain the methods of testing

What is GUI Testing?

GUI is the abbreviation for Graphic User Interface. It is absolutely essential that any application has to be user-friendly. The end user should be comfortable while using all the components on screen and the components should also perform their functionality with utmost clarity. Hence it becomes very essential to test the GUI components of any application. GUI Testing can refer to just ensuring that the look-and-feel of the application is acceptable to the user, or it can refer to testing the functionality of each and every component involved.

The following is a set of guidelines to ensure effective GUI Testing and can be used even as a checklist while testing a product / application.

Section 1 - Windows Compliance Testing Application

Start Application by Double Clicking on its ICON. The Loading message should show the application name, version number, and a bigger pictorial representation of the icon. No Login is necessary. The main window of the application should have the same caption as the caption of the icon in Program Manager. Closing the application should result in an "Are you Sure" message box Attempt to start application twice. This should not be allowed - you should be returned to main window. Try to start the application twice as it is loading. On each window, if the application is busy, then the hour glass should be displayed. If there is no hour glass, then some enquiry in progress message should be displayed. All screens should have a Help button (i.e.) F1 key should work the same.

If Window has a Minimize Button, click it. Window should return to an icon on the bottom of the screen. This icon should correspond to the Original Icon under Program Manager. Double Click the Icon to return the Window to its original size. The window caption for every application should have the name of the application and the window name - especially the error messages. These should be checked for spelling, English and clarity, especially on the top of the screen. Check if the title of the window make sense. If the screen has a Control menu, then use all ungrayed options.

Check all text on window for Spelling/Tense and Grammar. Use TAB to move focus around the Window. Use SHIFT+TAB to move focus backwards. Tab order should be left to right, and Up to Down within a group box on the screen. All controls should get focus - indicated by dotted box, or cursor. Tabbing to an entry field with text in it should highlight the entire text in the field. The text in the Micro Help line should change - Check for spelling, clarity and non-updateable etc. If a field is disabled (grayed) then it should not get focus. It should not be possible to select them with either the mouse or by using TAB. Try this for every grayed control.

(22)

Never updateable fields should be displayed with black text on a gray background with a black label. All text should be left justified, followed by a colon tight to it. In a field that may or may not be updateable, the label text and contents changes from black to gray depending on the current status. List boxes are always white background with black text whether they are disabled or not. All others are gray.

In general, double-clicking is not essential. In general, everything can be done using both the mouse and the keyboard. All tab buttons should have a distinct letter.

Text Boxes

Move the Mouse Cursor over all Enterable Text Boxes. Cursor should change from arrow to Insert Bar. If it doesn't then the text in the box should be gray or non-updateable. Refer to previous page. Enter text into Box Try to overflow the text by typing to many characters – should be stopped Check the field width with capitals W. Enter invalid characters - Letters in amount fields, try strange characters like + , - * etc. in All fields. SHIFT and Arrow should Select Characters. Selection should also be possible with mouse. Double Click should select all text in box.

Option (Radio Buttons)

Left and Right arrows should move 'ON' Selection. So should Up and Down. Select with mouse by clicking.

Check Boxes

Clicking with the mouse on the box, or on the text should SET/UNSET the box. SPACE should do the same.

Command Buttons

If Command Button leads to another Screen, and if the user can enter or change details on the other screen then the Text on the button should be followed by three dots. All Buttons except for OK and Cancel should have a letter Access to them. This is indicated by a letter underlined in the button text. Pressing ALT+Letter should activate the button. Make sure there is no duplication. Click each button once with the mouse - This should activate Tab to each button - Press SPACE - This should activate Tab to each button - Press RETURN - This should activate The above are VERY IMPORTANT, and should be done for EVERY command Button. Tab to another type of control (not a command button). One button on the screen should be default (indicated by a thick black border). Pressing Return in ANY no command button control should activate it. If there is a Cancel Button on the screen, then pressing <Esc> should activate it. If pressing the Command button results in uncorrectable data e.g. closing an action step, there should be a message phrased positively with Yes/No answers where Yes results in the completion of the action. Drop Down List Boxes

Pressing the Arrow should give list of options. This List may be scrollable. You should not be able to type text in the box. Pressing a letter should bring you to the first item in the list with that start with that letter. Pressing ‘Ctrl - F4’ should open/drop down the list box. Spacing should be compatible with the existing windows spacing (word etc.). Items should be in alphabetical order with the exception of blank/none, which is at the top or the bottom of the list box. Drop down with the item selected should be display the list with the selected item on the top. Make sure only one space appears, shouldn't have a blank line at the bottom.

(23)

Combo Boxes

Should allow text to be entered. Clicking Arrow should allow user to choose from list List Boxes

Should allow a single selection to be chosen, by clicking with the mouse, or using the Up and Down Arrow keys. Pressing a letter should take you to the first item in the list starting with that letter. If there is a 'View' or 'Open' button besides the list box then double clicking on a line in the List Box, should act in the same way as selecting and item in the list box, then clicking the command button. Force the scroll bar to appear, make sure all the data can be seen in the box. Section 2 - Screen Validation Checklist

Aesthetic Conditions:

‰ Is the general screen background of the correct color? ‰ Are the field prompts of the correct color?

‰ Are the field backgrounds of the correct color?

‰ In read-only mode, are the field prompts of the correct color? ‰ In read-only mode, are the field backgrounds of the correct color? ‰ Are all the screen prompts specified in the correct screen font? ‰ Is the text in all fields specified in the correct screen font? ‰ Are all the field prompts aligned perfectly on the screen? ‰ Are all the field edit boxes aligned perfectly on the screen? ‰ Are all group boxes aligned correctly on the screen? ‰ Should the screen be resizable?

‰ Should the screen be allowed to minimize? ‰ Are all the field prompts spelt correctly?

‰ Are all character or alphanumeric fields left justified? This is the default unless otherwise specified.

‰ Are all numeric fields right justified? This is the default unless otherwise specified. ‰ Is all the micro-help text spelt correctly on this screen?

‰ Is all the error message text spelt correctly on this screen?

‰ Is all user input captured in UPPER case or lowercase consistently?

‰ Where the database requires a value (other than null) then this should be defaulted into fields. The user must either enter an alternative valid value or leave the default value intact.

‰ Assure that all windows have a consistent look and feel. ‰ Assure that all dialog boxes have a consistent look and feel.

Validation Conditions:

‰ Does a failure of validation on every field cause a sensible user error message? ‰ Is the user required to fix entries, which have failed validation tests?

‰ Have any fields got multiple validation rules and if so are all rules being applied? ‰ If the user enters an invalid value and clicks on the OK button (i.e. does not TAB off

the field) is the invalid entry identified and highlighted correctly with an error message?

(24)

‰ Is validation consistently applied at screen level unless specifically required at field level?

‰ For all numeric fields check whether negative numbers can and should be able to be entered.

‰ For all numeric fields check the minimum and maximum values and also some mid-range values allowable?

‰ For all character/alphanumeric fields check the field to ensure that there is a character limit specified and that this limit is exactly correct for the specified database size? ‰ Do all mandatory fields require user input?

‰ If any of the database columns don't allow null values then the corresponding screen fields must be mandatory. (If any field, which initially was mandatory, has become optional then check whether null values are allowed in this field.)

Navigation Conditions:

‰ Can the screen be accessed correctly from the menu? ‰ Can the screen be accessed correctly from the toolbar?

‰ Can the screen be accessed correctly by double clicking on a list control on the previous creen?

‰ Can all screens accessible via buttons on this screen be accessed correctly?

‰ Can all screens accessible by double clicking on a list control be accessed correctly? ‰ Is the screen modal? (i.e.) Is the user prevented from accessing other functions when

this screen is active and is this correct?

‰ Can a number of instances of this screen be opened at the same time and is this correct?

Usability Conditions:

‰ Are all the dropdowns on this screen sorted correctly? Alphabetic sorting is the default unless otherwise specified.

‰ Is all date entry required in the correct format?

‰ Have all pushbuttons on the screen been given appropriate Shortcut keys? ‰ Do the Shortcut keys work correctly?

‰ Have the menu options that apply to your screen got fast keys associated and should they have?

‰ Does the Tab Order specified on the screen go in sequence from Top Left to bottom right? This is the default unless otherwise specified.

‰ Are all read-only fields avoided in the TAB sequence? ‰ Are all disabled fields avoided in the TAB sequence?

‰ Can the cursor be placed in the microhelp text box by clicking on the text box with the mouse?

‰ Can the cursor be placed in read-only fields by clicking in the field with the mouse? ‰ Is the cursor positioned in the first input field or control when the screen is opened? ‰ Is there a default button specified on the screen?

‰ Does the default button work correctly?

‰ When an error message occurs does the focus return to the field in error when the user cancels it?

(25)

‰ When the user Alt+Tab's to another application does this have any impact on the screen upon return to the application?

‰ Do all the fields edit boxes indicate the number of characters they will hold by there length? e.g. a 30 character field should be a lot longer

Data Integrity Conditions:

‰ Is the data saved when the window is closed by double clicking on the close box? ‰ Check the maximum field lengths to ensure that there are no truncated characters? ‰ Where the database requires a value (other than null) then this should be defaulted into fields. The user must either enter an alternative valid value or leave the default value intact.

‰ Check maximum and minimum field values for numeric fields?

‰ If numeric fields accept negative values can these be stored correctly on the database and does it make sense for the field to accept negative numbers?

‰ If a set of radio buttons represents a fixed set of values such as A, B and C then what happens if a blank value is retrieved from the database? (In some situations rows can be created on the database by other functions, which are not screen based, and thus the required initial values can be incorrect.)

‰ If a particular set of data is saved to the database check that each value gets saved fully to the database. (i.e.) Beware of truncation (of strings) and rounding of numeric values.

Modes (Editable Read-only) Conditions:

‰ Are the screen and field colors adjusted correctly for read-only mode? ‰ Should a read-only mode be provided for this screen?

‰ Are all fields and controls disabled in read-only mode?

‰ Can the screen be accessed from the previous screen/menu/toolbar in read-only mode?

‰ Can all screens available from this screen be accessed in read-only mode? ‰ Check that no validation is performed in read-only mode.

General Conditions:

‰ Assure the existence of the "Help" menu.

‰ Assure that the proper commands and options are in each menu.

‰ Assure that all buttons on all tool bars have a corresponding key commands. ‰ Assure that each menu command has an alternative (hot-key) key sequence, which

will invoke it where appropriate.

‰ In drop down list boxes, ensure that the names are not abbreviations / cut short ‰ In drop down list boxes, assure that the list and each entry in the list can be accessed

via appropriate key / hot key combinations.

‰ Ensure that duplicate hot keys do not exist on each screen

‰ Ensure the proper usage of the escape key (which is to undo any changes that have been made) and generates a caution message "Changes will be lost - Continue yes/no"

(26)

‰ Assure that the Cancel button operates, as a Close button when changes have been made that cannot be undone.

‰ Assure that only command buttons, which are used by a particular window, or in a particular dialog box, are present. – (i.e) make sure they don't work on the screen behind the current screen.

‰ When a command button is used sometimes and not at other times, assures that it is grayed out when it should not be used.

‰ Assure that OK and Cancel buttons are grouped separately from other command buttons.

‰ Assure that command button names are not abbreviations.

‰ Assure that all field labels/names are not technical labels, but rather are names meaningful to system users.

‰ Assure that command buttons are all of similar size and shape, and same font & font size.

‰ Assure that each command button can be accessed via a hot key combination. ‰ Assure that command buttons in the same window/dialog box do not have duplicate

hot keys.

‰ Assure that each window/dialog box has a clearly marked default value (command button, or other object) which is invoked when the Enter key is pressed - and NOT the Cancel or Close button

‰ Assure that focus is set to an object/button, which makes sense according to the function of the window/dialog box.

‰ Assure that all option buttons (and radio buttons) names are not abbreviations. ‰ Assure that option button names are not technical labels, but rather are names

meaningful to system users.

‰ If hot keys are used to access option buttons, assure that duplicate hot keys do not exist in the same window/dialog box.

‰ Assure that option box names are not abbreviations.

‰ Assure that option boxes, option buttons, and command buttons are logically grouped together in clearly demarcated areas "Group Box"

‰ Assure that the Tab key sequence, which traverses the screens, does so in a logical way.

‰ Assure consistency of mouse actions across windows.

‰ Assure that the color red is not used to highlight active objects (many individuals are redgreen color blind).

‰ Assure that the user will have control of the desktop with respect to general color and highlighting (the application should not dictate the desktop background

characteristics).

‰ Assure that the screen/window does not have a cluttered appearance ‰ Ctrl + F6 opens next tab within tabbed window

‰ Shift + Ctrl + F6 opens previous tab within tabbed window

‰ Tabbing will open next tab within tabbed window if on last field of current tab ‰ Tabbing will go onto the 'Continue' button if on last field of last tab within tabbed

window

‰ Tabbing will go onto the next editable field in the window ‰ Banner style & size & display exact same as existing windows

(27)

‰ If 8 or less options in a list box, display all options on open of list box - should be no need to scroll

‰ Errors on continue will cause user to be returned to the tab and the focus should be on the field causing the error. (i.e the tab is opened, highlighting the field with the error on it)

‰ Pressing continue while on the first tab of a tabbed window (assuming all fields filled correctly) will not open all the tabs.

‰ On open of tab focus will be on first editable field ‰ All fonts to be the same

‰ Alt+F4 will close the tabbed window and return you to main screen or previous screen (as appropriate), generating "changes will be lost" message if necessary.

‰ Microhelp text for every enabled field & button ‰ Ensure all fields are disabled in read-only mode ‰ Progress messages on load of tabbed screens ‰ Return operates continue

‰ If retrieve on load of tabbed window fails window should not open

Specific Field Tests Date Field Checks

‰ Assure that leap years are validated correctly & do not cause errors/miscalculations. ‰ Assure that month code 00 and 13 are validated correctly & do not cause

errors/miscalculations.

‰ Assure that 00 and 13 are reported as errors.

‰ Assure that day values 00 and 32 are validated correctly & do not cause errors/miscalculations.

‰ Assure that Feb. 28, 29, 30 are validated correctly & do not cause errors/ miscalculations.

‰ Assure that Feb. 30 is reported as an error.

‰ Assure that century change is validated correctly & does not cause errors/miscalculations.

‰ Assure that out of cycle dates are validated correctly & do not cause errors/miscalculations.

Numeric Fields

‰ Assure that lowest and highest values are handled correctly. ‰ Assure that invalid values are logged and reported.

‰ Assure that valid values are handles by the correct procedure.

‰ Assure that numeric fields with a blank in position 1 are processed or reported as an error.

‰ Assure that fields with a blank in the last position are processed or reported as an error an error.

‰ Assure that both + and - values are correctly processed. ‰ Assure that division by zero does not occur.

(28)

‰ Include value zero in all calculations. ‰ Include at least one in-range value.

‰ Include maximum and minimum range values.

‰ Include out of range values above the maximum and below the minimum. ‰ Assure that upper and lower values in ranges are handled correctly.

Alpha Field Checks

‰ Use blank and non-blank data. ‰ Include lowest and highest values. ‰ Include invalid characters & symbols. ‰ Include valid characters.

‰ Include data items with first position blank. ‰ Include data items with last position blank.

Validation Testing - Standard Actions

Examples of Standard Actions - Substitute your specific commands

‰ Add ‰ View ‰ Change ‰ Delete

‰ Continue - (i.e. continue saving changes or additions) ‰ Add

‰ View ‰ Change ‰ Delete

‰ Cancel - (i.e. abandon changes or additions) ‰ Fill each field - Valid data

‰ Fill each field - Invalid data

‰ Different Check Box / Radio Box combinations ‰ Scroll Lists / Drop Down List Boxes

‰ Help

‰ Fill Lists and Scroll ‰ Tab

‰ Tab Sequence ‰ Shift Tab

(29)

Shortcut keys / Hot Keys

(30)

* These shortcuts are suggested for text formatting applications, in the context for which they make sense. Applications may use other modifiers for these operations.

(31)

Regression Testing

What is Regression Testing?

‰ Regression testing is the process of testing changes to computer programs to make sure that the older programming still works with the new changes.

‰ Regression testing is a normal part of the program development process. Test department coders develop code test scenarios and exercises that will test new units of code after they have been written.

‰ Before a new version of a software product is released, the old test cases are run against the new version to make sure that all the old capabilities still work. The reason they might not work because changing or adding new code to a program can easily introduce errors into code that is not intended to be changed.

‰ The selective retesting of a software system that has been modified to ensure that any bugs have been fixed and that no other previously working functions have failed as a result of the reparations and that newly added features have not created problems with previous versions of the software. Also referred to as verification testing ‰ Regression testing is initiated after a programmer has attempted to fix a recognized

problem or has added source code to a program that may have inadvertently introduced errors.

‰ It is a quality control measure to ensure that the newly modified code still complies with its specified requirements and that unmodified code has not been affected by the maintenance activity.

Test Execution

Test Execution is the heart of the testing process. Each time your application changes, you will want to execute the relevant parts of your test plan in order to locate defects and assess quality. Create Test Cycles

During this stage you decide the subset of tests from your test database you want to execute. Usually you do not run all the tests at once. At different stages of the quality assurance process, you need to execute different tests in order to address specific goals. A related group of tests is called a test cycle, and can include both manual and automated tests

Example: You can create a cycle containing basic tests that run on each build of the application throughout development. You can run the cycle each time a new build is ready, to determine the application's stability before beginning more rigorous testing.

Example: You can create another set of tests for a particular module in your application. This test cycle includes tests that check that module in depth.

To decide which test cycles to build, refer to the testing goals you defined at the beginning of the process. Also consider issues such as the current state of the application and whether new functions have been added or modified.

(32)

Following are examples of some general categories of test cycles to consider:

‰ Sanity cycle checks the entire system at a basic level (breadth, rather than depth) to see that it is functional and stable. This cycle should include basic-level tests containing mostly positive checks.

‰ Normal cycle tests the system a little more in depth than the sanity cycle. This cycle can group medium-level tests, containing both positive and negative checks.

‰ Advanced cycle tests both breadth and depth. This cycle can be run when more time is available for testing. The tests in the cycle cover the entire application (breadth), and also test advanced options in the application (depth).

‰ Regression cycle tests maintenance builds. The goal of this type of cycle is to verify that a change to one part of the software did not break the rest of the application. A regression cycle includes sanity-level tests for testing the entire software, as well as in-depth tests for the specific area of the application that was modified.

Run Test Cycles (Automated & Manual Tests)

Once you have created cycles that cover your testing objectives, you begin executing the tests in the cycle. You perform manual tests using the test steps. Testing Tools executes automated tests for you. A test cycle is complete only when all tests-automatic and manual-have been run.

‰ With Manual Test Execution you follow the instructions in the test steps of each test. ‰ You use the application, enter input, compare the application output with the expected

output, and log the results. For each test step you assign either pass or fail status. ‰ During Automated Test Execution you create a batch of tests and launch the entire

batch at once. Testing Tools runs the tests one at a time. It then imports results, providing outcome summaries for each test.

Analyze Test Results

After every test run one analyze and validate the test results. And have to identify all the failed steps in the tests and to determine whether a bug has been detected, or if the expected result needs to be updated.

Change Request

Initiating a Change Request

A user or developer wants to suggest a modification that would improve an existing application, notices a problem with an application, or wants to recommend an enhancement. Any major or minor request is considered a problem with an application and will be entered as a change request.

Type of Change Request

Bug the application works incorrectly or provides incorrect information. (for example, a letter is allowed to be entered in a number field)

Change a modification of the existing application. (for example, sorting the files alphabetically by the second field rather than numerically by the first field makes them easier to find) Enhancement

(33)

new functionality or item added to the application. (for example, a new report, a new field, or a new button)

Priority for the request

Low the application works but this would make the function easier or more user friendly. High the application works, but this is necessary to perform a job. Critical the application does not work, job functions are impaired and there is no work around. This also applies to any Section 508 infraction. Bug Tracking

‰ Locating and repairing software bugs is an essential part of software development. ‰ Bugs can be detected and reported by engineers, testers, and end-users in all phases

of the testing process.

‰ Information about bugs must be detailed and organized in order to schedule bug fixes and determine software release dates.

‰ Bug Tracking involves two main stages: reporting and tracking.

Report Bugs

Once you execute the manual and automated tests in a cycle, you report the bugs (or defects) that you detected. The bugs are stored in a database so that you can manage them and analyze the status of your application.

When you report a bug, you record all the information necessary to reproduce and fix it. You also make sure that the QA and development personnel involved in fixing the bug are notified.

Track and Analyze Bugs

The lifecycle of a bug begins when it is reported and ends when it is fixed, verified, and closed.

‰ First you report New bugs to the database, and provide all necessary information to reproduce, fix, and follow up the bug.

‰ The Quality Assurance manager or Project manager periodically reviews all New bugs and decides which should be fixed. These bugs are given the status Open and are assigned to a member of the development team.

‰ Software developers fix the Open bugs and assign them the status Fixed.

‰ QA personnel test a new build of the application. If a bug does not reoccur, it is Closed. If a bug is detected again, it is reopened.

Communication is an essential part of bug tracking; all members of the development and quality assurance team must be well informed in order to insure that bugs information is up to date and that the most important problems are addressed.

The number of open or fixed bugs is a good indicator of the quality status of your application. You can use data analysis tools such as re-ports and graphs in interpret bug data.

Traceability Matrix

A traceability matrix is created by associating requirements with the products that satisfy

them.Tests are associated with the requirements on which they are based and the product tested tomeet the requirement. Below is a simple traceability matrix structure. There can be more things

(34)

included in a traceability matrix than shown below. Traceability requires unique identifiers for each requirement and product. Numbers for products are established in a configuration management (CM) plan.

Traceability ensures completeness, that all lower level requirements derive from higher level requirements, and that all higher level requirements are allocated to lower level requirements. Traceability is also used in managing change and provides the basis for test planning. SAMPLE TRACEABILITY MATRIX

A traceability matrix is a report from the requirements database or repository. The examples below show traceability between user and system requirements. User requirement identifiers begin with "U" and system requirements with "S."

Tracing S12 to its source makes it clear this requirement is erroneous: it must be eliminated, rewritten, or the traceability corrected.

(35)

In addition to traceability matrices, other reports are necessary to manage requirements. What goes into each report depends on the information needs of those receiving the report(s).

Determine their information needs and document the information that will be associated with the requirements when you set up your requirements database or repository.

Phases of Testing

The primary objective of testing effort is to determine the conformance to requirements specified in the contracted documents. The integration of this code with the internal code is the important objective. Goal is to evaluate the system as a whole, not its parts

‰ Techniques can be structural or functional.

‰ Techniques can be used in any stage that tests the system as a whole (System testing,

‰ Acceptance Testing, Unit testing, Installation, etc.)

(36)
(37)
(38)

Integration Testing

One of the most significant aspects of a software development project is the integration strategy. Integration may be performed all at once, top-down, bottom-up, critical piece first, or by first integrating functional subsystems and then integrating the subsystems in separate phases using any of the basic strategies. In general, the larger the project, the more important the integration strategy.

Very small systems are often assembled and tested in one phase. For most real systems, this is impractical for two major reasons. First, the system would fail in so many places at once that the debugging and retesting effort would be impractical.

Second, satisfying any white box testing criterion would be very difficult, because of the vast amount of detail separating the input data from the individual code modules. In fact, most integration testing has been traditionally limited to ``black box'' techniques.

Large systems may require many integration phases, beginning with assembling modules into low-level subsystems, then assembling subsystems into larger subsystems, and finally assembling the highest level subsystems into the complete system.

To be most effective, an integration testing technique should fit well with the overall integration strategy. In a multi-phase integration, testing at each phase helps detect errors early and keep the system under control. Performing only cursory testing at early integration phases and then

applying a more rigorous criterion for the final stage is really just a variant of the high-risk "big bang" approach. However, performing rigorous testing of the entire software involved in each integration phase involves a lot of wasteful duplication of effort across phases. The key is to

References

Related documents