Abstract
This poper shows a way to derive test cases for system level black-box-testing from the spec jfication models already elaborated in the requirements analysis phase. The basis for this process is the UML ((UnWed Modelling Language) we case modeL It provides a good way to describe both the interaction with the user and the system behavior-, The concept of a text template driven structure editor is presented Such an editor can be used to construct aformalized use case description in a user friendly way According to the principles of the already known statistical usage testing which aims ofat statement about the fitness of the system for the intended purpose the most likely usage scenarios are chosen as test cases. It is shown how the Markov property ofthe system description can be preserved in the case of data dependent system behavior
Keywords
Statistical usage testing, usage based testing, behavior speccation, use case, UML, Markov chain.
1. Introduction
Extensive and efficient testing is very important to ensurç software quality. In many projects the costs for testing represent 25-50% of the overall project costs. It can be said that testing is not a yery favored task. The first step to reduce the effort for testing is to use testing tools that execute tests automatically. But the necessary test cases are usually created manually requiring the tester to think about the usage and the behavior of the system, a task he or another person has already done in the requirements analysis phase of the software development.
This doubled work can be avoided when the test cases for black-box-testing are derived from the use case models and the class models. These models are available as products of the requirements analysis phase of the software development. During the development, of a software system there are other kinds of testing that have to be carried out. Usually, these tests examine just parts of the system and take internal details into account or they are intended to find the location of errors. These tests are outside the scope of this paper because the test cases for these tests cannot be deriVed from specification models alone. Taking the specification models as the basis for tests has the positive side effect that more attention is paid to keep the models complete and
1
up-to-date. Another advantage is that testing can start in very early phases of the development process, which is important for incremental development and allows shortening the time to delivery. Furthermore the software quality is raised because the system is tested with respect to the explicitly stated user requirements.
Statistical Usage Testing
The basis for creating test cases in statistical usage testing usage model. A usage model is like a state machine, i.e. directed usage graph consisting of states and transitions, the extension that every state transition is attributed with probability that this transition will be traversed from which the transition arc starts. Hence every state the probabilities of Outgoing transitions sum one. Every transition can be related to an event (possibly parameters), which triggers that transition.
A transition with an associated event may also be related to a guard condition. This means that the transition is only performed if the condition is fulfilled by the event parameter value. There are three approaches to assign transition probabilities. In the uninformed approach all exit arcs of a state have the probability. The informed approach uses sample user event sequences captured from a prototype or a prior version of thesystem to calculate suitable probabilities. The intended approach allowi to model hypothetic users or to shift the test focus certain states or transitions. The Markov property states that all transition probabilities depend only pil the ctual state and are independent ofthe history This neans that they must befl*èd hdmb&s. A ystem with this property is called a Markov chain, for which some valuable analytical deseriptions.cEn be concluded.
One such description is the usage 4istrbution statg steady-stte probability for every state, i e the expected appearance rate of that state. Sinóè each state is aásoéiated with ãn
oftheactualsoftwáre,distributorship pdrts of the softwate get themostattention from u the test eases. Other important descriptions arethe expected tcst.case andthengmberQfsestc4ses that are necessary to verd’ rquire4 reliability of :• the sytepi. .We extend this approach by allowing nondcterministic system beha’ith and b’ handling guards that depend on system data state. This enables to apply statistical Osagë based te•sting to a wider range of systems.
3. System Spec jflcation with (JML
The re4uirethents añäIisphaeyield&at
least to Models to ddeiibe th& planned system
from the user perspective
1. The Use case model to describe the system behavior:
2. The domain class model to describe which kind of real-life objects are represented in the system and what of their attributes, operations and relations (i.e. links) to other objects are relevant for the intended purpose of the system.
This distinction between dynamic and static aspects in the system description is carried over to the notion of state. The overall state of a system is made up of the execution state, which tells what step of a Use case is currently being executed and of the data state which tells what data are stored in the system The data state is made up of the system data state which is persistent between use case executions and the use case data state which is local to the executed use case and hence. transient.
The UML standard defines only a very toplevel structure to describe use cases, which allows only defining use cases as named entities with a textual description. Its common to write use case descriptions in a slightly more structured form, e.g. in tabular or tree form. Because the leave enttzes i these structttrn are still plain text they are textual use case descriptions.
Subscribe to:
Post Comments (Atom)
0 comments
Post a Comment