Académique Documents
Professionnel Documents
Culture Documents
To understand the role of testing in ensuring software quality To discuss issues relevant to software testing To describe the different techniques used for testing software To design tests that systematically uncover different classes of errors and to do so with a minimum amount of time and effort About Testing ? Testing is a set of activities that can be planned in advanced and conducted systematically. Testing begins at the module level. Testing conducted by the developer and an independent test group. Testing and debugging are different activities. 2
Objectives
Stage Containment
This term is used to identify problems existing in the product being developed before proceeding to the following stage.
Prod Test
Deploy
Defect Discovered
Analyze
Design
Prod Test
Deploy
More defects than errors. Fixes become more expensive and difficult.
Defect Origin
Analyze
Design
Assembly Test
Prod Test
Deploy
Defect Discovered
Analyze
Design
Prod Test
Deploy
Defect Origin
Analyze
Design
Detailed Design
Component Test
Assembly Test
Prod Test
Deploy
Defect Discovered
Analyze
Design
Prod Test
Deploy
Worst Case!
Entry and Exit Criteria Entry Criteria The Term Entry Criteria refers tot the input conditions required from the previous processes to support a specific stage. Exit Criteria The term Exit Criteria refers to the output conditions required by a specific process to determine its thoroughness and correct completion.
The Exit Criteria for one stage can constitute part of the Entry Criteria for the following stage.
Deliverable
Test Approach Test Scenarios Test Conditions and Expected Results Test Cycle Control Sheet
Description
Explains the objectives and scope of the test; Documents entry/exit criteria and key dates Provides high-level descriptions of functionality to be tested Describes all items and results that must be covered to fulfill each Test Scenarios Groups test scripts into logical categories (or cycles); documents when and by whom each cycle will be executed. Provides step-bystep instructions and detailed results for a test executor to follow during test execution
Test Scripts
Unit testing The most micro scale of Testing A unit = smallest testable software component Objects and methods Procedures / functions Performed by Programmer A tester can help. Requires detailed knowledge of the internal program design and code. The units are tested in isolation. Ensures the component is working according to the detailed design/build specifications of the module. Not to be confused with debugging. Also known as component, module, or program testing.
Integration Testing
Testing of more than one (tested) unit together to determine if they function correctly. Focus on interfaces Communication between units It is done using the integration test design prepared during the architecture design phase. Helps assembling incrementally a whole system, ensuring the correct flow of data from the first through the final component. Done by developers/designers and testers in collaboration Also called Interface Testing or Assembly Testing.
System testing Testing the system as a wholeBlack-box type testing that is based on overall requirements specifications; covers all combined parts of a system. Ensures that system meets all functional and business requirements. Focus Verifying that specifications are met Validating that the system can be used for the intended purpose The system test design is derived from the system design documents and is used in this phase. It can involve a number of specialized types of tests to check performance, stress, documentation etc. Sometimes testing is automated using testing tools. Done by Independent testing group
Acceptance testing
acceptance criteria and business requirements or not. Similar to System testing in that the whole system is checked, but the important difference is the change in focus. Done by real business users. It enables the customer to determine whether to accept the system or not. Also called as Beta Testing, Application Testing or End User Testing. Approach Should be performed in real operating environment . Customer should be able to perform any test based on their business processes. Final Customer sign-off.
Benefits of V-Model
Faults are prevented and it stops fault multiplication. Avoids the downward flow of defect. Lower defect Resolution cost due to earlier detection.
Unit testing: uses white box testing, exercises all paths max error detection. Integration testing: dual problem of verification and program construction. Black box testing methods are used here. Validation testing: that software meets all functional, behavioural and performance requirements. System testing: all elements mesh properly. Overall system function/performance is achieved.
Execution time t
Unit testing: Integration testing: Top-down Bottom-up Validation testing: Test Criteria alpha and beta testing System Testing: Recovery Security stress Performance Big Bang , Smoke testing, Sandwich testing Debugging
Testing Terminology
Failure
Incorrect or unexpected output Symptom of at fault
Fault
Invalid execution state Symptom of an error May or may not produce failure
Error
Defect or anomaly in source code Commonly referred as bug May or may not produce fault
21
22
Importance of Testing
Critical Element of Software Quality Assurance Well-planned and thorough testing are important in reducing the high cost of software failure Can take up to 40% of development effort In systems that require high reliability, testing can be 3 to 5 times of all the other steps combined
23
Testing Principles
All test should be traceable to customer requirements. Tests should be planned before testing begins. Testing should begin with individual components and move towards to integrated cluster of components. The most effective testing should be conducted by an independent third party.
24
Successful Testing
Uncover errors in the software Demonstrates that the software functions appear to be working according to specification Data collected as testing is conducted provide a good indication of software reliability and software quality
Testing Guidelines
Testing a systems capabilities is more important than testing its components Testing old capabilities is more important than testing new capabilities Testing typical situations is more important than testing boundary value cases
26
Test Cases
Test case : unit of testing activity Test cases have 3 parts : Goal
Aspect of the system being tested
Expected behavior
The output or action the system should take according to its requirements
27
time
money
people
resources
28
29
33
Node
4,5
R1
4 8 5
R3
Region 9
10
R4
11
34
Cyclomatic Complexity
Provide quantitative measure for program logical complexity. Defined number of independent path
Any path that introduce one ser of processing statements or new condition
35
2. V(G) = E N + 2
3. V(G) = P + 1
P : Number of predicate nodes
V(G) = 3 predicate nodes + 1 = 4
36
4 11 5
6
7
3.
4.
Constraints
Does not find missing or additional functionality Does not really check the interface Difficult for large and complex module
39
42
Equivalence Partitioning
Divide input domain into classes of data Based on an evaluation of equivalence classes for an input condition Guidelines to define equivalence classes
Range input : One valid and two invalid equivalence Specific value : One valid and two invalid equivalence A member of a set : One valid and one invalid equivalence Boolean : One valid and one invalid equivalence
43
44