software engineering unit 4

23
SOFTWARE ENGINEERING UNIT-4 ABHIMANYU MISHRA ASSISTANT PROF.(CSE) JETGI 24/12/16 1 Abhimanyu Mishra(CSE) JETGI

Upload: abhimanyu-mishra

Post on 20-Jan-2017

23 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 1

SOFTWARE ENGINEERINGUNIT-4

ABHIMANYU MISHRAASSISTANT PROF.(CSE)

JETGI

24/12/16

Page 2: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 2

Testing objectives. Unit testing. Integration testing. Acceptance testing. Regression testing. Testing for performance. Top down & bottom up strategies: Test driver and Test stub. Test data suit preparation. Apha & Beta testing of products. Static testing Strategies: Formal Technical Reviews, walkthrough. Compliance with design and coding standards.

CONTENTS

24/12/16

Page 3: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 3

Software testing is the process of executing a program with the intension of finding errors in the code. It is a process of evolution of a system or its parts by manual or automatic means to verify that it is satisfying specified requirements or not. Generally no system design is ever perfect due to communication problem

between user & developer, time constrains, or conceptual mistake by developers. The purpose of system testing is to check and find out these errors or faults as

early as possible so losses due to it can be saved. Testing is the fundamental of software success. System testing makes a logical assumption that if all the parts of the system are

working correctly then system goal will be successfully achieved. Testing is not a distinct phase in system development life cycle but should be

applicable throughout all phases.

TESTING OBJECTIVES :

24/12/16

Page 4: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 4

OBJECTIVE OF SOFTWARE TESTING:

i. Software quality improvement- the computer and the software are mainly used for complex and critical applications and a bug or fault in software causes severe losses.

ii. Verification & Validation- The second main objective of software is to verify the system and checking its validation. Verification means to test that we are building the product in right way.

iii. Software reliability estimation- software reliability has important relationship with many aspects of software development. Its objective is to discover the residual designing errors before delivery to the customer

24/12/16

Page 5: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI24/12/16 5

Software

Testers

Reliability

analysis

Designer

Test inputs Test data

Test outputsContinue/ change procedure

Debug system

Evaluate effectiveness of fixes

Fig- Role of reliability in software testing

Page 6: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 624/12/16

VARIOUS TYPES OF TESTING:

Acceptance testing

System testing

Integration testing

Unit testing

Client Needs

Requirements

Design

code

Page 7: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 7

Unit testing focuses verification effort on the smallest unit of software design the software component or module.Using the component-level design description as a guide, important control paths are tested to uncovered errors within the boundary of the module. In unit testing individual components are tested to ensure that they are working properly in the same manner as required.It is the lowest level of testing of application under test software meet the requirements.

The main reason for doing unit testing is that:

•The size of single module is small enough that can locate error very easily.

•Due to small size it can be tested in demonstrably in exhaustive fashion.

Unit Testing:

24/12/16

Page 8: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 824/12/16

M1

M2

M3

M4

M5

M7 M6

Unit testing

Page 9: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 9

INTEGRATION TESTING:

24/12/16

Once individuals program component have been tested, they must be integrated to create a partial or complete system.

Integrated test should develop during system specification, and this integration testing should begin as soon as usable versions of some of the system component are available.

The primary objective of integration testing is to check the module interface i.e. way of interaction of module, is not having any kind of errors.

The main integration technique are- i. Top down integration testingii. Bottom up integration testing.

Page 10: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 1024/12/16

Top down integration testing- In top down integration testing, the top level usually one controlling component is tested. Then all components called by tested component are combined in the same way and tested as a large unit. This process continues until all components are integrated and then whole system have been completely tested. Advantages of top down testing: Design errors are detected as early as possible, saving development time and costs

because corrections in the module design can be made before their implementation.

The characteristics of a software system are evident from the start, which enables a simple test of the development state and the acceptance by the user.

The software system can be tested thoroughly from the start with test cases without providing test environments.

Disadvantages of top down testing: Strict top down testing proves extremely difficult because designing usable

surrogate objects can prove very complicated, especially for complex operation. Errors in lower hierarchy levels are hard to localize.

TOP DOWN TESTING:

Page 11: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 1124/12/16

BOTTOM-UP INTEGRATION TESTING:

It is very popular approach of merging the components to test a larger system. In this method each subsystem at the lower level of system hierarchy is tested individually first. Then the next component who calls the previously tested ones to be tested.Advantages of Bottom-Up integrated testing- The bottom-up test method is solid & proven. The objects to be tested are

known in full detail. It is often simpler to define relevant test cases and test data.

The bottom- up approach is psychologically more satisfying because the tester can be certain that the foundations for the test objects have been tested in full detailed.

Disadvantages of Bottom-up integrated testing- The characteristics of the finished product are only known after the completion

of all implementation and testing, which means that design error in the upper level are detected very late

Testing individual levels also inflicts high costs for providing a suitable test environment.

Page 12: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 1224/12/16

ACCEPTANCE TESTING:

The purpose of acceptance testing is to confirm that the system meets its business requirements and to provide confidence that the system is working properly before it is “hand over” to the customer.

Acceptance testing is performed by nominated user representatives under guidance and supervision of testing team and developer.

During acceptance testing it is very important that there should be an independent observer of testing process specially when the customer are not having too much IT knowledge.

The main way to evaluate the system for acceptance is bench mark test. In this customer prepare a set of a test cases that represents typical condition under which the system will operate when actually installed. The customer evaluate the system performance for each test case.

Page 13: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 13

STRESS TESTING:

In software testing, stress testing refers to tests that determine the robustness of software by testing beyond the limits of normal operation. Stress testing is particularly important for “mission critical” software, but is used for all types of software.

Stress tests commonly put a greater emphasis on robustness, availability, and error handling under a heavy load, then on what would be considered correct behavior under normal circumstances.

Stress testing typically involves the independent test team performing the following testing tasks using the following technique:

i. Test planningii. Test reuseiii. Test design

24/12/16

Page 14: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 1424/12/16

REGRESSION TESTING:

Testing is used to find out errors in the software due to which it is not working properly. When these errors are found out then different methods are used to correct these errors. But while, removing process of current errors, some new faults or errors may be generated. Regression testing is used to identified these new errors or faults. Regression testing can be applied in development as well as maintenance phase of software life cycle. In development phase regression testing is done after correcting the errors found during the testing of software.A regression test suit contains three different classes of test cases: A representative sample of tests that will exercise all software functions. Additional tests that focuses on software functions that are likely to be affected by the

change. Test that focuses on the software components that have been changed.

Page 15: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 15

TEST DRIVER & TEST STUB:

24/12/16

“A test driver is a software module or application used to invoke a test and provide test data, control and monitor execution and execution and reports test outcomes”.Test driver are used for testing of sub-module in the absence of main control module. A component driver routine calls a particular component and passes test case to it.

Test stub- Test stubs are specialized implementation of elements used for testing purpose, which are dummy of a real component. Test stubs are program or components that have deterministic behavior and are used to interface with sub system in order to take care of dependencies.• Basically stubs are used in top down approach.in it the main control module is

tested in the absence of stub-module.

Page 16: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 1624/12/16

WHITE BOX TESTING:

White box testing is a software testing approach that examines the program structure and derives test data from the program logic. In this approach, test group must have complete knowledge about the internal

structure of the software. White box testing is also called “structural testing”. Structural testing is usually applied to relatively small program units such as

subroutine or operations associated with objects. The white box testing is also known by name of glass box testing, clear box

testing, open-box testing. It is a test case design method that uses the control structure of the procedural

design to drive test cases.

Page 17: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 1724/12/16

Fig- White box approach

Page 18: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 1824/12/16

BLACK BOX APPROACH:

In Black-box testing the tester don’t know the internal structure of module, it tests only for input/output behavior. Black-box testing focuses on the functional requirements of the software. It enables the software engineer to derive sets of input conditions that will fully exercise all functional requirements for a program.

The black box testing is also known by the name of functional testing, exterior testing, specification testing, data- driven testing and input/output driven.

The selection of test cases is based on the specification of the test object without knowledge of its behavior of the test object on erroneous input data.

In black box test on software design the tester only knows the inputs and what will be expected outputs and don’t know how the program will arrive at those outputs.

Page 19: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 1924/12/16

Advantage of Black box testing- The test is unbiased because the designer and tester are

independent of each other. Test is done from the point of view of user not the designer. Test cases can be design as soon as specification is

completed. For tester there is no need to know any programming

language.

Disadvantage of Black box testing- The test can be redundant if software designer has already run a test

case. The test cases are difficult to design.

Page 20: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 2024/12/16

Fig- Black box testing

Page 21: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 2124/12/16

TEST DATA SUIT PREPARATION:

Testing is the process of executing a program to locate undiscovered errors. The main aim of program testing is to identify all defects in a program. However, it is not possible to guarantee that a program is error free.Following activities are to be performed during testing process- Designing test suit Running test cases & checking result Debugging Error correction

Page 22: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 2224/12/16

FORMAL TECHNICAL REVIEW:

A formal technical review are filter or software engineering process i.e. review are applied at various points during software development and serve to uncover the errors and defects that can be removed. Software reviews “purifies” the software engineering activities that we have called analysis, design and coding. It is a software quality that assurance activity performed by software

engineers. A FTR is known as WALKTHROUGH or an INSPECTION.The objective of FTR are:- To uncover errors in function, logic or implementation for representation of

software. To verify that software under review meets its requirements. To ensure that the software has been represented according to predefined

standards. To achieve software that is developed in a uniform manner.

Page 23: Software Engineering unit 4

Abhimanyu Mishra(CSE) JETGI 2324/12/16

DESIGNING & CODING STANDARDS:

Coding standards are a set of conventions that the programmer follow to standardize their computer code to some degree and to make the overall program easier to read and understand.In other words coding standard as it is sometime called is about how you code so that the code is easily readable and understandable by a human. Coding Program Robustness I/O Behavior Modules & Modular program structure Program Testing Cohesion Procedure Minimize coupling Minimize data scope where possible