Software Testing - II Dr Atul Gupta

Testing Activities in the SDLC Requirement Specification

Acceptance Testing SRS

Tested Software

System Design

System Testing

System Design

Subsystem

Detailed Design

Integration Testing

Detailed Design

Tested Units

Coding

Unit Testing

Code

Levels of Testing Type of Testing „

Low-level testing „ „

„

Performed By

Unit (module) testing Integration testing

High-level testing „ „ „

System testing Function testing Acceptance testing

Programmer/Developer Development team Independent Test Group Independent Test Group Customer

Unit Testing Done on individual units (Class or small cluster classes in OO System and a function or modules in Procedural Systems) „ Test unit w.r.t unit specification „ Mostly done by developers/programmers „ requires stubs and drivers „ Further Popularized by the availability of Unit Testing Frameworks „

Stubs and Drivers „

Stub „

„

dummy units which simulates the function of other units required to test unit under test

e.g. unit relationships

eg. to unit test B in isolation Stub for A

A Driver

B

B

Driver „

Code that executes unit under test

C

Stub for C

Integration Testing Tests a group of units, modules, or a subsystem „ Test subsystem structure w.r.t design, subsystem functions „ Focuses on unit interfaces „ Done by one/group of developers „ Undertaken based on dependency considerations „

Integration Test Approaches „

Non-incremental ( Big-Bang integration )‫‏‬ „ „

„

unit test each module independently combine all the units to form the subsystem in one step, and test the combination

Incremental „

„

instead of testing each unit in isolation, the next unit to be tested is first combined with the set of units that have already been tested integration approaches:„ „

Functional System: TopTop-down, BottomBottom-up OO System: Based on dependency considerations

Comparison Non-Incremental

Incremental

„

requires more stubs, drivers

„

requires less stubs, drivers

„

module interfacing errors detected late

„

module interfacing errors detected early

„

debugging errors is difficult

„

debugging errors is easier

„

results in more thorough testing of modules

Example: Integration Testing in Functional Systems A

B

E

C

F

D

H

Example: Integration Testing in OO Systems A

B

E

F

C

D

H

System Testing „

„

Process of attempting to demonstrate that the program or system does not meet its original requirements and objectives as stated in the requirements specification Test cases derived from „ „

requirements specification system objectives, user documentation

Types of System Tests „

Functional Testing „

Testing Functionality to be delivered by the system

Specialized Testing (Testing NFRs) NFRs) „

Volume testing „

„

Load/Stress testing „

„

to identify peak load conditions at which the program will fail to handle required processing loads within required time spans

Usability (human factors) testing „

„

to determine whether the program can handle the required volumes of data, requests, etc.

to identify discrepancies between the user interfaces of a product product and the human engineering requirements of its potential users.

Security Testing „

to show that the program’ program’s security requirements can be subverted

Types of System Tests Specialized Testing „

Performance testing „

„

Recovery testing „

„

to determine whether the system or program meets its requirements for recovery after a failure

Installability testing „

„

to determine whether the program meets its performance requirements (eg (eg.. response times, throughput rates, etc.)‫‏‬ etc.)‫‏‬

to identify ways in which the installation procedures lead to incorrect results

Configuration Testing „

to determine whether the program operates properly when the software or hardware is configured in a required manner

Types of System Tests Specialized Testing „

Compatibility/conversion testing „

„

Reliability/availability testing „

„

to determine whether the compatibility objectives of the program have been met and whether the conversion procedures work to determine whether the system meets its reliability and availability requirements

Resource usage testing „

to determine whether the program uses resources (memory, disk space, etc.) at levels which exceed requirements

Acceptance Testing „ „

Performed by the customer or end user Compare the software to its initial requirements and needs of its end users

Alpha and Beta Testing Tests performed on a SW Product before its released to a wide user community. „

Alpha testing conducted at the developer’s site by a User „ tests conducted in a controlled environment „

„

Beta testing conducted at one or more User sites by the end user of the SW „ it is a “live” use of the SW in an environment over which the developer has no control „

Regression Testing „ „ „ „ „

Testing changes made to the code To ensure that no new bugs are introduced in the system Can be performed at any level – unit, integration, and system level In practice, mostly performed at unit and system level in GUI testing Challenges include „ „ „ „

Reducing Regression Test Suite size Identify Invalid test cases Write additional test cases Automation

When to Stop Testing ? „

„

Stop when the scheduled time for testing expires Stop when all the test cases execute without detecting errors

-- both criteria are not good

Better Test Completion Criteria Make use of Coverage based Testing Example: Test cases derived from 1) satisfying multi-condition coverage and 2) boundary-value analysis and 3) cause-effect graphing

Better Test Completion Criteria State the completion criteria in terms of number of errors to be found. This requires: „ An estimate of total number of errors in the program „ An estimate of the % of errors that can be found through testing „ An estimates of what fraction of errors originate in particular design processes, and during what phases of testing they get detected.

Better Test Completion Criteria „

„

Plot the number of errors found per unit time during a test phase. The rate of error detection falls below a specified threshold

# Errors found

# Errors found

403020101 2 3 4 5 Week

6

403020101 2 3 4 5 Week

6

Defect Detection Effectiveness

Adapted from S. Easterbrook slides

XP Practices

Test Planning „

One master test plan should be produced for the overall testing effort „ „

„

purpose is to provide an overview of the entire testing effort It should identify the test units, features to be tested, approach approach for testing, test deliverables, schedule, personnel allocation, the overall training needs and the risks

One or more detailed test plans should be produced for each activity - (unit testing, integration testing, system testing, acceptance testing) „

purpose to describe in detail how that testing activity will be performed

Master Test Plan (outline) (IEEE/ANSI, 1983 [Std 829-1983])‫‏‬ Purpose: „

to prescribe the scope, approach, resources, and schedule of the testing activities

Outline: „ „ „ „ „

Test plan identifier Introduction Test Items Features to be tested Features not to be tested

Master Test Plan (outline)‫‏‬

„

Approach Item pass / fail criteria Suspension criteria and resumption requirements Test deliverables Testing tasks Environment needs Responsibilities Staffing and training needs Schedule Risks and contingencies

„

Approvals

„ „ „ „ „ „ „ „ „

SW Test Documentation „ „ „ „ „ „

Test Plan Test design specification Test cases specification Test procedure specification Test incident reports, test logs Test summary report

SW Test Documentation „

Test design specification „

„

to specify refinements of the test approach and to identify the features to be covered by the design and its associated tests. It also identifies the test cases and test procedures, if any, required to accomplish the testing and specifies the feature pass/fail criteria

Test cases specification „

„

to define a test case identified by a test design specification. The test case spec documents the actual values used for the input along with the anticipated outputs. It identifies any constraints on the test procedures resulting from use of that specific test case. Test cases are separated from test designs to allow for use in more than one design and to allow for reuse in other situations.

SW Test Documentation „

Test procedure specification „

„

to identify all steps required to operate the system and execute the specified test cases in order to implement the associated test design. The procedures are separated from test design specifications as they are indented to be followed step by step and should not have extraneous detail.

SW Test Documentation „

Test Log „

„

Test incident report „

„

to provide a chronological record of relevant details about the execution of tests. to document any test execution event which requires further investigation

Test summary report „

to summarize the results of the testing activities associated with one or more test design specs and to provide evaluations based on these results

SW Testing Tools „

Capture/playback tools „

„

„

„

„

capture user operations including keystrokes, mouse activity, and and display output these captured tests form a baseline for future testing of product product changes the tool can automatically play back previously captured tests whenever needed and validate the results by comparing them to the the previously saved baseline this makes regression testing easier

Coverage analyzers „

„ „

tell us which parts of the product under test have been executed (covered) by the current tests identifies parts not covered varieties of coverage - statement, decision, … etc.

SW Testing Tools „

Memory testing (bounds-checkers)‫‏‬ „

„

Test case management „ „ „

„

„ „

„

detect memory problems, exceeding array bounds, memory allocated but not freed, reading and using uninitialized memory

provide a user interface for managing tests organize tests for ease of use and maintenance start and manage test execution sessions that run useruserselected tests provide seamless integration with capture/palyback capture/palyback and coverage analysis tools provide automated test reporting and documentation System Testing tools and Unit Testing Frameworks are good examples.

Tools for performance testing of client/server applications

SW Testing Support Tools „

Defect tracking tools „

„ „

„

„

used to record, track, and generally assist with the management of defects submit and update defect reports generate pre-defined or user-defined management reports selectively notify users automatically of changes in defect status provide secured access to all data via user-defined queries

Summary (Part-II) „ „ „

„ „

„

„

Testing is performed at different levels Unit Testing is the first formal test activity Unit Testing can be highly efficient and cost effective Integration Testing is incremental Regression testing is about testing changes made to the code Tool support is highly desirable in software testing How can the effectiveness and efficiency of software testing can be enhanced further?

References „

„

„ „

Beizer, Boris (1990). Software Testing Techniques (Second Edition ed.) Myers, Glenford J. (1979). The Art of Software Testing. John Wiley and Sons Wikipedia http://en.wikipedia.org/wiki/Software_testing NCST Resources

Software Testing - II

Non-incremental ( Big-Bang integration ) . ▫ unit test each module ... to determine whether the program can handle the required volumes of data, requests, etc. ▫ .... System Testing tools and Unit Testing Frameworks are good examples. ▫ Tools for ... Wiley and Sons. ▫ Wikipedia http://en.wikipedia.org/wiki/Software_testing.

358KB Sizes 3 Downloads 221 Views

Recommend Documents

Software Testing - II
Integration Testing. Subsystem. System Testing. Tested Software. Acceptance. Testing ... Non-incremental ( Big-Bang integration ) . ▫ unit test each ... to determine whether the program can handle the required volumes of data, requests, etc. ▫

of Software Testing Two Futures of Software Testing
So even though the customer needs, the market conditions, the schedule, the ..... The state of tester certification as of this writing (November 2008) should be ...

Software Testing Techniques
through actual executions, i.e., with real data and under real (or simulated) ... In this paper, we focus on the technology maturation of testing techniques, including ..... Another interesting research in 1997 used formal architectural description f

Camur II Controller software
Camur II Controller software. Camur II Monitor and Camur II Server, software running on the Camur II Controller. Description. Camur II Server (Controller).

Software Testing Techniques
1. Software Testing Techniques. Technology Maturation and Research Strategies. Lu Luo ... research area within computer science is likely to become even more important in the future. This retrospective on a fifty-year of software testing technique re

about Software Testing
an important role in all SDLC stages. Testing ... paper nothing is for execution therefore Manual Testing is done at this stage. ... testing b) Black box testing [2,4,7].

It's Testing Time! Patterns for Testing Software
Jun 18, 2001 - One way to improve software quality on the functional level is to have good tests in place. This paper does not cover everything ... these patterns in order to allow for new perspectives on how to test software. The first pattern Separ

VNSGU M.Sc. (ICT) 2014 Sem II P-1609 Software Testing & Quality ...
Page 1 of 2. Page 2 of 2. Page 2 of 2. Main menu. Displaying VNSGU M.Sc. (ICT) 2014 Sem II P-1609 Software Testing & Quality Assurance.pdf. Page 1 of 2.

software testing automation pdf
software testing automation pdf. software testing automation pdf. Open. Extract. Open with. Sign In. Main menu. Displaying software testing automation pdf.

Testing Object-Oriented Software
May 4, 1993 - software is composed of objects and classes which interact via message passing ... development cycle, object-oriented software is most often ...

Software Testing _Course Content.pdf
For example: • Black box and white box testing. • System testing. • Security testing. • Performance testing. • Load testing. • Usability testing. • Accessibility testing.

The art of software testing
The Correspondence between Development and Testing. Processes. 127 ... topics: operating systems, applications software, security, communi- ... Rapid changes in ... knew about when Myers wrote the first edition: Web programming,.

CTS Software-Testing--Notes.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. CTS ...

The art of software testing
1. Computer software—Testing. 2. Debugging in computer science. I. Badgett, Tom. II. .... ware Testing stood the test of time, 25 years on the publisher's list of available ..... you eventually want to use program testing to establish some degree.

Lessons Learned in Software Testing
[PDF BOOK] Lessons Learned in Software Testing: A Context Driven .... technology itself is often made a scapegoat, as few people in the organization Welcome!