Document 7924004

Download Report

Transcript Document 7924004

Test
Yaodong Bi
Introduction to Test

Purposes of Implementation
–
–
–
Plan the integration tests for each build and system
tests at the end of each iteration
Design and implement the tests by creating test
cases that specifies what to test and test procedure
Perform the tests and systematically handle the
results of each test
Artifacts of Implement. - Overview







Test Model
Test cases
Test procedures
Test components
Test plan
Defects
Test Evaluation
Artifacts – Detailed

Test model
–
–
–
Describe how executable components in the
implementation model are tested by integration and
system tests.
Describe how specific aspects of the systems are to
be tested if needed.
A test model is a collection of test cases, test
procedures, and test components
Artifacts – Test Cases

Test cases
–
–
A test case specifies on way of testing the system,
including input, output and testing conditions
Common test cases:


A test case that specifies how to test a use case or a
scenario of a use case. It includes verifying the results and
the sequence of interactions, and the pre- and post
conditions. “Black-box” test (p298, example)
A test case that specifies how to test a use-case realization
– design or a specific scenario of the realization. It verifies
the interaction between components implementing the the
use case. “White box” test
Artifacts – Test Cases

Test cases
–
Other test cases:




Installation tests: verify that the system can be installed on
the customer platform and operates correctly.
Configuration tests: verify that the system works correctly
in different configurations, such as different network
configurations
Negative tests: try to cause the system to fail to find its
weakness, such as impossible work load
Stress tests: Identify problems with the system when it
suffers insufficient system resources, like memory, disk
space
Artifacts – Test Procedure, etc.

Test procedure
–

Test component
–

Describes the testing strategies, resources and schedule by defining
the kinds of test for each iteration, their objectives, and test coverage.
Defect
–

A test component automates one or several test procedures. Also
called test drivers, test harnesses, and test scripts
Test plan
–

Specifies how to perform one or several test cases or parts of them
(p300 example and p301 example)
A defect is a system anomaly.
Test evaluation
–
An evaluation of the results of the test efforts like test coverage, etc.
Activities of Test - Overview

Plan test
–

Design test
–

Perform integration tests for each build
Perform system test
–

Automate test procedures by creating test components
Perform integration test
–

Design test cases and test procedures
Implement test
–

Plan the testing efforts for each iteration.
Perform system tests at the end of each iteration
Evaluate test
Test Plan

Steps: (p306, example)
–
–
–

Describe a testing strategy
Estimate the requirements for the testing effort,
such as human and system resources
Schedule the testing effort
Identify test cases, procedures, and
components that gives the best returns on
investment in terms of the improved quality
Design Test – Integration Test

Design integration test cases
–
–
–
Verify that the components interact with each other
properly after they are integrated in each build
Most integration test cases can be derived from
use-case realization – design through interaction
diagrams
The actual interactions among components are
compared with the interactions in the interaction
diagrams
Design Test – System Test

Design system test cases
–
–
–
Test the system functions correctly as a whole.
Test primarily tests combinations of use cases
instantiated under different conditions
Prioritize combinations of use-cases that




Are required to function in parallel
Are likely to be performed in parallel
Are likely to influence each other if in parallel
Involve multiple processes
Design Test - Regression

Design regression test cases
–
–

Some test cases from earlier builds may be used for
regression tests in subsequent test
Identify those test cases for regression tests
Identify and structure test procedures
–
–
–
Specify test procedures for each test case
Reuse test procedures as much as possible
Specify how to test classes in one service system if possible
so when the service system changes, only the test cases
related it need to be re-designed
Implement Test

Implement test
–

Automate test procedures by creating test components, if
possible.
Perform integration test
–
–
–
–
Execute the test procedures manually or automatically
Compare the test results with the expected
Report the defects to component engineer who is responsible
for the components that are likely to contain the fault
Report the defects to the test designer for test evaluation
Evaluate Test

Evaluate test
–
–
Evaluate the results of the test effort by comparing the results
with the goals outlined in the test plan
Defect trend analysis:


–
Testing completeness: indicate what percentage of test cases that
have been executed and what percentage of the code that have
been covered
Reliability: predicted # of bugs in the system
Based on defect trend analysis, further actions are determined:


Add more tests to locate more defects
Relax the criteria for the tests
Perform Unit Test

Structure testing or white-box testing
–
–
–
Verify the unit’s internal implementation
Every statement is executed at least once.
Test the most interesting paths through the code




Most commonly followed paths
Most critical paths
The least-known paths
High risk paths
Summary of Test

Test model:
–
–
–

Test cases
Test procedures
Test components
Test Activities
–
–
–
–
–
–
Plan test
Design test
Implement test
Perform integration test
Perform system test
Evaluate test