0% found this document useful (0 votes)
92 views2 pages

STM 10

wertyhbvdftyuk

Uploaded by

Praveen Praveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
92 views2 pages

STM 10

wertyhbvdftyuk

Uploaded by

Praveen Praveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
Department of CSE Time Versus Sequence ‘State graphs don’t represent time-they represent sequence.A tfansition might take microseconds or centuries; ‘ASystem could be in one state for milliseconds and another for years- the state graph would bethe same because it has no notion of time, ‘Although the finite state machines model can be elaborated to include notions of time inaddition to sequence, such as time Petti Ness ‘© Software implementation There is rarely a direct correspondence between programs and the behavior of a processdescribed as a state graph. The state graph represents, the total behavior consisting of the transport, the software, theexecutive, the status returns, interrupts, and so on, There is no simple correspondent between lines of code and states, The state table forms thebasis, Good State Graphs and Bad What constitutes a good or a bad state graph is to some extent biased by the kinds of stategraphs that are likely to be used in a software test design context. Here are some principles for judging, co The total number of states is equal to the product of the possibilities of factors that make up the state. © For every state and input there is exactly one transition specified to exactly one, possibly the same, state. © For every transition there is one output action specified. The output could be trivial, butat least oné output does something sensible. © For every state there is a sequence of inputs that will drive the system back to the same state Important graphs A\ f\ m , 2 2 “42 2 @ e@ States A and B are not reachable GQ 22-@) 2we transitions are specified for z an input of 1 in state A State Bugs-Number of States ‘The rumber of states in a state graph is the number of states we choose to recognize or model 42 A \ /\ Statf can never be left, the initial state can @ never Be entered again. | a | 2 State C cannot be entered. 4, Page Department of CSE The state i directly or indirectly recorded as a combination of values of variables that appear in the data base. For example, the state could be composed of the value of a counter whose possible values ranged from 0 to 9, combined with the setting of two bit flags, leading toa total of 2*2*10-40 states. The numberof states ean be computed as follows: © Identify all the component factors of the state, © Identify all the allowable values for each factor. © The number of states is the product of the number of allowable values of all the factors. Before you do anything else, before you consider one test case, discuss the number of states you think there are with the number of states the programmer thinks there are. ‘There is no point in designing tests intended to check the system’s behavior in various states if there’s no agreement on how many states there are, © Impossible States ‘Some times some combinations of factors may appear to be impossible * The discrepancy between the programmer's state count and the tester’s state count is often due toa difference of opinion concerning “impossible states”. ‘A robust piece of software will not ignore impossible states but will recognize them and invoke an illogical condition handler when they appeat to have occurred Equivalent States Two states are Equivalent if every sequence of inputs starting from one state produces exactly the same sequence of outputs when started from the other state, This notion can also be extended to set of states. Merging of Equivalent States a,b Page

You might also like