web view5/4/2017 · “the process of evaluating a system or system component by...

33
4. Software Testing Strategies and Methods Marks: 16 4.1 Software Testing Fundamentals: IEEE defines the testing as follows: “The process of evaluating a system or system component by manual or automated mean to verify that it satisfy specified requirements or to identify differences between expected and actual results.” Software Testing is aimed to identify any Bugs, errors, faults or failures present in the software. Bug is a logical mistake which is caused by software developer while writing the software code. Error is defined as the measure of deviation of the outputs given by the software from the outputs expected by the user. Fault is defined as the condition that leads to malfunctioning (fail to perform function) of the software. Advantages of testing: Testing removes errors which prevent software from producing output according to user requirements. Software testing ensures that the software is developed according to user requirements. Software testing ensures that the software conforms to business as well as user’s need. Software testing improves the quality of software by removing maximum number of errors from it. Testing removes errors that lead to software failures. Objectives or Goals of Testing: The testing objective is basically to test the code. This provides high probability to find all the errors. To demonstrate that errors are not present. To show that intended functions are present. To gain the confidence in the software ability to do what it is required to do. Discover the unnoticed errors. Increase the probability of discovering errors. Testing principles: Refer the testing principles from 2 nd chapter. Testing guidelines:

Upload: tranmien

Post on 31-Jan-2018

215 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

4. Software Testing Strategies and Methods Marks: 16

4.1 Software Testing Fundamentals:

IEEE defines the testing as follows:

“The process of evaluating a system or system component by manual or automated mean to verify that it satisfy specified requirements or to identify differences between expected and actual results.”

Software Testing is aimed to identify any Bugs, errors, faults or failures present in the software. Bug is a logical mistake which is caused by software developer while writing the software code. Error is defined as the measure of deviation of the outputs given by the software from the outputs

expected by the user. Fault is defined as the condition that leads to malfunctioning (fail to perform function) of the software. Advantages of testing:

Testing removes errors which prevent software from producing output according to user requirements.

Software testing ensures that the software is developed according to user requirements. Software testing ensures that the software conforms to business as well as user’s need. Software testing improves the quality of software by removing maximum number of errors from it. Testing removes errors that lead to software failures.

Objectives or Goals of Testing:The testing objective is basically to test the code. This provides high probability to find all the errors.

To demonstrate that errors are not present. To show that intended functions are present. To gain the confidence in the software ability to do what it is required to do. Discover the unnoticed errors. Increase the probability of discovering errors.

Testing principles:

Refer the testing principles from 2nd chapter.

Testing guidelines: Needs and relationship between input and output must be clearly present. The code of the software must be structured. All the outputs should be traceable to SRS. Modular structure should be used for software design. Software testability must be improved by writing proper program structure, data structure, and

code. Testing characteristics:

Testing is the process of executing a program with the intent of finding errors. A good test case is one that has a high probability of finding maximum number of errors. A successful test is one that uncovers all the errors. Testing can’t show the absence of defects, it can only show that software defects are present.

Page 2: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Definitions of testing:-1. “The process of executing a program with the intent of finding errors.” OR2. “The process which is performed to prove that there are no errors in software.” OR3. The process to detect (find) the defects (errors) and minimize the risk associated with the remaining

defects in software.” OR4. Testing is the process of executing a software program application with the intent of finding errors.

Concept of good test:- Kanar, falk, Nguyen suggest the following attributes of “good test”:-

1. A good test has a high probability of finding an error:-To achieve this objective the tester must understand the software and attempt to develop a mental picture of how the software might fail.

2. A good test should be neither too simple nor too complex:- Sometimes series of tests are combined into single test case but it may not able to identify all the errors. So each test should be executed separately.

3. A good test should be “best of breed” : If there is group of tests which are having same intension, resources, limitations ,in such situation the test which is having high capacity to uncover all the errors will be selected.

4. A good test is not redundant: As testing time and resources are limited there is no point to conduct the same kind of test having same purpose.

Meaning of testing strategy:- To perform testing in planned and systematic manner software testing strategy is developed. Testing strategy is used to identify which testing is to be applied, methods, techniques, and tools to

be used during testing. Software testing strategy should contain complete information about procedure to perform testing,

purpose and requirements of testing. The choice of Software testing strategy is highly dependent on nature of developed software. For Ex.

if the software is based on transaction then strategy should able to check the flow of all the transactions.

All Software testing strategy has following generic characteristics:-1) Testing begins at the component level and works “outward “toward the integration of entire

computer based system.(means each module is tested separately first and later whole integrated system is tested)

2) Before starting of testing, technical reviews should be conducted to eliminate errors.3) Testing and debugging are different activities but debugging must be accommodated (or defined)

in each testing strategy.4) Different testing techniques are appropriate for different software engineering approaches and at

different points in time.5) Testing is conducted by the developer of the software and test group.

Concept of Test Plan, Test Cases and Test Data:- A) Test plan:-

Test specification is called a test plan .it is an approach to test a system. It defines the strategy that will be used to verify and ensure that a product meets its design

specification and requirements. Test plan describes how testing would be accomplished, purpose, scope and method of software

testing. It also determines testing tasks, the persons involved in executing those tasks, the environment for

testing, test designs and measurement techniques to be used. The developers are well aware that test plans will be executed and this information is made

available to management and developers.

Page 3: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

A test plan is a general document for the entire project that defines, the scope, approach to be taken and schedule and the persons responsible for the different activities of testing.

Components of test plan:-

1.Responsibilities Assigns responsibilities to various people and keeps them focus.

2.Assumptions Avoids any misinterpretation of schedules.

3.Test It abstracts the entire process and defines the outline of test.

4.Communication Communication plan is developed(i.e.who,what,how about the people)

5.Risk Analysis It identifies the area that is critical for success.

6.Defect ReportingIt specify the way in which a defect should be documented so that I can be used when another defect occur.

7.EnvironmentIt describes the data, interfaces, work area, and technical environment used in testing.

B) Test Case:-

Definition of Test Case:- IEEE defines test case as, “A set of test inputs, execution conditions and expected results developed for particular objective such as to verify specific requirement”.

Definition of Test:- Boris Beizer defines test as ,” A one or more subtests executed as a sequence because the outcome of one subtest is the input of the next subtest”

Test case is also a set of conditions under which a tester will determine whether a functionality of software is working correctly or not.

A test case normally consist of a unique identifier,preconditions,events,series of steps to follow, input ,output, expected result and actual result.

Test case is nothing but an input and an expected result. The test results can be stored in a word processor document, spreadsheet, database or other

repositories. In a database system, you may also able to see past test results, who generated results and what

system configuration was used to generate those results.

C) Test Data:-

Test data are the data which have been identified for use in tests. Test data can be used as input data to the tests to produce the expected output. In most cases multiple set of values or data are used as a test data to test the functionality of software.

All these values are collected in separate file as test data. Test data is provided to the client with product. Concept of Successful Test:-

The successful test leads to improve the reliability and quality of the software. G.Myers has defined following objectives of the testing:

1. Testing is the process of executing a program to find out an error.2. A good test case is one that has high probability of finding errors.3. A successful test is one that uncovers all the errors.

Page 4: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

4.2. Characteristics of Testing Strategies:- A successful testing strategy need to have following characteristics:

1. Testing strategy should specify the product requirements in measurable manner long before testing begins.

2. Testing objectives should be explicitly mentioned in the testing strategy.3. Testing strategy should develop a testing plan that focuses on rapid cycle testing.4. A good testing strategy can be easy and simply understood by the users of the software.5. Test strategy should build robust software that is designed to test itself.6. Testing strategy should develop a continuous improvement approaches for the testing process.

4.3 Software Verification And Validation:- Verification is defined as, “a set of operations which ensure that the software correctly implements

a particular function.” Validation is defined as a “set of activities which ensures that the software has been produced

according to customer needs.” Difference between verification and validation:-

Sr. No

Verification Validation

1

Verification is defined as ,”a set of operations which ensure that the software correctly implements a particular function.”

Validation is defined as a “set of activities which ensures that the software has been produced according to customer needs.”

2It ensures that the software meets all the functionality.

It ensures that the functionalities meet the intended behavior.

3Verification takes place first and includes the checking for documentation and code.

Validation occurs after verification and includes the checking for overall product.

4 Done by developers. Done by Testers.

5Have static activities like reviews, walkthrough, inspections to verify that software is correct or not.

Have dynamic activities like executing the software .

6It is an objective process & no subjective decisions are needed to verify the software.

It is an subjective process & involves subjective decisions about how the software works.

7 It evaluates plans,documents,specification,code It evaluates product itself.

4.4 Testing Strategies:- A software test strategy provides a road map for the software developer, quality assurance

organization, and the customer. The testing strategy includes the test planning, test case design, test execution. A software test strategy should be flexible enough to promote the testing of all large software

based system. The software engineering process may be viewed as a spiral, as shown in fig. A strategy for software testing may also be viewed in the context of the spiral.

1. Unit testing begins at the vertex of the spiral and concentrates on each unit of the software.2. Integration testing focuses on the design and the construction of the software architecture.3. In validation testing, requirement analysis is validated against the software that has been

constructed.4. In system testing, the software and the other system elements are tested as whole.

Page 5: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Testing is actually a series of four steps that are implemented sequentially as shown in following fig.

4.4.1 Unit Testing:- Unit Testing concentrates on the verification of the smallest element of the program i.e. Module

In this testing all control paths are tested to identify errors within the bounds of the module.

The important goal of unit testing is to isolate each part of the program and show individual parts

are correct.

It is very easy to perform and requires less amount of time because the modules are smaller in

size.

In unit testing it is possible that the outputs produced by one unit become input for another unit

hence, if incorrect output produced by one unit is provided as input to the second unit then it also

produces wrong output. If this process is not corrected, the entire software may produce

unexpected outputs.

To avoid this, all the units in the software are tested independently using unit –testing.

In unit testing, the units are tested to ensure that they operate correctly.

Page 6: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

In software engineering the unit testing is not just performed once during software development,

but repeated whenever the software is modified. Unit testing performs the following functions:

1. Unit testing tests all control paths to uncover maximum errors that occur during the execution of the program.

2. Unit testing ensures that all statements in the unit have been executed at least once.3. Unit testing tests data structures like stacks, queues that represents the relationships among

individual data elements.4. Unit testing checks the range of inputs given to units. This is because every input range has a

maximum and minimum value and the input given should be within the range of these values.5. Unit testing ensures that the data entered in variables is of the same data type as it has been

defined.6. Unit testing checks all arithmetic calculations.

1. Unit Test Considerations:-

The tests that are performed as part of unit testing are shown in Fig. 4.4.

The module interface is tested to ensure that information properly flows into and out of the unit.

The local data structure is considered to ensure that the stored data maintains the integrity or not.

Boundary conditions are tested to ensure that the modules are executing within boundaries.

All independent paths are tested to ensure that all statements are being executed at least once.

Finally, all error-handling paths are examined to identify and remove the errors from module.

Fig. 4.4 : Unit test

2. Unit Test Procedures:- Unit testing is performed after coding step. Once, source code has been produced, reviewed and

verified for correct syntax, unit test can start to uncover errors. As a module is not a stand-alone program, the driver and stub software must be produced for each

module. A driver is a "main program" that receives the input data i.e. test data and passes this to the module

being tested and prints the results. Stubs act as the sub-modules called by the test modules. The unit testing is white-box-oriented and it is possible to test multiple units simultaneously. The unit test environment is as shown in following fig.

Module

InterfaceLocal data StructureBoundary conditionsIndependent pathsError handling paths

Page 7: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Advantages of Unit testing:-

1. Unit tests find problems early in the development cycle.

2. Unit testing allows the programmer to refactor code at a later stage, and make sure the module still works correctly.

3. Unit testing can be used in a bottom-up testing style approach.

4. Unit testing provides documentation of the system to the developers so they can learn what functionality is provided by a unit and basic understanding of unit’s interface.

Limitations of Unit Testing:1. Testing will not catch every error in the program because it cannot evaluate every execution

path.

2. It only tests the functionality of the units therefore it will not catch integration errors.

3. It should be done in conjunction with othe software testing activities because unit testing only shows presence and absence of errors.

4. It is very difficult to writing the test case and setting up the unit test.

5. It wastes initial time to perform them.

4.4.2 Integration Testing:- When unit testing is complete integration testing begins. In integration testing the tested units are combined together to form system as whole. The aim of this testing is to ensure that all modules are working properly according to user’s

requirements when they are combined. The integration test takes all tested individual modules, integrate them, test them again and develop

the software. It ensures that all modules work together properly and transfer accurate data across their interfaces. Integration testing contains:-

Non –Incremental integration: The entire program is tested as a whole and all errors are identified.

Incremental integration: The program is constructed and tested in small segments, to find out errors.

There are two types of the Incremental integration:-

Page 8: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

1. Top-Down integration2. Bottom-up integration

Following fig shows integration of individual modules in integration testing.

4.4.2.1. Top-Down integration :(Depth –first integration):-

Top-Down integration is an incremental approach where all modules are integrated by moving downwards through the control hierarchy, starting with main control module.

The subordinate modules are integrated in either depth first or breadth first manner. In depth first integration, it integrate all the modules on a major control path of the structure as

follows:-

Fig. Depth First integration

For instance, selecting the left-hand path, modules Ml, M2, M5 would integrate first. Next M8 or M6 would be integrated. Then the central and right hand control paths are produced.

In Breath-first integration, it integrates all modules horizontally. From the figure, modules M2, M3 a M4 would be integrated first. The next control level, M5, M6 M7 get integrated and last M8 will be integrated.

Steps : The main control module is used as a test driver and stubs are substituted for all modules directly

subordinate to the main control module. Depending on the integration approach, subordinate stubs are replaced one at a time with actual

modules. Tests are conducted as each module is integrated. On the completion of each set of tests, another stub is replaced with real module. Regression testing may be conducted to ensure that new errors have not been introduced. Fig. 4.8 illustrates the process.

M1

M6

M3

M5

M2

M8

M7

M4

Page 9: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be
Page 10: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Fig. 4.8 Top-down integration approach

Advantages:1.It supports both breadth-first method and depth-first method.

2.None or only one driver is required.

3.Behavior of modules at high level is verified early.

4.In this testing module can be added one at a time with each step.

Disadvantages:1. In this testing, large numbers of stubs are required if the software contains many functions.2. In this, modules cannot be tested in isolation from other module because module may call other module.3. The behavior of low level modules is verified at last.

4.4.2.1. Bottom-up integration :-

Bottom-up integration testing begins testing with modules at lowest level . The modules are integrated in upward direction. No stubs are required. Steps:-

Low level modules are combined into clusters that perform a specific software sub function. A driver is written to coordinate test case input and output. The cluster is tested. Drivers are removed and clusters are combined moving upward.

Following fig shows Bottom-up integration.

Page 11: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Advantages of Bottom-up Integration:1. In this testing behavior of modules at lower levels is verified earlier.2. It uncovers errors that occur at the lower levels in software.3. In this testing, modules are tested in isolation from other modules.4. No stubs are required in this testing.

Disadvantages of Bottom-up Integration:1. In this testing, large numbers of drivers are required to test clusters.2. Delays in verification of modules at higher levels.3. The major drawback of bottom-up integration is that the program does not exist until the last module is included.

4.4.2.3 Regression Testing:- When the new module is added, the new data flow path is established, the input, output and program logic may get

changed. These changes may effect on the software function. To solve above problem, regression testing can be used, which is re-execution of some subset of tests that have

been already conducted to ensure that changes not propagated. It re-tests the software or part of software to ensure that the components, features, and functions, which were

previously working properly, do not fail when some changes are made to the software. Regression testing is important because of the following reasons:

1.Minimize the gaps in testing when an application with changes made has been tested.

2.Testing the new changes to verify that the change made did not affect other area of the application.

3.Avoids the risks when regression testing is performed on the application.

4.Increase speed to market the product.

Page 12: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Any time you modify a program, you should perform regression testing. Regression testing can be used not only for testing the correctness but also for tracking the quality of its output.

Benefits or advantages of Regression testing:-1. It ensures that the changed parts are working properly.

2. It also detects the side effects caused by changing the operating environment.

3. It detects the bugs caused by changes to the software.

4. It ensures that all errors are corrected and are not affecting on the software.

5. It is very new way for doing integration testing.

Disadvantages of Regression testing:-1. It is time consuming.2. To write regression scripts, skilled software testers are needed.3. Jobs are increased because of many peoples are required so it causes cost as overhead for company.4. It is expensive.5. Budget of product increases in this testing.6. When new functionality is added, high maintenance is required.

4.4.2.4 Smoke Testing:- It is defined as “an approach of integration testing in which a subset of test cases is designed to ensure that

the functions of software are working correctly.” It is best suitable for time-critical software. Sometimes the tests are performed by the automated system. Smoke test generally consist of collection of tests that can be applied to newly created or repaired computer

program. In this testing the changed codes are also validated. A smoke test should possess the following characteristics:

1. Smoke testing should run quickly.2. Smoke testing should try to cover a large part of the software and if possible the entire software.3. Smoke testing should be easy for testers to perform.4. Smoke testing should be able to detect all errors present in the cluster.5. Smoke testing should try to find showstopper errors.

Benefits of Smoke Testing:1. Integration risk is minimized: Daily testing uncovers incompatibilities and show-stoppers early in the

testing process thereby reducing schedule impact.

2. The quality of the end-product is improved: Smoke testing uncovers both functional errors and

architectural and component-level design errors.

3. Error diagnosis and correction are simplified: Smoke testing uncovers errors in the newest

components that were integrated.

4. Progress is easier to assess: As integration testing progresses, software has been integrated so that the

Managers get a good indication that progress is being made.

Page 13: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Disadvantage:

1. Test is time consuming.

4.5 ALPHA AND BETA TESTING:-

If software is developed as a product to be used by many customers, it is impossible to perform formal acceptance tests with each customer. Most software product builders use a process called alpha and beta testing to uncover errors that only the end user seems able to find.

1. ALPHA TESTING:- This test is the first stage of testing, which is performed by the teams. Alpha testing is combination of unit testing, integration testing and system testing. The 'alpha' test’ is conducted at the developer's site by a customer. The developers just "looking over the shoulder” of the user and recording the errors. The alpha tests are conducted in controlled environment. During this testing following will be tested :

i. Spelling mistakes.ii. Broken links

iii. Cloudy directions.iv. The application is tested on machines to test loading time.

It is internal acceptance testing in which the users test the software at developer’s site as shown in fig.

Fig.Alpha testing Alpha testing assesses the performance of the software in the environment in which it is developed. On completion of alpha testing, users report the errors to software developers to correct them. Advantages of Alpha Testing:-

1. It identifies all the errors present in the software.2. It checks whether all functions are working properly or not.3. It provides better view about the reliability of the software at early stage.4. It helps simulate real time user behavior and environment.5. It detects many showstopper or serious errors.6. Ability to provide early detection of errors with respect to de functionality.

Disadvantage of Alpha Testing: The functionality cannot be tested as software because it is still under development stage. Sometimes

developers and testers are dissatisfied with the result of alpha testing.

Page 14: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

2. Beta Testing: It is also known as pre-release test. This test is performed after alpha testing has been successfully performed. In beta testing some selected audience tests the application. Beta test versions of software are ideally distributed to a wide audience on the web, to give real-time test. Beta testing assesses the performance of the software at user's site. This is 'live' testing and is conducted in an

environment, which is not controlled by the developer. Beta testing is performed without any interference from the developer as shown in following fig. Beta testing is performed to know whether the developed software satisfies user requirements or not.

Fig .Beta Testing

Beta testing is considered as external acceptance testing which aims to feedback from the potential customers. For this, the system and the limited public, known as beta versions are made available to the groups of people for getting more feedback.

These people test the software to detect any faults or bugs that may not have been detected by the developers and report their feedback.

After acquiring feedback, the system is modified and released either for sale. In this testing the users will be testing the following:

1. Users will install, run the application and send their feedback to the project team.2. Typographical errors, confusing application flow, and even crashes.3. After getting the feedback, the project team can fix the problems before releasing software to the actual

users.4. It improves the quality of the product.5. High quality software is released so customer satisfaction is there.

Advantages of Beta Testing:1. It reduces product failure risk via customer validation.2. Beta testing evaluates the entire documentation and code of the software. Creates goodwill with customers

and increases customer satisfaction.3. High quality software is released so customer satisfaction is there.4. It is cost effective.5. It checks whether the software is operating successfully in user environment.6. Improves quality via customer feedback.

Page 15: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Disadvantages of Beta Testing:-1. Test management is an issue. As compared to other testing types which are usually executed inside a

company in a controlled environment, beta testing is executed out in the real world where you seldom have control.

2. Finding the right beta users and maintaining their participation could be a challenge. Difference between Alpha and Beta Testing:-

No Alpha Testing Beta Testing

1It is always performed by the developers at the software development site.

It is alwaysperformed by the customers at their own site.

2Sometimes it is also performed by independent testing teams.

it is not performed by independent testing teams.

3 Alpha testing is not open to market and public.The Beta testing is always open to market and public.

4 It is conducted for software application and project. It is conducted for software product.

5 It is always performed in virtual environment. It is always performed in real time environment.

6 It is always performed within the organization. It is always performed outside the organization.

7 It is the form of acceptance test. It is also the form of acceptance test.

8Alpha testing is performed and carried out at the developing organizations location with the involvement of developers.

Beta testing is performed and carried out by the users at their own locations.

9It comes under the category of bothWhite box testing and black box testing.

It comes under the category of only black box testing.

10

Alpha testing is always performed at the time of acceptance testing, when developers test the product and project to check whether it meets the user requirements or not.

Beta testing is always performed at the time when software product and project are marketed.

4.6.SYSTEM TESTING:-

System testing is the next level in the testing and tests the system as a whole.

Once, all the components are integrated, the application as a whole is tested to see that it meets Quality

Standards.

This type of testing is performed by a specialized testing team.

System testing can be defined as "a testing conducted on a complete, integrated system to ensure that the

system is according to its specified requirement”.

System Testing is important because of the following reasons:

1. System testing is the first step in the Software Development Life Cycle (SDLC), where the application is

tested as a whole.

2. The application is tested thoroughly to verify that it meets the functional and technical requirements.

3. The application is tested in an environment which is very close to the production environment where the

application will be deployed.

Page 16: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

4. System testing enables us to test, verify and validate both the business requirements as well as the

Applications Architecture.

Benefits of System Testing:

1. System tests help you to test that the application is working correctly from the user’s point of view.

2. System tests help to specify how the application should behave.

3. Systems tests help you to test the changes made to one part of the application haven’t created a bug somewhere

else.

4. System tests can be run automatically so that testing is done as the application is being developed.

4.6.1 Concept

A system testing problem is "finger pointing". This occurs when a defect is uncovered and one system module

developer blames others for the problem.

To avoid such problems the software engineer should do:-

1. Design error-handling paths that test all information coming from other modules of the system.

2. Conduct a series of tests that removes bad data or other errors at the software interface.

3. Record the results of tests to use as "evidence" if finger pointing does occur.

4. Participate in the planning and design of tests to ensure that software is to be frequently tested.

4.6.2 Types of System Testing:- The types of system testing are as shown in fig

1. Recovery Testing : In software testing, recovery testing is the activity of testing how application is able to recover from crashes,

hardware failures and other problems. It is a type of system testing in which to test the system, the system is forced to fail to check whether the

software recovers from the failures without any data loss. The events that lead to failure include system crashes, hardware failures, unexpected loss of communication. Advantages of Recovery Testing :1. It ensures that proper detail of recovery procedures is maintained.2. Recovery testing ensures that the backup data is stored in a secure location.3. Recovery testing checks whether the backup data is saved properly.

Page 17: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

2. Security Testing : Any computer-based system that manages sensitive or critical information or produces operations that can harm

the system. Security testing verifies that protection approaches protect the system from penetration. During security testing, the tester plays the role of the individual who wants to enter the system (i.e. hacker). The tester may try to get passwords through hacking approaches; and may attack the system purposely produce

errors and hope to find the key to system entry. Security testing is a process to determine that an information system protects data and maintains functionality

as intended. Advantages of Security Testing:-

1. Security testing determines whether proper techniques are used to identify security risks.2. Security testing conducts tests to ensure that the implemented security measures are working properly.3. Security testing ensures that the system is able to protect its data and maintain its functionality.4. Security testing verifies that appropriate protection techniques are followed secure the system.

3. Stress Testing : IEEE defines stress testing as 'testing conducted to evaluate a system or component at or beyond the limits of its

specified requirements.'

It is designed to determine the behavior of the software under abnormal situations.

In this testing the test case are designed in such way that the abnormal conditions arise.

Some examples of test cases that be designed for stress testing are listed below.

1. Test cases that demand excessive use of memory as well as other resources.

2. Test cases that cause 'thrashing' by causing excessive disk accessing.

3. Test cases that generate interrupts at a much higher rate than the average rate.

Advantages of Stress Testing :

1. Stress testing executes a system till it fails. This enables the testers to determine the difference between

the expected operating conditions and the Failure conditions.

2. It evaluates a system at or beyond its specified limits of performance.

3. Stress testing determines the amount of load that causes a system to fail.

4. Stress testing indicates the expected behavior of a system when it reaches

5. The extreme level of its capacity.

6. Stress testing determines the part of a system that leads to errors.

4. Performance Testing:-

Performance testing is designed to determine the performance of the (real-time and embedded systems) at the

run-time.

Performance testing occurs throughout all steps in the testing process .Performance tests are sometimes coupled

with stress testing.

It does not focus on evaluations of material, people; rather it focuses on the final measurable performance

characteristics.

Performance testing is defined as "the technical investigation done to determine the speed, scalability, and/or

stability characteristics of the product.”

Page 18: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Performance testing takes various performance factors like load, volume, response time of system into

consideration. And ensure that they are according with specifications.

Performance testing also determines and informs the software developer about the current performance of the

software. Advantages of Performance Testing :

1. Performance testing compares different systems to determine which system performs better.

2. It assess whether a component or system is giving the specified performance.

4.7 Black Box Testing/Functional Testing:- Black-box testing is software testing method in which the internal Structure/design/implementation of the item

being tested is not known to the tester. This method is named black box because the software program, in the eyes of the tester is like a black box,

which one cannot see. Once the specified function for which the software has been designed is known test are performed to ensure that

each function is working properly. Black box testing checks the functional requirements and examines the input and output data of these

requirements, (See Fig) When testing is performed, only the sets of 'legal' input and corresponding output should be known to the tester,

not the internal logic of the program. Hence, to determine the functionality, the outputs produced for the given sets of input are observed.

Fig. 4.13: Black box Testing

The black box testing is used to find the errors listed below: 1. Missing functions and erroneous data structures.2. Incorrect conditions due to which the functions produce incorrect outputs when they are executed.3. Interface errors such as functions, which are unable to send or receive data to/from other software.4. Termination errors such as certain conditions due to which a function enters a loop that forces it to

execute indefinitely.5. Incorrect functions that lead to undesired output when executed.6. Erroneous databases, which lead to incorrect outputs when the software uses the data present in these

databases for processing. Methods of Black-Box Testing:

1. In equivalence class partitioning, the test inputs are classified into equivalence classes such that one input checks (validates) all the input values in that class. Equivalence partitioning is a software test design technique that involves dividing input values into valid and invalid classes and selecting representative values from each class as test data.

2. In boundary value analysis, the boundary values of the equivalence 4 are considered and tested. Boundary value analysis is a software test technique that involves determination of boundaries for input values and selecting values that are at the boundaries and just inside/outside boundaries as test data.

Page 19: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

3. In cause-effect graphing, cause-effect graphs are used to design test cases which provides all the possible combinations of inputs to the program. Cause effect graphing is a software test design technique that involves identifying the causes (input conditions) and effects (output conditions), producing the cause-effect graph.

Advantages of Black-Box Testing:1. Tests are done from a user's point of view.2. Tester need not know programming languages or how the software has been implemented.3. Tests can be conducted by anyone independent from the developers.4. Test cases can be designed as soon as the specifications are complete.5. Well suited and efficient for large code segments.6. Code access not required.

Disadvantages of Black Box Testing:1. In this testing only a small number of possible inputs can be tested and many program paths will be left

untested.2. Limited coverage since only a selected number of test scenarios are actually performed.3. Inefficient testing, due to the fact that the tester only has limited knowledge about an application.4. Tests can be redundant if the software designer/ developer has already run a test case.5. Without clear specifications, which is the situation in many projects, cases will be difficult to design6. The test cases are difficult to design.7. Blind coverage, since the tester cannot see specific code segments.

4.8 White Box Testing/Structural Testing/Glass-Box Testing:- A complementary approach to black box testing is called as the white box testing or structural testing or glass

box testing. The tester can analyze the code. This testing is performed to test the program internal structure. To perform white box testing, the tester should have thorough knowledge of the program logic and purpose of

the software. During this testing the entire software implementation is also included in specification, which helps to detect

errors.

Using white box testing approaches the software engineering can produce test cases that are:-1. Guarantee that all independent paths in module have been executed at least once.2. Exercise all logical decisions .(Ex.logical AND, logical OR)3. Execute all loops within their boundaries .(EX.IF,WHILE,DO_WHILE)4. Exercise data structures to maintain their validity.

Page 20: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Techniques of White-Box Testing:1. Basis Path Testing :

Basis path testing is a white-box testing technique that allows the test case designer to produce a logical

complexity measure of procedural design and use this measure as an approach for checking a basic set of

execution paths.

Test cases produced to exercise each statement in the program at least one time during testing.2. Condition Testing :

Condition testing is a test case design approach that exercises the logical conditions contained in a program

module.

A simple condition is a Boolean variable.3. Data Flow Testing :

The data flow testing method tests the paths between locations of variable definitions and uses of variables

in the program. Advantages of White Box Testing:

1. Testing can cover the larger part of the program code while testing.

2. Testing can be commenced at an earlier stage. One need not wait for the GUI to be available.

3. Testing is deeply performed, with the covering most paths.

4. As the tester has knowledge of the source code, it becomes very easy to find out which type of data can help

in testing the application effectively.

5. It helps in optimizing the code.

6. Extra lines of code can be removed which can bring in hidden defects. Disadvantages of White Box Testing:

1. Due to the fact that a skilled tester is needed to perform white box testing, the costs are increased.

2. Test script maintenance can be a burden if the implementation changes too frequently.

3. White box testing is like the work of a mechanic who examines the engine to see why car is not moving.

4. Since tests can be very complex, highly skilled resources are required with thorough knowledge of

programming and implementation.

5. Sometimes it is impossible to find out hidden errors that may cause that, many paths will go untested.

6. To perform this test some specialized tools like analyzers and debugging tools are required so it is very

difficult to maintain such tools.

7. In this testing the test is based on design so may miss other system problems.

Page 21: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Difference between White Box and Black Box Testing:

White Box Testing Black Box Testing

To test the internal structure of software. To test the functionality of software.

Test the software but does not ensure that all the requirements mentioned in user requirements are implemented.

Concerned with testing the specifications and does not ensure that all the components of software that are implemented are tested.

Addresses flow and control Structure of a program.Addresses validity, behavior and performance of software.

Performed in the earlystages of testing. Performed in the later stages of testing.

The knowledge of the internal structure of program is required for generating test case.

No knowledge of the internal structure of a program is required to generate test case.

Test cases are generated on the basis of the internalstructure or code of module.

Internal structure ofmodules or programs is not considered for selecting test cases.

Normally done by testers and developers.Performed by end users and also by testers and developers.

Internal workings are fully known to the tester.Testing is based on external expectations. The internal behavior of the application is unknown.

It is most exhaustive and time consuming type of testing.

This is the least time consuming and exhaustive.

Data and internal boundaries can be better tested. This can only be done by trial and error method.

4.9 DEBUGGING:- Debugging is a methodical process of finding and reducing the number of bugs, defects, in a computer system

(software, hardware) thus making it behave as expected. Debugging can be defined as, "a process of analyzing and removing the error".4.9.2 Concept and Need :-

Debugging occurs as a consequence of successful testing. That is, when test uncovers an error, debugging is the process that removes the error.

Debugging Process : 1. Debugging is not testing, but always occurs as a consequence of testing. 2. Refer the following fig. The debugging process begins with the execution of a test case. The debugging process will always have one of two outcomes: - The cause of error will be found, corrected and removed. - The cause will not be found.

Psychological considerations: Debugging is one of the more frustrating part of programming.

Page 22: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

Debugging Approaches: The main aim of debugging is to determine and correct errors. To achieve this aim three kinds of debugging

approaches can be used: 1. Brute force:-

It is probably the most popular but least successful. We apply brute force debugging methods when all else fails. To find the error, memory dumps are taken, run the software and if software is lost the program is loaded

with WRITE statements.2. Backtracking :-

It is a common debugging method that can be used successfully in small programs. Starts with site where a symptom has been found, the source code is traced backwards till the error is

found. 3. Cause elimination:-

A list of possible causes of an error are identified and tests are conducted until each one is eliminated.

4.9.3 Characteristics of Bugs:-

characteristics of bugs are given below :

1. The symptoms may disappear when error is corrected.

2. The symptom may be caused by human error that is not easily traced.

3. The symptom and the cause may be geographically remote i.e. the symptom may appear in one part

of a program, while the cause may actually be located at a site that is far away.

4. The symptom may actually be caused by nonerros.

Page 23: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

5. Symptom may be due to causes that are distributed across a number of tasks running on different

processors.

6. The symptom may be a result of timing problems in case of real time software.

7. The symptom may be intermittent. That is symptoms are not continuously appearing.

4.9.4 Debugging Strategies :-

As debugging is a difficult and time consuming task, it is essential to develop a proper debugging strategy.

This debugging strategy helps in performing the process of debugging easily and efficiently.

The commonly used debugging strategies are shown in Fig.

Various debugging strategies are given below :1. Brute force :

It is probably the most popular but least successful. We apply brute force debugging methods when all else fails. To find the error, memory dumps are taken, run the software and if software is lost the program is loaded

with WRITE statements.2. Backtracking :

Backtracking is a fairly common debugging approach that can be used successfully in small programs. Starts with site where a symptom has been found, the source code is traced backwards till the error is

found.3. Cause elimination :

The third approach to debugging is cause elimination.

During this approach, each of the above debugging approaches can be supplemented with debugging tools.

We can apply a wide variety of debugging tools like compilers ,memory dumps etc.

4. Deduction strategy:

Page 24: Web view5/4/2017 · “The process of evaluating a system or system component by manual or automated mean to verify ... software design. ... engineering process may be

In deduction strategy the first step is to identify all possible causes and then using the data, each cause is

analyzed and eliminated.5. Induction strategy:

It is a disciplined process, where errors can be debugged by moving outwards from the particulars to the

whole. (i.e. if single error is found the whole code will be tested.)6. Debugging by testing:

In this method both debugging by induction and debugging by deduction methods are combined.7. Automated debugging :

Each of above debugging approaches can be supplemented with debugging tools that can provide you with

semi-automated support.

Integrated development Environments (IDE) provides a way to capture some of the language specific

errors without requiring compilation.

Once, a bug has been found, it must be corrected.

--------------------------------------------------------------END -------------------------------------------------------------------------